I am looking to use zola. However, I seem to have a problem to grasp part of the concept.
I don’t understand the relationship between the “themes” and “templates”. I was under the impression that even if I supply no “~/rv/templates/” file, the “~/rv/themes/zola-clean-blog…” will supply the necessary templates.
It did not work and “zola serve” displayed the “Welcome to zola!” page inviting me to create an index.html or install a themes. (their is an index.md and about.md in the “~/rv/content” directory.)
When I put an index.html to “augment” the themes “index.html”, zola serve return an error message: Error: Template ‘index.html’ is inheriting from ‘themes/zola-clean-blog/templates/index.html’, which doesn’t exist or isn’t loaded.
The files does exist at "~/rv/themes/zola-clean-blog/templates/index.html
I try a few others themes and in every cases, it is like it completely ignore the “~/rv/themes” directory. (ex: font not loaded, *.css no loaded, etc…)
Here what I did (Sorry if a little long): (On Ubuntu 18.04)
a) I downloaded (with git) and “cargo build --release” zola. Everything look good and no error.
b) I did a zola init rv
c) I downloaded a theme: zola-clean-blog Using “git clone GitHub - dave-tucker/zola-clean-blog: A port of the StartBootsrap Clean Blog theme for Zola” when within ~/rv/themes
d) create a new file in ~/rv/templates/index.html
just copying the information from the web.
{%/* extends “themes/zola-clean-blog/templates/index.html” /%}
{%/ block copyright /%}
Copyright %copy; Example, Inc. 2016-2019
{%/ endblock copyright */%}
e) I created a file about.md in ~/rv/content
+++
+++
followed by some text.
f) ~/config.toml include the following:
[extra]
# Put all your custom variables here
theme = "zola-clean-blog"
taxonomies = [
{name = "categories", rss = true, paginate_by=5},
{name = "tags", rss = true, paginate_by=5},
g) Then, when I execute zola, this follow:
jylandry@JYL:~/rv$ ~/zola/target/release/zola serve --interface 0.0.0.0
Building site...
**Error: Template 'index.html' is inheriting from 'themes/zola-clean-blog/templates/index.html', which doesn't exist or isn't loaded.**
here the directory structure (without the .git):
4 rv/static
5740 rv/themes/zola-clean-blog/static/img
2720 rv/themes/zola-clean-blog/static/webfonts
216 rv/themes/zola-clean-blog/static/js
216 rv/themes/zola-clean-blog/static/css
8896 rv/themes/zola-clean-blog/static
44 rv/themes/zola-clean-blog/sass
16 rv/themes/zola-clean-blog/content/pages
184 rv/themes/zola-clean-blog/content
12 rv/themes/zola-clean-blog/templates/tags
12 rv/themes/zola-clean-blog/templates/categories
52 rv/themes/zola-clean-blog/templates
20148 rv/themes/zola-clean-blog
20152 rv/themes
4 rv/sass
8 rv/content
8 rv/templates
20184 rv
I make a test copying all the files from one of the themes toward “~/rv/templates, ~/rv/sass …” and it seems to work after I use “zola build --base-url http://x.com”
This is what we should do: Copy the file from the themes toward our own content and templates?