Coricamu

_module.args

Type
lazy attribute set of raw value

Additional arguments passed to each module in addition to ones like lib, config, and pkgs, modulesPath.

This option is also available to all submodules. Submodules do not inherit args from their parent module, nor do they provide args to their parent module or sibling submodules. The sole exception to this is the argument name which is provided by parent modules to a submodule and contains the attribute name the submodule is bound to, or a unique generated name if it is not bound to an attribute.

Some arguments are already passed by default, of which the following cannot be changed with this option:

For NixOS, the default value for this option includes at least this argument:

baseUrl

Type
URL ending with /
Example
"https://example.com/"

URL of the root of your website.

All links will be relative to this URL, not the the page they are found on. Linking to index.html from a subdirectory of your site will link to index.html at the root, not index.html within that subdirectory as you might expect.

This is done so that sites can be hosted from a subdirectory of the domain, as is the case on GitHub Pages, while still having a way to make links relative to the site root. It also means that the path option of pages is exactly how you link to them, which is handy.

files

Type
attribute set of path or package convertible to it
Default
{ }

Attribute set containing files by path.

footer

Type
submodule
Default
{ }
Example
{ html }

Footer inserted after the body of every page.

footer.docbook

Type
null or strings concatenated with "\n"
Default
null
Example
''
  <title>Contact Us</title>
  <para>You can reach us by contacting any of the following people:</para>
  <itemizedlist>
    <listitem><para>Jane Doe</para></listitem>
    <listitem><para>John Doe</para></listitem>
  </itemizedlist>
''

DocBook content.

footer.docbookFile

Type
null or path or package convertible to it
Default
null
Example
"./example.xml"

A file containing DocBook.

footer.html

Type
null or strings concatenated with "\n"
Default
null
Example
''
  <h1>Contact Us</h1>
  <p>You can reach us by contacting any of the following people:</p>
  <ul>
    <li><templates-user id="12345">Jane Doe</templates-user></li>
    <li><templates-user id="67890">John Doe</templates-user></li>
  </ul>
''

HTML content.

May contain templates-«name» tags which will call the corresponding template. HTML attributes (if present) will be passed to the template as an attribute set, along with any HTML inside the tag as the contents attribute.

footer.htmlFile

Type
null or path or package convertible to it
Default
null
Example
"./example.html"

A file containing HTML.

May contain templates-«name» tags which will call the corresponding template. HTML attributes (if present) will be passed to the template as an attribute set, along with any HTML inside the tag as the contents attribute.

footer.markdown

Type
null or strings concatenated with "\n"
Default
null
Example
''
  # Contact Us
  
  You can reach us by contacting any of the following people:
  
  - <templates-user id="12345">Jane Doe</templates.user>
  - <templates-user id="67890">John Doe</templates.user>
''

Markdown content.

May contain templates.«name» HTML tags in places where Markdown allows embedded HTML. This will call the corresponding template. HTML attributes (if present) will be passed to the template as an attribute set, along with any converted Markdown inside the tag as the contents attribute. Template tags are not guaranteed to work in all places when using Markdown - if you need more flexibility, consider writing in pure HTML instead.

This uses MultiMarkdown, which is an extension to the common Markdown syntax. A full cheat sheet can be found on the MultiMarkdown website.

footer.markdownFile

Type
null or path or package convertible to it
Default
null
Example
"./example.md"

A file containing Markdown.

May contain templates.«name» HTML tags in places where Markdown allows embedded HTML. This will call the corresponding template. HTML attributes (if present) will be passed to the template as an attribute set, along with any converted Markdown inside the tag as the contents attribute. Template tags are not guaranteed to work in all places when using Markdown - if you need more flexibility, consider writing in pure HTML instead.

This uses MultiMarkdown, which is an extension to the common Markdown syntax. A full cheat sheet can be found on the MultiMarkdown website.

head

Type
strings concatenated with "\n"
Default
""
Example
''
  <link rel="icon" href="icon.svg">
''

HTML head shared by all pages.

Much of the head can be generated automatically based on other options. You should check if a more specific option is available before using this!

header

Type
submodule
Default

Heading containing siteTitle, with a link to index.html.

Example
{ html }

Header inserted before the body of every page.

header.docbook

Type
null or strings concatenated with "\n"
Default
null
Example
''
  <title>Contact Us</title>
  <para>You can reach us by contacting any of the following people:</para>
  <itemizedlist>
    <listitem><para>Jane Doe</para></listitem>
    <listitem><para>John Doe</para></listitem>
  </itemizedlist>
