-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hugo's translationKey support for i18n paths #4645
Comments
Could the solution to this be another I would use it something like this: ...
i18n:
structure: hugo # or something
locales: [en, fr]
collections:
- name: 'resources'
label: 'Resources'
folder: 'content/{{locale}}/resources' # or something
i18n: true
create: true
# I removed nested here
fields:
- { label: 'Title', name: 'title', i18n: true, widget: 'string' }
- ... Content structure
@erezrokah I hope this is possible |
For the time being, I reverted to a flat file system, but would still like a solution for i18n paths. |
You can just write multiple_folders or multiple_files or single_file on "structure"... Something else will return an error...🤗 |
@haroldao I know, it's a proposal of what could be possible :) |
Okay😉 |
Is your feature request related to a problem? Please describe.
I'm trying to find a way to get netlify-cms to understand French/English page pairs in different subfolders. I'm working with Hugo, and the way they handle translation of paths is to provide a translationKey frontmatter field that links two pages in differently named folders.
Given the following file structure:
with frontmatter for the en one like:
vs the fr one:
and the following netlify-cms config.yml:
Netlify-cms sees them as unrelated pages:
and
Likewise when creating content. I fill out the English and French sides of the editor, adding different path values, and get pages with this kind of frontmatter:
src/content/en/covid-19.md
and
src/content/en/covid-19.md
(not sure why description doesn't show up in the French file, but that's another issue).
The
{{slug}}
part isn't being resolved as expected. I'd expect to see covid there.Describe the solution you'd like
I'd like to see 2 things:
{{slug}}
.The text was updated successfully, but these errors were encountered: