* fix can not build zola with search/indexing-zh feature
* fix can not build components/utils after enabled indexing-zh feature
error[E0252]: the name `Deserialize` is defined multiple times
--> components/utils/src/de.rs:2:5
|
1 | use serde::{Deserialize, Deserializer};
| ----------- previous import of the macro `Deserialize` here
2 | use serde_derive::Deserialize;
| ^^^^^^^^^^^^^^^^^^^^^^^^^ `Deserialize` reimported here
|
= note: `Deserialize` must be defined only once in the macro namespace of this module
* Allow optional whitespace around dash/underscore in filename
Allow file names that are as follows:
2021-01-01 - test.md
To be parsed the same as if they were
2021-01-01-test.md
The slug for both will now just be "test" instead of previously the
first example would have become "2021-01-01-test".
* Add documentation for optional whitespace in filename
* Test that updated regex does not take space after dash
* Add support for base64-encoded hash values
The global template function 'get_file_hash' can now return a
base64-encoded hash value when its 'base64' parameter is set to true.
See discussion in #519.
* Fix integrity attribute's value in test site
SRI hash values must be base64-encoded.
* Update documentation about 'get_file_hash'
* Fix 'can_get_hash_for_static_files' unit test
* Move `load_tera` to `templates`
I don't know if this is a good place for it, conceptually. I'm moving it
there because I need to use it from `templates`, and `templates` can't
depend on `site`, because there's already a dependency in the opposite
direction.
* Load templates in `markdown` filter
This enables the `markdown` filter to handle shortcodes, as long as
those shortcodes don't access any context variables.
Addresses #1350
* Update documentation of `markdown` filter
* Only load templates for `markdown` filter once
* Clarify `markdown` filter documentation
This is a lightly edited version of what @southerntofu suggested.
* load_data() template function takes a `required` boolean flag
* Update tests for load_data()
* Add test to make sure invalid data always fails in load_data
* Better documentation, fixing a few typos
Co-authored-by: southerntofu <southerntofu@thunix.net>
* Add sort_by=title
* Remove old comment.
* Remove println! debugging
* Minor: text spacing
* Use lexical_sort crate for sort_by title
Co-authored-by: David James <davidcjames@gmail.com>
* Internal links are resolved in tera markdown filter (close#1296#1316)
* Add a test for internal links in markdown filter
Co-authored-by: southerntofu <southerntofu@thunix.net>
* add shortcode 'invocation' variable to allow a shortcode to track how many times it has been invoked in a given Markdown file
* use closure (implicit struct) instead of explicit struct for invocation tracking
* update variable name to "nth"
* Accept dates presented as strings
Still, if we find a string we involve the TOML parser to make sure the
content of said string would be a correct TOML date. In a pure TOML
world this isn't exactly relevant, but this will come in handy when
using a YAML deserializer.
Signed-off-by: Kevin Ottens <ervin@ipsquad.net>
* Add serde_yaml and test-case dependencies
This will be necessary for the YAML frontmatter handling and
corresponding unit tests.
Signed-off-by: Kevin Ottens <ervin@ipsquad.net>
* Add YAML front matter handling
Signed-off-by: Kevin Ottens <ervin@ipsquad.net>
* Switch RawFrontMatter enum to wrap &str instead of String
Signed-off-by: Kevin Ottens <ervin@ipsquad.net>
* Update the documentation to mention YAML frontmatter
This is just a light update on purpose. There would be no point in
pushing YAML too much, this is mainly here to help people with a backlog
of posts to transition.
Signed-off-by: Kevin Ottens <ervin@ipsquad.net>
* Add support for loading Bibtex data.
* Add load_data() documentation for the bibtex format
* Force bibtex tags to be lower case.
Bibtex tags are case-insensitive, and this works around tera's case-sensitiveness.
* Improve the load_data() documentation for the bibtex format
* Next version
* Remove lines forcing minify_html to false
* Update documentation about minify_html
* Update changelog
Co-authored-by: Vincent Prouillet <balthek@gmail.com>
This commit fixes a bug in the documentation for the feeds page which
shows how to use the RSS block to enable feed autodiscovery.
The bug used an em space character instead of a space in one part of the
code snippet. If a user were to copy the code snippet into their code as
directed, the Zola build would fail with a parse error. The em space
appears identical to a regular space in monospaced fonts, making the
error seem mysterious or incorrect.
I believe the em space was used in order to prevent the shortcode from
rendering, as the code snippet is just meant to show what the shortcode
looks like. However, it is possible to escape the shortcode so that it
renders correctly without causing confusion for the user who expects to
be able to copy and paste it.
This commit replaces the em space in both code snippets with regular
spaces and escapes the shortcodes.
By using alpine, the time to pull and start the container decreases.
By using the official alpine zola package, the script gets simpler.
Also, this updates the zola version to the latest release.