''

DocBook content.

header.docbookFile

Type
null or path or package convertible to it
Default
null
Example
"./example.xml"

A file containing DocBook.

header.html

Type
null or strings concatenated with "\n"
Default
null
Example
''
  <h1>Contact Us</h1>
  <p>You can reach us by contacting any of the following people:</p>
  <ul>
    <li><templates-user id="12345">Jane Doe</templates-user></li>
    <li><templates-user id="67890">John Doe</templates-user></li>
  </ul>
''

HTML content.

May contain templates-«name» tags which will call the corresponding template. HTML attributes (if present) will be passed to the template as an attribute set, along with any HTML inside the tag as the contents attribute.

header.htmlFile

Type
null or path or package convertible to it
Default
null
Example
"./example.html"

A file containing HTML.

May contain templates-«name» tags which will call the corresponding template. HTML attributes (if present) will be passed to the template as an attribute set, along with any HTML inside the tag as the contents attribute.

header.markdown

Type
null or strings concatenated with "\n"
Default
null
Example
''
  # Contact Us
  
  You can reach us by contacting any of the following people:
  
  - <templates-user id="12345">Jane Doe</templates.user>
  - <templates-user id="67890">John Doe</templates.user>
''

Markdown content.

May contain templates.«name» HTML tags in places where Markdown allows embedded HTML. This will call the corresponding template. HTML attributes (if present) will be passed to the template as an attribute set, along with any converted Markdown inside the tag as the contents attribute. Template tags are not guaranteed to work in all places when using Markdown - if you need more flexibility, consider writing in pure HTML instead.

This uses MultiMarkdown, which is an extension to the common Markdown syntax. A full cheat sheet can be found on the MultiMarkdown website.

header.markdownFile

Type
null or path or package convertible to it
Default
null
Example
"./example.md"

A file containing Markdown.

May contain templates.«name» HTML tags in places where Markdown allows embedded HTML. This will call the corresponding template. HTML attributes (if present) will be passed to the template as an attribute set, along with any converted Markdown inside the tag as the contents attribute. Template tags are not guaranteed to work in all places when using Markdown - if you need more flexibility, consider writing in pure HTML instead.

This uses MultiMarkdown, which is an extension to the common Markdown syntax. A full cheat sheet can be found on the MultiMarkdown website.

images

Type
list of submodule
Default
[]

List of images available to all pages.

images.*.file

Type
path or package convertible to it

The image.

images.*.path

Type
string matching the pattern .+\.webp

Path of the optimised image relative to the root URL.

language

Type
BCP 47 Language-Region code
Example
"en-us"

Language the website is written in.

meta

Type
attribute set of string
Default
{ }

HTML metadata shared by all pages.

Each key-value pair in this attribute set will be transformed into a corresponding HTML meta element with name set to the attribute name and content set to the attribute value.

Note: there is also an option to set metadata for a particular page.

minified

Type
boolean
Default
true

Whether to minify files in the output.

pages

Type
list of submodule or attribute set convertible to it
Default
[]

List of all posts.

pages.*.body

Type
submodule
Example
{ markdown }

Main content of the page.

pages.*.body.docbook

Type
null or strings concatenated with "\n"
Default
null
Example
''
  <title>Contact Us</title>
  <para>You can reach us by contacting any of the following people:</para>
  <itemizedlist>
    <listitem><para>Jane Doe</para></listitem>
    <listitem><para>John Doe</para></listitem>
  </itemizedlist>
''

DocBook content.

pages.*.body.docbookFile

Type
null or path or package convertible to it
Default
null
Example
"./example.xml"

A file containing DocBook.

pages.*.body.html

Type
null or strings concatenated with "\n"
Default
null
Example
''
  <h1>Contact Us</h1>
  <p>You can reach us by contacting any of the following people:</p>
  <ul>
    <li><templates-user id="12345">Jane Doe</templates-user></li>
    <li><templates-user id="67890">John Doe</templates-user></li>
  </ul>
''

HTML content.

May contain templates-«name» tags which will call the corresponding template. HTML attributes (if present) will be passed to the template as an attribute set, along with any HTML inside the tag as the contents attribute.

pages.*.body.htmlFile

Type
null or path or package convertible to it
Default
null
Example
"./example.html"

A file containing HTML.

May contain templates-«name» tags which will call the corresponding template. HTML attributes (if present) will be passed to the template as an attribute set, along with any HTML inside the tag as the contents attribute.

pages.*.body.markdown

Type
null or strings concatenated with "\n"
Default
null
Example
''
  # Contact Us
  
  You can reach us by contacting any of the following people:
  
  - <templates-user id="12345">Jane Doe</templates.user>
  - <templates-user id="67890">John Doe</templates.user>
''

Markdown content.

May contain templates.«name» HTML tags in places where Markdown allows embedded HTML. This will call the corresponding template. HTML attributes (if present) will be passed to the template as an attribute set, along with any converted Markdown inside the tag as the contents attribute. Template tags are not guaranteed to work in all places when using Markdown - if you need more flexibility, consider writing in pure HTML instead.

This uses MultiMarkdown, which is an extension to the common Markdown syntax. A full cheat sheet can be found on the MultiMarkdown website.

pages.*.body.markdownFile

Type
null or path or package convertible to it
Default
null
Example
"./example.md"

A file containing Markdown.

May contain templates.«name» HTML tags in places where Markdown allows embedded HTML. This will call the corresponding template. HTML attributes (if present) will be passed to the template as an attribute set, along with any converted Markdown inside the tag as the contents attribute. Template tags are not guaranteed to work in all places when using Markdown - if you need more flexibility, consider writing in pure HTML instead.

This uses MultiMarkdown, which is an extension to the common Markdown syntax. A full cheat sheet can be found on the MultiMarkdown website.

pages.*.files

Type
attribute set of path or package convertible to it
Default
{ }

Attribute set containing files by path.

pages.*.head

Type
strings concatenated with "\n"
Default
""
Example
''
  <script type="text/javascript" src="https://example.com/externalscript.js" />
''

HTML head of the page.

Much of the head can be generated automatically based on other options. You should check if a more specific option is available before using this!

pages.*.images

Type
list of submodule
Default
[]

List of images available to all pages.

pages.*.images.*.file

Type
path or package convertible to it

The image.

pages.*.images.*.path

Type
string matching the pattern .+\.webp

Path of the optimised image relative to the root URL.

pages.*.meta

Type
attribute set of string
Default
{ }

HTML metadata for this page.

Each key-value pair in this attribute set will be transformed into a corresponding HTML meta element with name set to the attribute name and content set to the attribute value.

Note: there is also an option to set metadata shared between all pages.

pages.*.path

Type
string matching the pattern .*\.html

Path of the page relative to the root URL.

pages.*.scripts

Type
list of submodule
Default
[]

List of JavaScript files included in all pages.

pages.*.scripts.*.defer

Type
boolean
Default
false

Wait until the document has finished loading before running this script.

pages.*.scripts.*.javascript

Type
null or strings concatenated with "\n"
Default
null

JavaScript code.

pages.*.scripts.*.javascriptFile

Type
null or path or package convertible to it
Default
null

JavaScript code as a file.

pages.*.scripts.*.path

Type
string matching the pattern .*\.js

Path of the script relative to the root URL.

pages.*.sitemap.changeFrequency

Type
null or one of "hourly", "daily", "weekly", "monthly", "yearly", "never"
Default
null

How often this page is likely to be edited.

This value may influence how often search engines will crawl your page.

pages.*.sitemap.included

Type
boolean
Default

True unless meta.robots == "noindex".

Example
false

Whether to include this page in the sitemap.

pages.*.sitemap.lastModified

Type
null or string matching the pattern [0-9]{4}-[0-9]{2}-[0-9]{2}
Default
null
Example
"2022-01-30"

Date this page was last modified.

pages.*.sitemap.priority

Type
string matching the pattern (0\.[0-9]+|1\.0+)
Default
"0.5"
Example
"1.0"

Priority of this page compared to other pages on your site.

This value may influence the order in which search engines index your pages (so that higher priority pages are checked sooner / more often). It is unlikely to affect your position in search results.

This is a decimal number between 0 and 1, stored as a string.

pages.*.styles

Type
list of submodule or attribute set convertible to it
Default
[]

Attribute set of CSS styles included in all pages.

pages.*.styles.*.css

Type
null or strings concatenated with "\n"
Default
null

CSS code.

pages.*.styles.*.cssFile

Type
null or path or package convertible to it
Default
null

CSS code as a file.

pages.*.styles.*.path

Type
string matching the pattern .*\.css

Path of the style sheet relative to the root URL.

pages.*.styles.*.sass

Type
null or strings concatenated with "\n"
Default
null

