Skip to content

v0.1.0 Release

Pre-release
Pre-release

Choose a tag to compare

@TimboKZ TimboKZ released this 13 Nov 18:55

Refer to the official changelog for more info.

  • Added hash to Pug locals available on every page. It's generated randomly every time blitz build is 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 index page ID by default, available via url('index') in Pug. It points to the website root directory if
    explicit_html_extensions is set to false or to root index.html file 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 using url(<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 template property of directories specified in child_directories optional. 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_pages and child_directories to 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, use named_child_pages and named_child_directories.

  • Fixed order of menu items. Now items should appear in the same order as they were defined in the config.