index.md as default language, i18n multiple_files #394
-
Is it possible to have the index.md file as the default language/locale for multiple languages?
I am using zola SSG, zola uses index.md as default language : https://www.getzola.org/documentation/content/multilingual/#content And here is the config.yml that I use backend:
name: github
repo: github/github
branch: master # Branch to update (optional; defaults to master)
base_url:
publish_mode: simple
media_folder: "static/uploads" # Media files will be stored in the repo under static/images/uploads
public_folder: "/uploads" # The src attribute for uploaded media will begin with /images/uploads
show_preview_links: false
slug:
encoding: "ascii"
clean_accents: true
collections:
- name: posts
label: Posts
label_singular: "Post"
folder: content/posts
create: true
delete: false
path: "{{slug}}/index"
media_folder: ""
public_folder: ""
extension: "md"
format: "toml-frontmatter"
slug: "{{slug}}"
editor:
preview: false
fields:
- label: "Title"
name: "title"
widget: "string"
- label: "Description"
name: "description"
widget: "text"
required: true
- label: "Publish Date"
name: "date"
widget: "datetime"
default: "{{now}}"
date_format: "YYYY-MM-DD" # e.g. 2001-02-22
time_format: "HH:mm:ss" # e.g. 21:07:22
picker_utc: false
required: false
- label: "Updated Date"
name: "updated"
widget: "datetime"
default: "{{now}}"
date_format: "YYYY-MM-DD" # e.g. 2001-02-22
time_format: "HH:mm:ss" # e.g. 21:07:22
picker_utc: false
required: false
- label: "Extra"
name: "extra"
widget: "object"
collapsed: false
summary: "Feature Image & Featured"
fields:
- label: "Feature Image"
name: "feature_image"
widget: "image"
required: true
choose_url: false
allow_multiple: false
- label: "Image caption"
name: "feature_image_caption"
widget: "string"
required: false
- label: "Featured"
name: "featured"
widget: "boolean"
default: false
- label: "Related"
name: "related"
widget: "string"
required: false
- label: "Taxonomies"
name: "taxonomies"
widget: "object"
collapsed: false
summary: "Tag & Author"
fields:
- lable: "Tag"
name: "tag"
widget: "select"
multiple: true
min: 1
max: 3
required: true
options: ["a", "b", "c", "d", "e", "f"]
- lable: "Author"
name: "author"
widget: "select"
required: true
multiple: true
options: ["a", "b"]
- label: "Posts content"
name: "body"
widget: "markdown"
required: true
summary: "{{title}}" |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
The short answer is no. With the I could add an option to deal with this use case. However, the document says
So, in my understanding, you can omit the default language code in the file name but having the default language in the file name won’t cause any problems if the |
Beta Was this translation helpful? Give feedback.
-
Added the new i18n:
structure: multiple_files
locales: [id, en, ja, de]
omit_default_locale_from_filename: true |
Beta Was this translation helpful? Give feedback.
Added the new
omit_default_locale_from_filename
option in v0.75.0. Usage: