Skip to content

05. Custom pages

Scott J edited this page Sep 11, 2019 · 5 revisions

You should define the meta data by passing it in as variables:

Method 1 (recommended):

Build a page from a Markdown file.

page_title="My cool page" \
page_descr="Some description" \
  new page  path/to/some-file.md > some-page.html

Method 2:

Build a page from a string of HTML.

# set a var with HTML
html_body="<h1>My Title</h1>
  <p>Some text.</p>"

# create the page
page_title="My cool page" \
page_descr="Some description" \
  new page  "$html_body" > some-page.html

Method 3:

Build a page from a file containing HTML (it should contain only the page body, not including site header/footer).

page_title="My cool page" \
page_descr="Some description" \
  new page  "$(cat path/to/some-html-in-a-file)" > some-page.html

Clone this wiki locally