kurtsson / jekyll-multiple-languages-plugin

I18n support for Jekyll and Octopress
MIT License
922 stars 203 forks source link

build errors in 'jekyll serve' leave state #190

Open knarrff opened 3 years ago

knarrff commented 3 years ago

I locally serve a site using jekyll serve. This works well, until I happen to save something that produces an error, like for instance a missing file for a translation:

Liquid Exception: Included file 'team.md' not found in /www/_i18n/de directory in team.md

As expected, jekyll doesn't stop, but after the next change (fixing the error) serves pages again. However, where it first created files in '/de/':

Building site for language: "de" to: /www/_site/de
Building site for language: "de" to: /www/_site/en

it now starts to create files in '/de/de':

Building site for language: "de" to: /www/_site/de/de
Building site for language: "de" to: /www/_site/de/en

Each subsequent cycle of 'error -> error fixed' adds another language prefix, inside one of the languages (I guess the one the error occurred in), e.g.:

.
├── de
│   ├── de
│   │   ├── de
│   │   │   └── team.html
│   │   ├── en
│   │   │   └── team.html
│   │   └── team.html
│   ├── en
│   │   └── team.html
│   └── team.html
└── en
    └── team.html

It is only my guess that whenever jekyl serve hits the error, some state (the current directory level) is still remembered and not reset whenever the error later is cleared.