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

METADATA

Metadata

fusion.ssg generates metadata while parsing your project's files which it uses to drive each build-cycle. At the conclusion of each build-cycle, fusion.ssg serializes this metadata to the file .assets.json, which is located in the project's root folder.

Each piece of metadata consists of a key and a corresponding value.

fusion.ssg makes this metadata available to your project's components, which they can use to add dynamic content to your site's HTML documents. In most cases, you want to limit your focus on those metadata items whose assetType equals "template". For more information, please see Metadata Properties.

Template metadata includes their front matter.

A template asset in .assets.json

 [
  {
    "timestamp": 1683293747955.9675,
    "assetType": "template",
    "filePath": "src/templates/index.md",
    "fileType": ".md",
    "isPost": false,
    "fm": {
      "content": "...",
      "data": {
        "tokens": {
          "title": "Success!"
        }
      },
      "isEmpty": false,
      "excerpt": ""
    },
    "content": "...",
    "isWip": false,
    "associatedPage": "src/pages/default.html",
    "htmlDocumentName": "index.html",
    "url": "/"
  }
]

Template metadata contains two similarly named properties, fm.content and content. fm.content contains the raw content, either HTML or markdown, if any, taken directly from the template asset, whereas content contains the actual content that fusion.ssg will use to generate the HTML document for this template.