v0.1.0 Release
Pre-releaseRefer to the official changelog for more info.
-
Added
hashto Pug locals available on every page. It's generated randomly every timeblitz buildis run, and can
be used to bypass browser's cache, like so:link(rel='stylesheet', href=asset('style.css?' + hash)) //- Will force browser to ignore cache and download the file again, result: //- <link rel="stylesheet" href="/assets/style.css?kNP2xjPl5Atk">
-
Added
url()function to Pug locals. If called with no arguments, it returns the URL of the current page. Accepts
page ID as the only argument, more about it below. -
Added
indexpage ID by default, available viaurl('index')in Pug. It points to the website root directory if
explicit_html_extensionsis set to false or to rootindex.htmlfile otherwise. It's useful for Home/Index links.
Keep in mind that index is produced regardless of whether the index page exists or not. This ID can be overwritten
from the config. -
Added page IDs to the config and the
url()function to Pug locals. Now, you can specify an ID for a page and then
reference it in your templates usingurl(<id>). Consider the example below:# In the config: pages: # ... - uri: '/docs' id: 'docs' # ...
//- Somewhere in your Pug template: a(href=url(docs))= 'Link to documentation'
-
Made the
templateproperty of directories specified inchild_directoriesoptional. If it is not present, no files
will be generated. This is useful if you just want to pass the content from all files in a directory without actually
creating the pages. -
Added
child_pagesandchild_directoriesto Pug locals. Contain all named child pages and all named child directories
respectively. Since both are arrays, one could iterate over them to retrieve content. If you're looking for an object that has all pages and directories named, usenamed_child_pagesandnamed_child_directories. -
Fixed order of menu items. Now items should appear in the same order as they were defined in the config.