cydave / zola-theme-papermod

https://cydave.github.io/zola-theme-papermod/
MIT License
54 stars 9 forks source link

Build keeps failing #4

Closed lopes closed 8 months ago

lopes commented 9 months ago

Trying to create a new project with this theme, but the error below happens all time. I've followed the steps in README.md but the error persists. Using Zola version 0.17.2 here.

Steps:

  1. mkdir newsite && cd newsite
  2. zola init
  3. git submodule add https://github.com/cydave/zola-theme-papermod themes/papermod
  4. cp themes/papermod/config.toml
  5. cp -r themes/papermod/content/* content
  6. zola serve
Building site...
Checking all internal links with anchors.
> Successfully checked 0 internal link(s) with anchors.
-> Creating 5 pages (0 orphan) and 4 sections
Error: Failed to serve the site
Error: Failed to render section 'REDACTED/content/archive/_index.md'
Error: Reason: Tried to render `archive.html` but the template wasn't found

When I delete the content/archive:

Building site...
Checking all internal links with anchors.
> Successfully checked 0 internal link(s) with anchors.
-> Creating 5 pages (0 orphan) and 2 sections
Error: Failed to serve the site
Error: Failed to render a list of tags page.
Error: Reason: Tried to render `taxonomy_list.html` but the template wasn't found

Structure:

.
├── config.toml
├── config.toml.bkp
├── content
│   ├── _index.md
│   ├── posts
│   │   ├── 2023-04-07_example_post.md
│   │   ├── 2023-04-07_example_post_2.md
│   │   ├── 2023-04-21_syntax_highlighting.md
│   │   ├── _index.md
│   │   ├── markdown-example.md
│   │   └── papermod-installation.md
│   └── tags
│       └── _index.md
├── public
│   ├── elasticlunr.min.js
│   └── search_index.en.js
├── sass
├── static
├── templates
└── themes
    └── papermod
        ├── LICENSE
        ├── README.md
        ├── config.toml
        ├── content
        ├── ...
cydave commented 9 months ago

Hrm..., moving the templates directory from the themes dir into the site root seems to work. e.g. cp -r themes/papermod/templates ..

I'll try and find out why the templates can't be resolved otherwise.

Edit: Looks like you're missing the theme = "papermod" in the config.toml. Can you give it a shot and try adding it under the root section of the config file? The config should look roughly like this:

author = "cydave"
title = "PaperMod"
...
theme = "papermod"

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

...
cydave commented 8 months ago

I'm closing this issue, should you still have problems with your configuration please open up a new issue :)