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