rochacbruno / marmite

Markdown makes sites - A Static Site Generator for Blogs
https://rochacbruno.github.io/marmite/
GNU Affero General Public License v3.0
424 stars 20 forks source link

feat: language streams #154

Open rochacbruno opened 2 days ago

rochacbruno commented 2 days ago

On marmite.yaml

languages:
  - pt,Português
  - en,English
  - es,Spanish

This data will be used to filter and show the stream /en.html /es.html, and the first of the list is the default so points to index.html


The original post in Portuguese ola-mundo.md

---
date: xxxx-xx-xx
slug: ola-mundo
translations:
  - en-hello-world
  - es-hola-mundo
---
# Olá Mundo

English hello-world.md

---
date: xxxx-xx-xx
slug: hello-world
stream: en
---
# Hello World

Spanish hola-mundo.md

---
date: xxxx-xx-xx
slug: hela-mundo
stream: es
---
# Hola Mundo

Those 3 files will generate

/ola-mundo.html -> listed on index /en-hello-world.md -> listed on /stream-en /es-hola-mundo.md -> listed on /stream-es


On Content there will be a translations field, so html can show links to en and es stream versions.

On the Menu it will be possible to ass stream-en and stream-es with the flags.