adfaure / kodama-theme

Theme for zola inspired by hugo academic theme.
https://adfaure.github.io/kodama-theme/
MIT License
18 stars 9 forks source link

Cannot build or serve in Zola 0.17.2 #12

Open youainti opened 1 year ago

youainti commented 1 year ago

When trying to use this theme I cannot get it to function properly. The following are the steps I took and the results.

$ zola init mysite
Welcome to Zola!
Please answer a few questions to get started quickly.
Any choices made can be changed by modifying the `config.toml` file later.
> What is the URL of your site? (https://example.com): 
> Do you want to enable Sass compilation? [Y/n]: 
> Do you want to enable syntax highlighting? [y/N]: 
> Do you want to build a search index of the content? [y/N]: 

Done! Your site was created in /home/user/website/mysite

Get started by moving into the directory and using the built-in server: `zola serve`
Visit https://www.getzola.org for the full documentation.

$ cd mysite
$ mkdir themes
mkdir: cannot create directory ‘themes’: File exists

$ cd themes & git clone https://github.com/adfaure/kodama-theme
[1] 3861984
Cloning into 'kodama-theme'...
remote: Enumerating objects: 857, done.
remote: Counting objects: 100% (16/16), done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 857 (delta 2), reused 7 (delta 0), pack-reused 841
Receiving objects: 100% (857/857), 13.16 MiB | 2.96 MiB/s, done.
Resolving deltas: 100% (474/474), done.
[1]+  Done                    
$ cd themes

updated config.toml as described in readme.

$ zola serve
Building site...
Checking all internal links with anchors.
> Successfully checked 0 internal link(s) with anchors.
-> Creating 0 pages (0 orphan) and 0 sections
Error: Failed to serve the site
Error: Failed to render section '/home/dad/website/mysite/content/_index.md'
Error: Reason: Failed to render 'index.html' (error happened in 'base.html').
Error: Reason: Function call 'resize_image' failed
Error: Reason: `resize_image`: Cannot find file: static/img/avatar.jpg

I have attached config.toml (as a .txt).

adfaure commented 1 year ago

Hello, looks like the resize_image is not able to find the file static/img/avatar.jpg.

Can you try to copy the one from kodama-theme (should be in themes/kodama-theme/static/img/avatar.jpg) to /home/dad/website/mysite/static/img/avatar.jpg) ?

let me know if it worked.

adfaure commented 1 year ago

Hello, any progress on the issue ?

Regards, Adrien

digitalillusions commented 9 months ago

First of all, thank you for making this template. I recently started looking into zola and found your template by looking specifically for academic templates. I think you did a very nice job, the theme looks very clean.

I had the same issue when initially setting up the theme. For one, I was confused about HAVING to set the extra variables, although this is something I can overlook, since silently applying default values can be even more confusing.

The issue for the default avatar images can also be resolved if you simply use

[extra]
# Put all your custom variables here

avatar = "img/avatar.jpg"
favicon = "img/avatar.jpg"

without the leading static. As outlined in the official documentation, zola will automatically look in the static directory for images. Hope this helps and will allow you to address the issue yourself. Thanks again for the theme, I will let you know if I find anything else.