Skip to content
This repository has been archived by the owner on Sep 24, 2020. It is now read-only.

Commit

Permalink
Add slug as optional page or post variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
ducksoupdev committed Jul 29, 2015
1 parent d4a2a36 commit 1921834
Show file tree
Hide file tree
Showing 3 changed files with 276 additions and 135 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ Pages and posts must created in the `src/content/pages` and `src/content/posts`
Pages and posts are Markdown files with a YAML front-matter block. The front matter must be the first thing in the file and must take the form of valid YAML set between triple-dashed lines. Here is a basic example:

---
slug: index
title: Home
template: index.hbs
---
Expand All @@ -119,9 +118,9 @@ Pages and posts are Markdown files with a YAML front-matter block. The front mat

Between these triple-dashed lines, you can set predefined variables (see below). These variables will then be available to you in any Handlebars templates or includes that the page or post in question relies on.

* slug (required) - the URL slug which is used as the directory name when the page or post is built
* title (required) - the title of the page or post
* template (required) - the Handlebars template to use to compile the page or post
* slug (optional) - the URL slug which is used as the directory name when the page or post is built
* date (optional) - used for posts and in the format YYYY-MM-DD
* author (optional) - used for posts and the author key in the `site.json` file
* status (optional) - set to 'draft' to ignore the page or post when running the generator
Expand Down Expand Up @@ -161,4 +160,4 @@ Helpers are available to your Handlebar templates and partials, these are:

The example site is a good place to start and shows a basic structure of a site with templates and content.

If you encounter any issues or have any feedback, please [send me a tweet](http://twitter.com/ducksoupdev) or raise a bug on the issue tracker.
If you encounter any issues or have any feedback, please [send me a tweet](http://twitter.com/ducksoupdev) or raise a bug on the issue tracker.
Loading

0 comments on commit 1921834

Please sign in to comment.