PocoCMS Themes: Technical overview

TODO: Finish!

PUT THIS SOMEHWERE

Downloadable fonts and @import rules

Left to itself, PocoCMS turns markdown into pure HTML with no styling. If you add a theme to the front matter, that all changes:

---
theme: "tufte"
---
# The Tufte theme
My, aren't we elegant

Quick overview: Page themes and global themes

Theme

Themes contain stylesheet and individual style tags for the the page, which consists of the article (body text) and other page layout elements: the header, nav bar, aside, and footer.

The previous example causes the current page to use the factory-installed Tufte theme. It does not affect themes used by other pages. For that, you'd use a global theme.

Because this works only on the current page, it's often called the page theme.

Page theme

Page theme is synonomous for themes set using the front matter like this:

---
theme: ".poco/themes/tufte"
---

It's called that because it only affects that page.

Global theme

You can use a global theme to create a default theme for all pages on your site. To do so, just use global-theme on your site's home page, which is in the root directory and is named eitheer README.md or index.md:

---
global-theme: ".poco/themes/pocodocs"
---
Everything's coming up Poco

Notes about global themes:

Theme structure

README.md

Example theme file

---
author: "Tom Campbell"
branding: "PocoCMS documentation theme"
header: "header.md"
nav: "nav.md"
aside: "aside.md"
footer: "footer.md"
stylesheets:
- "../../css/reset.css"
- "../../css/pococms.css"
- "pocodocs.css"
styletags:
- "article>p{color:gray;}"
---

Contents of a theme

A theme is named by its directory, for examle, .poco/themes/pocodocs.

Minimal theme requirements

A theme directory contains at a minimum

Common theme components

The theme's README.md will normally contain one or all of these components: