return to pancake.io
pancake.io :: documents
Page Config

Pancake.io pages can be configured using a YAML-formatted block at the top of the file. This config block begins and ends with three dashes --- on a separate line. All settings are optional.

Page Options

Example

---
title: Pancake.io Guide - Page Configuration
header: Pancake.io Guides
css: my-style.css
js:
    - https://code.jquery.com/jquery-1.7.min.js
    - my-script.js
---

# Page begins here
...

Options

title sets the title of the page that appears on the browser tab
header sets the header that appears at the top of the page
blank if set to true, will not load the default css (i.e. only css specified below is loaded)
css specifies the stylesheet(s) for the page
js specifies the javascript file(s) for the page
template specifies the template for the page. Important: this negates all above settings
autolink toggles whether URLs are automatically converted to links. Default: true
markdown arguments to the markdown converter (see below)

For multiple CSS and Javascript files, you can place each one on a new line beginning with -.

Markdown Options

These settings are passed through to redcarpet, the Markdown library Pancake.io uses.

Example (Defaults Shown)

---
title: My Page
header: Default Markdown Options
markdown:
    strikethrough:        true
    autolink:             true
    fenced_code_blocks:   true
    space_after_headers:  true
    no_intra_emphasis:    true
    tables:               true
    lax_spacing:          false
    hard_wrap:            true
---

# Page begins here
...

Options

Option Behavior When Enabled
strikethrough Strikethrough text surrounded with ~~, e.g. ~~task 1~~
autolink Automatically convert link text to links.
fenced_code_blocks Denote code blocks by surrounding it with three backticks
```
function square(r) {
    return r**2;
}
```
space_after_headers Requires spaces after headers. That is, #my page title will not be treated as a header.
no_intra_emphasis Underscores inside of a single word will not turn into emphases. That is, string_of_text will render as "string_of_text" and not "stringoftext".
tables PHP-Markdown style tables are supported:
 abc | def
---- | ----
   1 |    2
   3 |    4
lax_spacing HTML blocks do not need to be surrounded by empty lines.
hard_wrap Line breaks are converted into <br>

Note

For compatibility with other Markdown rendering tools you may preview your files in, you can also use the following syntax for the configuration block:

<!---
title: My Page
header: Some Clever Chapter Title
markdown:
  tables: false
css: styles.css
--->

# Page begins here
...

Observe that the block here starts with <!--- and ends with ---> instead of ---. As before, they need to be on separate lines. This causes normal Markdown renderers to treat this block as an HTML comment and thus ignore it.