Skip to content

machinetranslate/machinetranslate.org

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This README is for machinetranslate.org infrastructure, not Machine Translate content.

For the Machine Translate landing page, visit index.md!

Infrastructure

The machinetranslate.org technology stack:

  • Website: Jekyll
  • Theme: Just the Docs
  • CDN: GitHub Pages
  • DNS: Cloudflare

Running Jekyll locally

Follow the Jekyll Quickstart Instructions:

Jekyll requires Ruby version 2.5 or later, but as of July 2023, Ruby version 3.2 was too new, it had incompatibilities.

  1. Install all prerequisites.
  2. Install the jekyll and bundler gems.
gem install jekyll bundler

... 5. Build the site and make it available on a local server.

bundle exec jekyll serve
  1. Browse to http://localhost:4000

Running generation locally

May types of articles, like languages and APIs, are generated from data files in the _data/ directory.

To regenerate the articles after making a change to the data, you should run

python generate.py

Paths

This repository has a directory structure, to keep it orderly, but on the website the page paths are flat, to have nice page URLs.

GitHub repository: /quality-estimation/quality-estimation.md machinetranslate.org: /quality-estimation (https://machinetranslate.org/quality-estimation)

How it works:

  • In the source content on GitHub, absolute paths are used (e.g. /quality/quality-estimation.md).
  • Jekyll removes the file extension (.md) - both locally and in production.
  • A Cloudflare Page Rule is configured to remove the directory from the path - in production only.

This way, everything works:

  • Paths resolve on GitHub (→ /quality/quality-estimation.md).
  • Paths resolve on the website locally (→ http://localhost:4000/quality-estimation).
  • Paths resolve on website in production (→ https://machinetranslate.org/quality-estimation).

So paths should not refer to parent directories with ../.