We are working very hard to bring you the best documentation possible.



Required: No
Front Matter: Never
Type: .html, .md
Project Location: src/includes

An include, like templates and pages, contributes its content to the HTML document. But unlike those, whose content is generally more specific to the HTML document, such as its subject matter, main topic, etc., includes are intended to be used to encapsulate blocks of content that are used in multiple HTML documents, such as blocks of meta tags, navbars, footers, sidebars, .etc. Includes also allow you to leverage the benefit of using either markdown or HTML for a particular part of an HTML document.

Both pages and templates can declare one or more include tokens that declare the paths, minus their file type, to their respective include files that reside in the src/includes folder.

A page with two include tokens, {{navbar}} and {{footer}}.

<!DOCTYPE html>
<html lang="en">
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>fusion.ssg: Documentation - Includes</title>
        <main class="container">

This page's include tokens will be replaced by the content from their respective include files'.

Conditional Includes

Introduced in v1.2.0

A conditional include contains content that is only relevant when building for development or when building for release, but not for both. For example, if an include contributes Google analytics to your site's HTML documents, you can exclude that content when building your site for development. Please see conditional includes for details regarding configuring your site's conditional includes.

Declaring an include to be only relevant when building for release.

"conditionalIncludes": {
    "releaseOnly": ["analytics.md"]

By declaring the analytics.md include for release only, its content will not be included when building for development.