getzola / even Goto Github PK
View Code? Open in Web Editor NEWA clean blog theme for Zola
License: MIT License
A clean blog theme for Zola
License: MIT License
I have a few pages with draft = true
in their front matter, and it breaks in templates/index.html with the following error:
Error: Failed to render page '/../my-blog/content/my-draft-article.md'
Reason: Failed to render 'even/templates/page.html'
Reason: `get_taxonomy_url`: couldn't find `TIL` in `tags` taxonomy
Not sure if this is an error in the get_taxonomy_url
helper method or in this theme, but it looks like tags on pages in draft state, do not get added to the global taxonomies object.
The template refers to a paginator.pages
variable which apparently isn't defined in a default Zola installation (Zola 0.7.0 on macOS Mojave) :
Error: Failed to render section '[[redacted]]/content/_index.md'
Reason: Failed to render 'even/templates/index.html'
Reason: Variable `paginator.pages` not found in context while rendering 'even/templates/index.html'
With RUST_BACKTRACE=1 environment variable:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { kind: Msg("Failed to render section \'[[redacted]]/content/_index.md\'"), source: Some(Error { kind: Tera(Error { kind: Msg("Failed to render \'even/templates/index.html\'"), source: Some(Error { kind: Msg("Variable `paginator.pages` not found in context while rendering \'even/templates/index.html\'"), source: None }) }), source: None }) }', src/libcore/result.rs:997:5
stack backtrace:
0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
1: std::sys_common::backtrace::print
2: std::panicking::default_hook::{{closure}}
3: std::panicking::default_hook
4: std::panicking::rust_panic_with_hook
5: std::panicking::continue_panic_fmt
6: rust_begin_unwind
7: core::panicking::panic_fmt
8: core::result::unwrap_failed
9: zola::cmd::serve::serve
10: zola::main
11: std::rt::lang_start::{{closure}}
12: std::panicking::try::do_call
13: __rust_maybe_catch_panic
14: std::rt::lang_start_internal
15: main
If I don't specify a template for a section, the site fails to build with the error message:
Reason: Template 'even/templates/section.html' not found
My directory structure is
content/
posts/
_index.md
some_post.md
about/
_index.md
but the build fails for any template I use in _index.md
because it's missing something i.e. paginator.page
, category.name
, etc.
The file blog/themes/even/static/cat_demo_img.jpg
is meant to be an example picture and as such should not be part of the template. Unfortunately zola build
copies this image file into blog/public
where it ends up on the web-server. I suggest to remove blog/themes/even/static/cat_demo_img.jpg
.
Hello!
I very much enjoy the Even theme for Zola, but I recently found that by default, it uses jsdelivr and cloudflare to deliver some of its needed scripts. For user privacy reasons, I would like to change this, so that it instead serves the script locally.
The line especially relevant for me (since my site does not use the maths stuff) is this:
<script src="https://cdnjs.cloudflare.com/ajax/libs/slideout/1.0.1/slideout.min.js"></script>
Since I am not familiar with web languages, could you kindly point me to the right syntax to use if I want to serve this file locally?
Thank you in advance!
P.S. I would also be very very happy if you could modify the theme to behave in this way by default, since this is an unnecessary violation of users' privacy.
I have recently started using Zola as the main tool for setting up a new web site with its own template. In general, I have found that it is a breeze to develop a new template in Zola compared to Hugo. The scripting language does (mostly) what you ask it to do making it easier to get a good result.
However, I have run into some few problems here and there with unclear and insufficient error messages. I will list some of them here:
Orphaned pages
In my first experiments, I frequently had Orphaned pages because the front matter had not been set or it has been set incorrectly. The error messages is just that "there are 23 orphaned pages". Is it be possible to get a list of all the orphaned pages when building? This will make it easier to pin-point the source of the problem(s).
Indirect error message without clear source
I recently changes the section template and then got the following error message
-> Template changed .../templates/section.html
Reloading only template
Error: Failed to build the site
Error: Failed to render pager 1
Error: Reason: Failed to render 'section.html': error while rendering macro `post_macros::title`
Error: Reason: Filter call 'date' failed
Error: Reason: Filter `date` received an incorrect type for arg `value`: got `Null` but expected i64|u64|String
Done in 16ms.
The message error is clear :-), but there are no indications about which file was the underlying cause for the error. It would be great if there is a way to improve the error messages.
Error: Failed to build the site
Error:
* Failed to parse "/home/carsten/web/zola/themes/std/templates/base.html"
--> 57:3
|
57 | {% import "macros/title_or_dir.html" as tord %}
| ^---
|
= unexpected tag; expected end of input or some content
Could error message be improved so that there is a hint saying the import of macros should be done at the beginning of the file.
Otherwise, I really like Zola - THANKS!
Think of the children you monster
I just discovered, that the Even theme renders badly on Windows:
the Logo is rendered in "Comic Sans", the headlines are rendered in "YaHei" a sans serif font. I suppose this is not what you indented, because the Even screenshots show a different design.
One possibility to avoid this, is Google Fonts an Open Fond collection.
My favorites at the moment are: PT Sans for headlines and PT Serif for the text body. See my blog as an example.
I started from scratch and enabled Katex and tried an example
{% katex(block=true) %}
\begin{matrix}
a & b \\
c & d
\end{matrix}
{% end %}
that renders correctly when entered into the "Type an expression:" box on https://katex.org/. But when I build and server my site, instead of '&' being used for alignment they are rendered as amp;
:
I am able render correctly things like A_{ij} = ...
Is this a bug or a configuration issue on my side?
On mobile environments, the title logo of Even links to the absolute path /
, instead of config.base_url
.
Reproduction:
I think this code causes this issue:
Lines 56 to 59 in a6ce1a2
This links to /
, not to {{ config.base_url }}
.
I would like to change the color of inline code. I see it is hard coded in sass/site.scss
as $code-colour
with a TODO note to allow customization. My knowledge of webdev is close to 0, is there a way to go around that in the meantime short of forking the repository and change the hard-coded value?
When no categories are being used in any post, the /categories
page will not be rendered.
I use utteranc.es as my blog's comment system. But the theme only provide block page_before_footer
so I can only insert comments before navigation anchors. But I want comments to be put after navigation anchors. Is it suitable to add a page_after_footer
block?
Zola version: 0.16.0 (Linux, binary used from zola-v0.16.0-x86_64-unknown-linux-gnu.tar.gz
)
Footer should have links to previous/next posts.
Footer doesn't show links to previous/next posts. This issue isn't seen in versions v0.15.3
and below.
Failing case:
$ git clone https://github.com/getzola/even.git
$ cd even/
$ zola --version
zola 0.16.0
$ zola serve
As an example, screenshot for "Tenth post" is shown below (footer has only the tags, no navigation links to previous/next posts):
Passing case:
$ zola --version
zola 0.15.0
$ zola serve
Screenshot (footer has expected navigation links):
I ran zola init and then followed the directions for the Even theme and I got the following error:
$ zola serve
Building site...
-> Creating 1 pages (0 orphan), 0 sections, and processing 0 images
Error: Failed to render page 'zola-blog/content/first_post.md'
Reason: Failed to render 'even/templates/page.html'
Reason: `get_taxonomy_url` received an unknown taxonomy as kind: tags
Here is a gist of all the files I created. https://gist.github.com/pianomanfrazier/9f76f42ee77f544bbb6ddfa11a5ad255
I am not sure how to fix the error. I have the taxonomy tags defined in my config.toml and then in /content/first_post.md I define some tags.
Using zola 0.7.0
I am puzzled by what 'page.category' would be in the post_macros template. This is the code in the repo.
{% if page.category %}
<div class="post__category">
<a href="{{ get_taxonomy_url(kind="category", name=page.category) }}">{{ page.category }}</a>
</div>
{% endif %}
But I suspect that this is supposed to be displaying the categories taxonomy outlined elsewhere in the theme and should in fact be more like this, no?
{% if page.taxonomies.categories %}
<div class="post__category">
{% for category in page.taxonomies.categories %}
<a href="{{ get_taxonomy_url(kind="categories", name=category) }}">{{ category }}</a>
{% endfor %}
</div>
{% endif %}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.