Sass style sheet.

This will be automatically converted to CSS.

pages.*.styles.*.sassFile

Type
null or path or package convertible to it
Default
null

Sass style sheet as a file.

This will be automatically converted to CSS.

pages.*.styles.*.scss

Type
null or strings concatenated with "\n"
Default
null

SCSS style sheet.

This will be automatically converted to CSS.

pages.*.styles.*.scssFile

Type
null or path or package convertible to it
Default
null

SCSS style sheet as a file.

This will be automatically converted to CSS.

pages.*.title

Type
string

Title of the page.

posts

Type
list of submodule
Default
[]

List of all posts.

posts.*.authors

Type
list of string
Example
[ "John Doe", … ]

Names of the author(s) of this post.

posts.*.body

Type
submodule
Example
{ markdown }

Main post content.

posts.*.body.docbook

Type
null or strings concatenated with "\n"
Default
null
Example
''
  <title>Contact Us</title>
  <para>You can reach us by contacting any of the following people:</para>
  <itemizedlist>
    <listitem><para>Jane Doe</para></listitem>
    <listitem><para>John Doe</para></listitem>
  </itemizedlist>
''

DocBook content.

posts.*.body.docbookFile

Type
null or path or package convertible to it
Default
null
Example
"./example.xml"

A file containing DocBook.

posts.*.body.html

Type
null or strings concatenated with "\n"
Default
null
Example
''
  <h1>Contact Us</h1>
  <p>You can reach us by contacting any of the following people:</p>
  <ul>
    <li><templates-user id="12345">Jane Doe</templates-user></li>
    <li><templates-user id="67890">John Doe</templates-user></li>
  </ul>
''

HTML content.

May contain templates-«name» tags which will call the corresponding template. HTML attributes (if present) will be passed to the template as an attribute set, along with any HTML inside the tag as the contents attribute.

posts.*.body.htmlFile

Type
null or path or package convertible to it
Default
null
Example
"./example.html"

A file containing HTML.

May contain templates-«name» tags which will call the corresponding template. HTML attributes (if present) will be passed to the template as an attribute set, along with any HTML inside the tag as the contents attribute.

posts.*.body.markdown

Type
null or strings concatenated with "\n"
Default
null
Example
''
  # Contact Us
  
  You can reach us by contacting any of the following people:
  
  - <templates-user id="12345">Jane Doe</templates.user>
  - <templates-user id="67890">John Doe</templates.user>
''

Markdown content.

May contain templates.«name» HTML tags in places where Markdown allows embedded HTML. This will call the corresponding template. HTML attributes (if present) will be passed to the template as an attribute set, along with any converted Markdown inside the tag as the contents attribute. Template tags are not guaranteed to work in all places when using Markdown - if you need more flexibility, consider writing in pure HTML instead.

This uses MultiMarkdown, which is an extension to the common Markdown syntax. A full cheat sheet can be found on the MultiMarkdown website.

posts.*.body.markdownFile

Type
null or path or package convertible to it
Default
null
Example
"./example.md"

A file containing Markdown.

May contain templates.«name» HTML tags in places where Markdown allows embedded HTML. This will call the corresponding template. HTML attributes (if present) will be passed to the template as an attribute set, along with any converted Markdown inside the tag as the contents attribute. Template tags are not guaranteed to work in all places when using Markdown - if you need more flexibility, consider writing in pure HTML instead.

This uses MultiMarkdown, which is an extension to the common Markdown syntax. A full cheat sheet can be found on the MultiMarkdown website.

posts.*.datetime

Type
YYYY-MM-DDThh:mm:ssTZD
Example
"2022-01-31 20:10:05"

Date and time of this post.

posts.*.edited

Type
null or YYYY-MM-DDThh:mm:ssTZD
Default
null
Example
"2022-03-10 07:50:40"

Date and time this post was last edited.

posts.*.page

Type
unspecified
Example
{ meta }

Main page definition for this post.

Can be used to set any page settings which aren't automatically filled.

posts.*.sections

Type
list of string
Default
[]
Example
[ "lorem", … ]

Categories used to organise posts and assist browsing.

posts.*.slug

Type
string matching the pattern [a-z0-9_]+
Default

Generated from the post title.

Example
"lorem_ipsum"

Simplified title suitable for use as a file name.

posts.*.title

Type
string
Example
"Lorem Ipsum"

Title of the post.

scripts

Type
list of submodule
Default
[]

List of JavaScript files included in all pages.

scripts.*.defer

Type
boolean
Default
false

Wait until the document has finished loading before running this script.

scripts.*.javascript

Type
null or strings concatenated with "\n"
Default
null

JavaScript code.

scripts.*.javascriptFile

Type
null or path or package convertible to it
Default
null

JavaScript code as a file.

scripts.*.path

Type
string matching the pattern .*\.js

Path of the script relative to the root URL.

siteTitle

Type
string
Default

Generated by removing special characters from baseUrl.

Example
"Example Site"

A short name for your website.

styles

Type
list of submodule or attribute set convertible to it
Default

Basic style sheet bundled with Coricamu.

Attribute set of CSS styles included in all pages.

styles.*.css

Type
null or strings concatenated with "\n"
Default
null

CSS code.

styles.*.cssFile

Type
null or path or package convertible to it
Default
null

CSS code as a file.

styles.*.path

Type
string matching the pattern .*\.css

Path of the style sheet relative to the root URL.

styles.*.sass

Type
null or strings concatenated with "\n"
Default
null

Sass style sheet.

This will be automatically converted to CSS.

styles.*.sassFile

Type
null or path or package convertible to it
Default
null

Sass style sheet as a file.

This will be automatically converted to CSS.

styles.*.scss

Type
null or strings concatenated with "\n"
Default
null

SCSS style sheet.

This will be automatically converted to CSS.

styles.*.scssFile

Type
null or path or package convertible to it
Default
null

SCSS style sheet as a file.

This will be automatically converted to CSS.

templates

Type
attribute set of submodule or function that evaluates to a(n) strings concatenated with "\n" convertible to it
Default
{ }

Attribute set of template functions.

Note that because HTML tags are case-insensitive, template names will also be case-insensitive when used via template tags.

templates.<name>.files

Type
attribute set of path or package convertible to it
Default
{ }

Attribute set containing files by path.

templates.<name>.function

Type
function that evaluates to a(n) strings concatenated with "\n"

Function which produces a string of HTML.

templates.<name>.head

Type
strings concatenated with "\n"
Default
""
Example
''
  <script type="text/javascript" src="https://example.com/externalscript.js" />
''

HTML head of the page.

Much of the head can be generated automatically based on other options. You should check if a more specific option is available before using this!

templates.<name>.images

Type
list of submodule
Default
[]

List of images available to all pages.

templates.<name>.images.*.file

Type
path or package convertible to it

The image.

templates.<name>.images.*.path

Type
string matching the pattern .+\.webp

Path of the optimised image relative to the root URL.

templates.<name>.meta

Type
attribute set of string
Default
{ }

HTML metadata for this page.

Each key-value pair in this attribute set will be transformed into a corresponding HTML meta element with name set to the attribute name and content set to the attribute value.

Note: there is also an option to set metadata shared between all pages.

templates.<name>.scripts

Type
list of submodule
Default
[]

List of JavaScript files included in all pages.

templates.<name>.scripts.*.defer

Type
boolean
Default
false

Wait until the document has finished loading before running this script.

templates.<name>.scripts.*.javascript

Type
null or strings concatenated with "\n"
Default
null

JavaScript code.

templates.<name>.scripts.*.javascriptFile

Type
null or path or package convertible to it
Default
null

JavaScript code as a file.

templates.<name>.scripts.*.path

Type
string matching the pattern .*\.js

Path of the script relative to the root URL.

templates.<name>.styles

Type
list of submodule or attribute set convertible to it
Default
[]

Attribute set of CSS styles included in all pages.

templates.<name>.styles.*.css

Type
null or strings concatenated with "\n"
Default
null

CSS code.

templates.<name>.styles.*.cssFile

Type
null or path or package convertible to it
Default
null

CSS code as a file.

templates.<name>.styles.*.path

Type
string matching the pattern .*\.css

Path of the style sheet relative to the root URL.

templates.<name>.styles.*.sass

Type
null or strings concatenated with "\n"
Default
null

Sass style sheet.

This will be automatically converted to CSS.

templates.<name>.styles.*.sassFile

Type
null or path or package convertible to it
Default
null

Sass style sheet as a file.

This will be automatically converted to CSS.

templates.<name>.styles.*.scss

Type
null or strings concatenated with "\n"
Default
null

SCSS style sheet.

This will be automatically converted to CSS.

templates.<name>.styles.*.scssFile

Type
null or path or package convertible to it
Default
null

SCSS style sheet as a file.

This will be automatically converted to CSS.