kurtsson / jekyll-multiple-languages-plugin

I18n support for Jekyll and Octopress
MIT License
923 stars 201 forks source link

Exclude .md file from localization not working #157

Open alexandre1985 opened 4 years ago

alexandre1985 commented 4 years ago

My website has the portuguese (default: /) and english (/en/) languages. I want to have an page /hello/ only (and not /en/hello/ also).

So I created the hello.md file on the root path. This file has an front matter, and I want to keep the front-matter.

I want to /en/hello/ not to exist, and want to only exist /hello/ page. I cannot achieve this.

I have tried adding to _config.yml:

exclude_from_localizations: ["hello.md"]

does not work and I also tried another not so great hack/approach to put into hello.md's front-matter this:

---
layout: page
namespace: hello
permalink: /hello/
permalink_en: /hello/
---
test

Also it does not work.

I need help, and I believe this is a bug.

Cheers

UPDATE: In _config.yml I also have this:

permalink: pretty
alexandre1985 commented 4 years ago

A good way to deal with this would be to have the possibility to add an variable to the front-matter of the file that would make the plugin ignore the file. For example i18n: false