Template: header
Template: markdown
- 1. Introduction
- 2. Getting started
- 3. Content management
- Documents and collections
- Content types
- Relationships
- Front matter and data
- Markdown
- YAML types
- Partial content
- Environments
- 4. Pod functions
- 5. Templates
- 6. Localization
- 7. Plugins
- 8. Best practices
Referring to static files
Static files should always be loaded using an Amagaki function. By default,
static files can be placed in the /src/static/
folder, and then can be loaded
using the staticFile
Amagaki function.
file: !pod.staticFile /src/static/image.jpg
<img src="{{pod.staticFile('/src/static/image.jpg').url.path}}">
Avoid hardcoding paths to static files. When hardcoding paths, maintainability
is reduced, and itβs easier to make mistakes (i.e. typos that refer to files
that may not exist). Using the Amagaki functions also enables the features that
come with it β such as recording static file usage.
Template: footer