-
Notifications
You must be signed in to change notification settings - Fork 3
Objects
These values can be configured in config.lua.
The base part of the website's URL, e.g. http://www.example.com/.
The default layout pages will use. The default value is "page" (which corresponds to the file layouts/page.html).
The code for the language of the website, e.g. dk. (This doesn't do much yet, but will be used for i18n in the future.)
The title of the website.
A list of slugs that point to previous locations of the current page. Example:
{{
page.title = "New Improved Page"
page.aliases = {"/my-page/", "/some-archived-page/"}
}}
Note: Queries are not yet supported in aliases.
The contents of the current page. Available in layouts.
If the current page is a draft.
Drafts are excluded from the building process (unless the --drafts option is used).
If the current page is the root index page, aka the home page.
If the current page is an index page.
If the current page is in fact a page. This value is false for CSS files.
If the current page is some kind of special page.
Special pages are ignored by subpages().
Set this to true for e.g. 404 error pages.
What layout the page should use.
The default is the value of site.defaultLayout.
Table for storing any custom data you want.
The permanent URL to the current page.
What date the page is published (in local time).
If the date is in the future then the page is excluded from the build process.
Must have the format "YYYY-MM-DD hh:mm:ss".
The title of the current page. Each page should update this value.
The relative URL to the current page on the site.
Access data from the data folder.
Type e.g. data.cats to retrieve the contents of data/cats.lua.
See DATA_FILE_EXTENSIONS for supported data formats.
params or P
Table for storing any custom data you want. Short form for page.params.
- Home
- Command Line
- Site Configuration
- Embedding Lua
- Constants
- Functions
- Objects
- Other Modules and Information