Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with initial installation #5

Open
oschrenk opened this issue Feb 9, 2024 · 3 comments
Open

Issues with initial installation #5

oschrenk opened this issue Feb 9, 2024 · 3 comments

Comments

@oschrenk
Copy link

oschrenk commented Feb 9, 2024

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/
@yanniskatsaros
Copy link

I'm on zola --version: 0.19.1 and it appears that the configuration schema has changed regarding feeds, specifically:

# ...

# When set to "true", a feed is automatically generated.
generate_feeds = false

# The filenames to use for the feeds. Used as the template filenames, too.
# Defaults to ["atom.xml"], which has a built-in template that renders an Atom 1.0 feed.
# There is also a built-in template "rss.xml" that renders an RSS 2.0 feed.
feed_filenames = ["atom.xml"]

# ...

this change causes building the site with PaperMod to break in a variety of places, specifically in the following templates that reference the generate_feed and feed_filename attribute which no longer appears to be valid:

  • templates/partials/head.html
  • templates/section.html
  • templates/tags/single.html

Aside from overriding these templates in my own project, is there a known-workaround for dealing with this issue?

Would you be open to PR's to fix the templates in this repo directly?

@cydave
Copy link
Owner

cydave commented Jul 12, 2024

Sure thing, please feel free!
I'm unfortunately no longer using zola - but I'll gladly accept PRs so that people who like this theme
can profit from eachothers fixes.

Thanks!

@Muzych
Copy link

Muzych commented Nov 15, 2024

Error: Failed to serve the site
Error: Failed to render pager 1
Error: Reason: Failed to render 'section.html'
Error: Reason: Variable config.feed_filenames not found in context while rendering 'section.html'

I still encounter this problem when run zola serve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants