Update docs.md

This commit is contained in:
akp 2025-02-07 12:56:23 +00:00
parent 1f0db03da3
commit a87d8c9eb6
No known key found for this signature in database
GPG key ID: CF8D58F3DEB20755

12
docs.md
View file

@ -2,11 +2,13 @@
## Content templating
The `site/content` directory will be walked with any files and directories starting with `_` being ignored. Filenames should not have any dots (`.`) in them apart rom those separating the file name and extension(s) as this will interfere with processing.
The `site/content` directory will be walked with any files and directories starting with `_` being ignored. Files included in templates (eg. `site/content/_layouts/*`) are except from this and can be accessed via Jinja.
Filenames should not have any dots (`.`) in them apart from those separating the file name and extension as this may interfere with processing.
* `*.html` files will be templated
* `*.md` files will be rendered to HTML then wrapped in HTML boilerplate
* other files will be copied directly to the output.
* other files, or files with the above types that do not have valid YAML frontmatter, will be copied directly to the output.
When being templated, files are executed with the following context:
@ -36,7 +38,7 @@ Some frontmatter keys that are treated specially are:
The `site/blog` directory will be walked with any files and directories starting with `_` being ignored.
`*.md` files will be templated and rendered using the `site/content/_layouts/blog_post.html` template using the frontmatter below; other files will be copied directly to the output.
`*.md` files will be templated and rendered using the `site/content/_layouts/blog/post.html` template using the frontmatter below; other files will be copied directly to the output.
The filename of the Markdown file will be used as the slug of the post. If the filename is `content.md`, the name of the parent directory of the file will be used as the post slug.
@ -57,7 +59,7 @@ Some frontmatter keys that are treated specially are:
* `description`: the post description
* `imageURL`: the URL of an image to be used in the page's metadata
* `publishedDate`: **required**, date in the form `YYYY-MM-DD`
* `updatedDate`: a list of dates in the form `YYYY-MM-DD`
* `updatedDate`: a list of dates in the form `YYYY-MM-DD`. These are sorted in descending order before being passed to templates.
* `hidden`: a boolean value, omits the post from the listing and feeds if true
* `tags`: a list of tags that can be applied to a post
@ -73,7 +75,7 @@ The rendering code has been extended to support variable header level increases
Redirects are defined in a `redirects.yml` file in the site's base directory. Its internal structure should be an array of objects like this:
```yml
```yaml
- from: "/tools/maths"
to: "/tools/mathsEditor"
code: 301