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

Cannot build or serve in Zola 0.17.2 #12

Open
youainti opened this issue Jun 3, 2023 · 3 comments
Open

Cannot build or serve in Zola 0.17.2 #12

youainti opened this issue Jun 3, 2023 · 3 comments

Comments

@youainti
Copy link

youainti commented Jun 3, 2023

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
Copy link
Owner

adfaure commented Jun 4, 2023

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
Copy link
Owner

adfaure commented Jul 11, 2023

Hello,
any progress on the issue ?

Regards,
Adrien

@digitalillusions
Copy link

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.

adfaure added a commit that referenced this issue Oct 23, 2023
As indicated in #12, using static is redundant
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

3 participants