Markdown & Frontmatter

Write content in Markdown with YAML frontmatter for metadata.


File Format

---
title: My First Post
date: 2024-01-15
category: Tech
tags:
  - javascript
  - web
---

# Hello World

This is my **first post** written in Markdown.

## Code Example

```javascript
console.log('Hello!');

More content here...


---

## Frontmatter

The YAML block at the top (between `---` markers) becomes template variables:

```handlebars
<h1>{{title}}</h1>
<time>{{date}}</time>
<span>{{category}}</span>

{{#each tags}}
  <span class="tag">{{this}}</span>
{{/each}}

Supported Features

Skier uses marked with GitHub Flavored Markdown:


Syntax Highlighting

Code blocks are highlighted with highlight.js:

```javascript
const greeting = 'Hello';
console.log(greeting);
```

Include the highlight.js CSS in your template:

<link rel="stylesheet" href="https://unpkg.com/highlight.js@11/styles/github-dark.min.css">

Excerpts

For post summaries, use a marker:

---
title: My Post
---

This is the excerpt that appears in lists.

<!--more-->

This is the full content that only appears on the detail page.

Configure in your task:

generateItemsTask({
  excerptFn: (content) => content.split('<!--more-->')[0],
  // ...
})

Common Fields

Field Type Usage
title string Page title
date string ISO date (2024-01-15)
description string Meta description / excerpt
tags array Categories/labels
featured boolean Highlight post
draft boolean Skip in build

Tips


Learn More