mirror of
https://git.sr.ht/~adnano/kiln
synced 2024-10-30 09:23:09 +00:00
docs: Improve page documentation
This commit is contained in:
parent
597671cb6b
commit
4332703fb5
|
@ -43,21 +43,26 @@ The following directories are common to all tasks:
|
||||||
| templates/
|
| templates/
|
||||||
: Templates directory
|
: Templates directory
|
||||||
|
|
||||||
|
The basic unit of a kiln site is the *page*. Each page either represents a
|
||||||
|
content file or a subdirectory containing other pages. Pages may be
|
||||||
|
preprocessed, run through templates, and postprocessed (in that order). Each
|
||||||
|
operation takes the output of the last operation as input.
|
||||||
|
|
||||||
# CONTENT DIRECTORY
|
# CONTENT DIRECTORY
|
||||||
|
|
||||||
The content directory contains site content files, called *pages*, optionally
|
The content directory contains site content files which can be nested in
|
||||||
nested in subdirectories. Any file or directory in the content directory whose
|
subdirectories. Any file or directory in the content directory whose name begins
|
||||||
name begins with "\_" will be ignored, with the exception of pages with the name
|
with "\_" will be ignored, with the exception of files with the name "\_index"
|
||||||
"\_index" (e.g. "\_index.gmi").
|
(e.g. "\_index.gmi").
|
||||||
|
|
||||||
Pages may be preprocessed, run through templates, and postprocessed (in that
|
Content files can specify dates in their filenames. For example, the file
|
||||||
order). Each operation takes the output of the last operation as input.
|
content/2020-11-20-Hello-world.gmi will result in a page with a path of
|
||||||
|
/Hello-world/ and a date of November 20, 2020.
|
||||||
|
|
||||||
Pages can specify dates in their filenames. For example, the page
|
Files with the name "\_index" are treated specially. They can be used to provide
|
||||||
content/2020-11-20-Hello-world.gmi will have a path of /Hello-world/ and a date
|
frontmatter and content for the parent directory which will otherwise have none.
|
||||||
of November 20, 2020.
|
If an "\_index" file is present in a directory, an index page (e.g. "index.gmi")
|
||||||
|
for that directory will be generated and written to the output directory.
|
||||||
Pages with the name "\_index" are index pages and are treated specially.
|
|
||||||
|
|
||||||
## FRONTMATTER
|
## FRONTMATTER
|
||||||
|
|
||||||
|
@ -665,7 +670,7 @@ Page templates are provided with the following data:
|
||||||
*Path*.
|
*Path*.
|
||||||
|
|
||||||
*FilePath*
|
*FilePath*
|
||||||
The path of the page file relative to the content directory
|
The path of the page file or directory relative to the content directory
|
||||||
|
|
||||||
*Content*
|
*Content*
|
||||||
The contents of the page
|
The contents of the page
|
||||||
|
@ -674,16 +679,16 @@ Page templates are provided with the following data:
|
||||||
Extra parameters specified in frontmatter
|
Extra parameters specified in frontmatter
|
||||||
|
|
||||||
*Prev*
|
*Prev*
|
||||||
The previous page in this directory
|
The previous page in sorted order
|
||||||
|
|
||||||
*Next*
|
*Next*
|
||||||
The next page in this directory
|
The next page in sorted order
|
||||||
|
|
||||||
*Pages*
|
*Pages*
|
||||||
List of pages in this directory. This is only populated for index pages.
|
List of pages in this directory
|
||||||
|
|
||||||
*Dirs*
|
*Dirs*
|
||||||
List of subdirectories. This is only populated for index pages.
|
List of subdirectories in this directory
|
||||||
|
|
||||||
## FEED TEMPLATES
|
## FEED TEMPLATES
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue