cydave / zola-theme-papermod

Home Page:https://cydave.github.io/zola-theme-papermod/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issues with initial installation

oschrenk opened this issue · comments

Thank you for the theme! I had some issue setting up papermod from the given instructions. These were the three things tripping me up:

  1. Missing taxonomy definition
Error: Failed to serve the site
Error: Page `/Users/oliver/Projects/personal/oschrenk.dev/content/content/posts/papermod-installation.md` has taxonomy `tags` which is not defined in config.toml

This was solved by adding

taxonomies = [
  { name = "tags", feed = true},
]

to the main body of the config

  1. Missing Extra config
Error: Failed to serve the site
Error: Failed to render pager 1
Error: Reason: Failed to render 'section.html' (error happened in 'index.html').
Error: Reason: Variable `config.extra.papermod.language_direction` not found in context while rendering 'section.html'

The installation procedure does mention to copy sample files, which makes the extra config required. But the extra config is missing in the installation procedure.

This was solved by adding the [extra.papermod] section of the sample config to my config.

  1. Section posts/_index.md not found
Error: Failed to serve the site
Error: Failed to render section '/Users/oliver/Projects/personal/oschrenk.dev/content/_index.md'
Error: Reason: Failed to render 'index.html' (error happened in a parent template)
Error: Reason: Function call 'get_section' failed
Error: Reason: Section `posts/_index.md` not found.

This is a misunderstanding between an initial empty setup of zola and the theme.

a) zola init creates an empty content directory already
b) cp -r themes/papermod/content content as outlined in the installation procedure actually actually then copies the content into the existing content, resulting in a directory structure like

content/
  content/
    _index.md
    ...

This was solved via

rm -rf content/content
cp -r themes/papermod/content/* content/