Closed dshorthouse closed 1 year ago
There is no elegant support or plugin out of the box, mainly because GitHub Pages restricts what Jekyll plugins can be used. But, luck would have it that I set up a multiple language site last month at https://github.com/inbo/vespa-watch/tree/gh-pages
What I did:
fr
content is only kept for archival reasons)nl
content is served from root https://vespawatch.be/, en
content from https://vespawatch.be/en/page.lang
variablenavbar.html
include which will overwrite Petridish one. It:
footer.html
include which will overwrite Petridish one. The only change is that it includes code to select the correct footer.yml, rather than the default _data/footer.yml
one.You can see the result at https://vespawatch.be/
Note: URL paths can be internationalized with this approach, since the permalink picks up the name of the Markdown file:
permalink: /en/:basename/
I opted to name give the Markdown files the same names in Dutch and English (pages/nl/get-involved.md
and pages/en/get-involved.md
), so it's easier to understand what are the corresponding pages for each language. You can opt to give them different names or to set a custom permalink
in the frontmatter for each page like this:
Me & colleagues had been playing the "minimal mistakes" theme, but had been sucked into a blackhole. Restrictions on plugins is a v. useful piece of advice. And, thanks very much for this recipe. You may soon have another example that uses your gem :)~
The limited or overly complicated customization of most existing Jekyll themes is why I started Petridish.
If you were literally referring to a (Ruby) gem, note that I haven't implemented gem-based installation (#25 ). See http://peterdesmet.com/petridish/docs/installation/ for recommended installation.
If you were figuratively referring to gem, carry on. 😄
If you were literally referring to a (Ruby) gem, note that I haven't implemented gem-based installation (#25 ). See http://peterdesmet.com/petridish/docs/installation/ for recommended installation.
Ah! In that case, "You may soon have another example that uses your nutrient agar."
Any examples or suggestions for how one might make use of this theme for a site that aspires to serve content (= navigation and pages) in multiple languages? Preferably, the URL paths should also be internationalized, though not a show-stopper.