54 lines
1.3 KiB
Markdown
54 lines
1.3 KiB
Markdown
|
|
# Working with Metadata
|
|||
|
|
|
|||
|
|
Metadata provides structured information about your pages and controls how they display.
|
|||
|
|
|
|||
|
|
## What is metadata.ini?
|
|||
|
|
|
|||
|
|
Every folder can have a `metadata.ini` file that defines:
|
|||
|
|
|
|||
|
|
- Title (overrides automatic title extraction)
|
|||
|
|
- Date (overrides folder-based date detection)
|
|||
|
|
- Summary (appears in list views)
|
|||
|
|
- Custom template selection
|
|||
|
|
- Other custom fields
|
|||
|
|
|
|||
|
|
## Example metadata.ini
|
|||
|
|
|
|||
|
|
```ini
|
|||
|
|
title = "My Custom Title"
|
|||
|
|
date = "2024-11-20"
|
|||
|
|
summary = "A brief description that appears in lists"
|
|||
|
|
|
|||
|
|
[settings]
|
|||
|
|
page_template = "list-grid"
|
|||
|
|
show_date = false
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Common Use Cases
|
|||
|
|
|
|||
|
|
**Override automatic titles** – If you want a title different from the folder name.
|
|||
|
|
|
|||
|
|
**Set explicit dates** – When the folder name doesn't include a date.
|
|||
|
|
|
|||
|
|
**Add summaries** – Give context in list views without showing full content.
|
|||
|
|
|
|||
|
|
**Choose templates** – Different sections can use different list templates.
|
|||
|
|
|
|||
|
|
**Hide metadata** – Set `show_date = false` to hide dates in lists.
|
|||
|
|
|
|||
|
|
## Custom Fields
|
|||
|
|
|
|||
|
|
You can add any fields you want:
|
|||
|
|
|
|||
|
|
```ini
|
|||
|
|
author = "Jane Doe"
|
|||
|
|
category = "Tutorial"
|
|||
|
|
tags = "metadata, configuration, tutorial"
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
Then access them in custom templates via `$metadata['author']`.
|
|||
|
|
|
|||
|
|
## This Page's Metadata
|
|||
|
|
|
|||
|
|
Check out `metadata.ini` in this folder to see how the title, date, and summary are defined.
|