Assets reference

Overview


An asset is any static file included in a HyperTexting website. There are three different types of assets in a HyperTexting website: page assets, website assets, and theme assets.

Example


 1my-website/       #
 2  content/        #
 3    about/        #
 4      index.md    #
 5      favicon.ico # a page asset with path /about/favicon.ico
 6    index.md      #
 7    favicon.ico   # a page asset with path /favicon.ico
 8  static/         #
 9    favicon.ico   # a website asset with path /favicon.ico
10  theme/          #
11    static/       #
12      favicon.ico # a theme asset with path /favicon.ico

In this example there are four assets with the filename favicon.ico:

  • my-website/content/about/favicon.ico (path: /about/favicon.ico)
  • my-website/content/favicon.ico (path: /favicon.ico)
  • my-website/static/favicon.ico (path: /favicon.ico)
  • my-website/theme/static/favicon.ico (path: /favicon.ico)

Three of them have the same path, but the source file for /favicon.ico is my-website/content/favicon.ico.

Asset hierarchy


The HyperTexting CMS has a tiered hierarchy for static assets:

  1. page assets
  2. website assets
  3. theme assets

During a website build, theme assets are copied first, followed by website assets, then finally page assets. In this way, theme developers can provide default assets which can be overwritten by website assets and/or page assets.

Edit this page on GitHub

💬 Join the community

Stay up-to-date with the lastest releases and other news from Team HyperTemplates. Ask the developers questions, get help from the community, and share your creations! 🎨