Varvara Stepanova
Varvara Stepanova

Reputation: 3569

Multilingual website with Metalsmith

I've tried different combinations of plugins for Melatsmith but still need help. Could you suggest how to transform structure like this:

src/
  pages/
    about/
      index_de.md
      index_en.md
    contact/
      index_de.md
      index_en.md
  posts/
    my-first-post/
      index_de.md
      index_en.md
    my-second-post/
      index_de.md
    my-third-post/
      index_en.md

Into:

build/
  de/
    pages/
      about/
        index.html
      contact/
        index.html
    posts/
      my-first-post/
        index.html
      my-second-post/
        index.html
  pages/                # english by default
    about/
      index.html
    contact/
      index.html
  posts/               # english by default
    my-first-post/
      index.html
    my-third-post/
      index.html

Unfortunately, in all the articles about multiple language in Metalsmith they have the locale folder in src already. In my version I don't want to have it, but instead provide different versions of .md files for every locale.

Upvotes: 3

Views: 260

Answers (0)

Related Questions