Creating Partials
Partials are created as regular markdown files in your project structure. To create a partial, click the + button in the sidebar of a project and select “New Partial”. Then add the content you want to reuse to the partial.Referencing Partials
Reference partials in your markdown by using the{% partial %}
tag.
/partial
.
Partials can be organized in directories just like regular pages. The path becomes the identifier used to reference the partial
Naming Conventions
Partials should be named usingsnake_case
as this makes referencing straightforward.
Variables
Partials have an isolated scope for variables. They can be defined in frontmatter, or passed as variables.Frontmatter
Partials can define their own variables using frontmatter at the top of the partial file:Passing Variables
You can pass variables to partials when referencing them. Variables of the same name will override those defined in the partial’s frontmatter.Scoping Rules
- Isolation: Partials cannot access variables from the parent page unless explicitly passed
- Precedence: Passed variables take precedence over frontmatter variables
- Fallback: If no variable is provided, the partial uses its frontmatter variable