Theme is not used

Hi,

the theme I am trying to use, is not applied.

I started following the instructions on Overview | Zola and wanted to add a theme afterwards.

I have it copied to the themes folder and its folder name is set with the theme= variable in the top level of my project’s config.toml. I also tried removing the templates folder and I also tried copying the templates folder from the theme … Everything I did either threw an error or it just did nothing. Am I missing a step?

config.toml:

base_url = "https://foobar.tld"
title = "Blog title"
description = "Blog description"

compile_sass = true
build_search_index = false

theme = "zolastrap"

My folder structure:

├── config.toml
├── content
│   └── _index.md
├── templates
│   ├── base.html
│   ├── blog.html
│   ├── blog-page.html
│   └── index.html
├── themes
│   ├── zolastrap

Thanks for any hint.

Hmm, I tested it and the theme loaded fine. Maybe the templates folder is overriding it?

Try removing it and see if zolastrap works.

Thanks for taking the time to test it.

For me, removing the templates folder does not help. My content/_index.mdseems to reference something in the templates folder. … Can you please tell me, what is in your content folder and your _index.html?

My_index.md is:

+++
title = "first"
sort_by = "date"
template = "index.html"
page_template = "page.html"
+++

My error message on zola buildis:

Error: Failed to build the site
Error: Failed to render section '/path/to/content/_index.md'
Error: Reason: Failed to render 'index.html'
Error: Reason: Variable `paginator.pages` not found in context while rendering 'index.html'

Do I have to set pages somewhere? The theme’s github page does not mention anything related.

Thanks.

Hi,

right after posting I changed my search keywords and found this: Fails to render pages, `paginator.pages` not found in context · Issue #2 · getzola/after-dark · GitHub

Apparently, the _index.md needs a variable paginate_by = 5for some themes.

Now it builds fine. :slight_smile: