diff --git a/_includes/snippets/default-pages.md b/_includes/snippets/default-pages.md new file mode 100644 index 000000000..3e2da92b3 --- /dev/null +++ b/_includes/snippets/default-pages.md @@ -0,0 +1,17 @@ +Folder default pages are **.md** files that will be treated as the index (default) page of the folder. + +Retype will search using the following case insensitive priority: + +1. `index.md` +2. `readme.md` +3. `default.md` +4. `welcome.md` *only in the project root + +Within a sub-folder, if you add a Markdown **.md** file with the exact same name as the folder name, Retype will also treat that `.md` as a default page. For instance, given the following basic project structure, the **/sample/sample.md** file will function as a default page for the folder. The result will be the same as though you named it **/sample/index.md**: + +``` +sample + |-- sample.md +readme.md +retype.yml +``` \ No newline at end of file diff --git a/configuration/page.md b/configuration/page.md index 6a2dae451..91f93d530 100644 --- a/configuration/page.md +++ b/configuration/page.md @@ -19,6 +19,10 @@ order: 100 This is a sample page demonstrating page metadata. ``` +## Default pages + +{{ include "snippets/default-pages.md" }} + ## Separate .yml file If you would prefer to keep the page metadata separated and placed outside of the **.md** content page, the config can be moved into a paired **.yml** file. diff --git a/configuration/reserved_words.md b/configuration/reserved_words.md index 969beffee..6ceb6a8b1 100644 --- a/configuration/reserved_words.md +++ b/configuration/reserved_words.md @@ -59,16 +59,7 @@ If you manually create a **CNAME** file within the root of the [input](/configur ### Default pages -Folder default pages are custom **.md** files that will be treated as the index page of the folder. - -Retype will search using the following case insensitive priority: - -1. `index.md` -2. `readme.md` -3. `default.md` -4. `welcome.md` *only in the project root - -For instance, creating a the file **docs/index.md** will create a custom page accessible from the path `https://example.com/docs/`. The **index.md** page instructs Retype to create an **index.html** file within the **docs/** folder. +{{ include "snippets/default-pages.md" }} ### Project config