You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @ejmg ,
I am trying out this theme for my website. One thing I would like to know is creating a 404 page. I tried out what was given in the zola docs, but I get this error:
Error: Failed to render '404.html' (error happened in a parent template)
Reason: Variable `current_path` not found in context while rendering '404.html'
I placed the 404.html file in the templates/ directory, with the following content:
Are you extending the theme directly (i.e. modifying the code of the theme itself) or are you trying to use the theme for your blog and adding on to it? These are two different things and might be the issue at hand.
In the case of the latter, all you should have to do is make a 404.html file under templates/, as you seem to be doing. The next thing would be to extend the theme itself before writing your changes. For my own blog, that means I have
{% extends "zerm/templates/index.html" -%}
at the top of my 404 file.
Finally, there is no content block in zerm. There is, however, a main block. Try using that if you want to extend from what zerm has rather than adding entirely new structure on to the theme.
Hey @ejmg ,
I am trying out this theme for my website. One thing I would like to know is creating a 404 page. I tried out what was given in the zola docs, but I get this error:
I placed the 404.html file in the
templates/
directory, with the following content:Is there anything else I should do? Can you please help?
The text was updated successfully, but these errors were encountered: