Templates & Partials

Skier uses Handlebars for templating. Templates and partials let you create flexible layouts and reusable components for your site.


Templates

Example template (src/pages/blog-post.html):

<!DOCTYPE html>
<html>
  <head>
    <title>{{title}}</title>
  </head>
  <body>
    {{> header}}
    <main>
      <h1>{{title}}</h1>
      <article>{{{content}}}</article>
    </main>
    {{> footer}}
  </body>
</html>

Partials

Example partial (src/partials/header.html):

<header>
  <nav>
    <a href="/">Home</a>
    <a href="/blog/">Blog</a>
  </nav>
</header>

Variables & Helpers


Folder Structure Example

src/
  pages/
    index.html
    blog-post.html
  partials/
    header.html
    footer.html

Tips


Next: Learn more about Markdown & Frontmatter or Custom Tasks.