Skip to content

Commit

Permalink
Merge pull request #51 from pconrad-fb/pconrad-fb-patch-1
Browse files Browse the repository at this point in the history
Update creating-content.md
  • Loading branch information
mayamcdougall authored Oct 25, 2021
2 parents 7559d9a + 2ec8500 commit e4ea093
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion _docs/creating-content.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,13 @@ Robots: noindex,nofollow
Template: index
---</code></pre>

These values will be contained in the `{% raw %}{{ meta }}{% endraw %}` variable in themes (see below). Meta headers sometimes have a special meaning: For instance, Pico not only passes through the `Date` meta header, but rather evaluates it to really "understand" when this page was created. This comes into play when you want to sort your pages not just alphabetically, but by date. Another example is the `Template` meta header: It controls what Twig template Pico uses to display this page (e.g. if you add `Template: blog`, Pico uses `blog.twig`).
These values will be contained in the `{% raw %}{{ meta }}{% endraw %}` variable in themes (see below). Meta headers sometimes have a special meaning. A few examples:

- `Title` tells Pico the page title for display and navigation. Pages with no `Title` don't appear in the navigation menu.
- `Date` tells Pico when the page was created, letting you sort your pages not just alphabetically, but by date.
- `Template` controls what Twig template Pico uses to display the page. For exaemple, if you add `Template: blog`, Pico uses `blog.twig`.

You can create your own meta attributes and use them in your content or when modifying a theme. For example, if you create an `Order` attribute, you can set `pages_order_by_meta: Order` and `pages_order_by: meta ` in `config.yml` to sort pages in the navigation menu in a custom order.

In an attempt to separate contents and styling, we recommend you to not use inline CSS in your Markdown files. You should rather add appropriate CSS classes to your theme. For example, you might want to add some CSS classes to your theme to rule how much of the available space a image should use (e.g. `img.small { width: 80%; }`). You can then use these CSS classes in your Markdown files, for example: `![Image Title](%assets_url%/image.png) {.small}`

Expand Down

0 comments on commit e4ea093

Please sign in to comment.