Create a page

Pages are the most fundamental building block for content. They’re useful for general standalone content which does not match one of the built-in content types on this page. You may also be interested in Widget Pages which enable you to add widgets to a page.

The simplest way of adding a page is to add a Markdown file using a .md extension at the root folder of your site.

For a site with just a homepage and an author, here’s what the root directory and associated URLs might look like with a new page named example:

|-- authors/    # =>
|-- example/    # =>
└── home/  # =>

And here’s some example content for example/

title: An example title
summary: Here we describe how to add a page to your site.
date: "2018-06-28T00:00:00Z"

reading_time: false  # Show estimated reading time?
share: false  # Show social sharing links?
profile: false  # Show author profile?
comments: false  # Show comments?

# Optional header image (relative to `static/media/` folder).
  caption: ""
  image: ""

Add your *content* here...

If you have a lot of pages, you can organize them within a folder, for example:

|-- authors/    # =>
|-- example/    # =>
|-- example/    # =>
└── home/  # =>

Linking to your new page

To link to your new page from the site navigation bar, edit config/_default/menu.toml. Add a new menu entry similar to:

  name = "My new page"  # A link title for your page.
  url = "example/"  # The URL of your page.
  weight = 50  # The position of your page in the menu.

To link to your new page from another page, add something like [My CV]({{< ref "cv/" >}}) to the content of one of your existing pages.

Example: creating a Curriculum Vitae page

Create a cv/ page for your Curriculum Vitae in your content folder. Add a front matter to the file, similar to that above, and add the content of your Curriculum Vitae below the front matter. Then create a link to your new page by following the steps in the above section.

Alternatively, for the above example, we could use a PDF of your Curriculum Vitae. For this purpose, create a folder called files within your static folder and move a PDF file named cv.pdf to that location, so we have a static/files/cv.pdf file path. The PDF can then be linked to from any content by using the code: {{% staticref "files/cv.pdf" %}}Download my CV{{% /staticref %}}.