site.data)Data files under /.lunet/data/ are loaded into site.data before content processing begins, making them available in config.scriban, layouts, includes, and page templates.
| Format | Extension | Module |
|---|---|---|
| YAML | .yml, .yaml |
YAML module |
| JSON | .json |
JSON module |
| TOML | .toml |
TOML module |
Create /.lunet/data/project.yml:
name: Lunet
url: "https://github.com/xoofx/lunet"
stars: 123
Use it in a page or layout:
site.data.project.name
site.data.project.stars
Subdirectories create nested objects:
/.lunet/data/
project.yml → site.data.project
blog/
tags.yml → site.data.blog.tags
site.data container and loading mechanism