Commit graph

391 commits

Author SHA1 Message Date
Vincent Prouillet
a958305e58 Clone Zola Tera instance for Markdown filter 2022-05-06 22:16:56 +02:00
Vincent Prouillet
a297b11f2a More efficient sitemap building 2022-05-02 22:51:01 +02:00
Ken "Elf" Mathieu Sternberg
77eb9fef9b
Create pull request/add yaml to load data (#1842)
* Add YAML to formats supported by load_data()

A fairly trivial addition; JSON and YAML are handled so similarly
that this was a matter of copying the JSON-relevant handlers and
editing the copies to handle YAML as well.  The test file was
literally generated with 'json2yaml'.

The documentation has been updated to indicate that load_data() now
handles YAML code.

The CHANGELOG has been updated as well.

* After checking, I found that it's generally agreed the mime type is still application/x-yaml.

* Update comment, unify library importing.

I noticed one more place where the list of formats was supported,
and added YAML to that list.

I noticed that there's a singular place to load the `libs::` crate,
and unified by importing of serde_yaml in that place.
2022-04-29 20:22:02 +02:00
Vincent Prouillet
84951d39e3 Allow taxonomies to not be rendered
Closes #1750
2022-04-27 21:11:42 +02:00
Vincent Prouillet
c14b1fa746 Remove duplicate code 2022-04-26 22:27:20 +02:00
Vincent Prouillet
9ab1bf2e4e
Re-organise content and remove slotmap indirection level (#1827) 2022-04-26 20:51:04 +02:00
Vincent Prouillet
2feda3ec61 Update deps 2022-03-04 21:36:35 +01:00
Vincent Prouillet
a67370b8d8 Update pulldown_cmark 2022-03-04 00:16:48 +01:00
Vincent Prouillet
502dd92cc6 Next version 2022-02-14 11:08:40 +01:00
Vincent Prouillet
c9bc0a29e4 Ready for release 2022-01-23 14:33:51 +01:00
Vincent Prouillet
a61fa3fd80 That's going to be 0.15.3 2022-01-23 14:33:51 +01:00
Vincent Prouillet
4cef97af2a Next version 2022-01-23 14:33:51 +01:00
Vincent Prouillet
1ed1fdbee7 Ready for 0.15.2 2021-12-10 22:04:20 +01:00
Vincent Prouillet
5b0e1edebf Next version 2021-12-09 19:49:18 +01:00
Vincent Prouillet
3625391cf7 Set 0.15.1 date 2021-12-08 20:40:50 +01:00
Vincent Prouillet
7ce4f75d09 Fix config data not getting to the templates
Closes #1687
2021-12-07 21:46:44 +01:00
Vincent Prouillet
9191a2726c Fix markdown shortcodes 2021-12-07 21:46:44 +01:00
Vincent Prouillet
3dbf811740 Update macos ci image 2021-12-07 21:46:43 +01:00
Vincent Prouillet
9fc60e1591 Update pinned ci version 2021-12-05 19:25:51 +01:00
Vincent Prouillet
51784aa60f Handle naked anchor link for internal links
Closes #1676
2021-12-03 23:30:32 +01:00
Vincent Prouillet
c33b67c1bf Ensure zola serve only reads from the public dir 2021-11-23 23:18:51 +01:00
Vincent Prouillet
7a0cf261bf Update changelog 2021-09-13 21:16:55 +02:00
Gijs Burghoorn
eceb1bd79d
Added prompt for when zola build output-dir mentions an existing directory. (#1558)
* Next version

* Added ask prompt for output-dir flag

Added `ask_bool` prompt for `--output-dir` for when the output directory
targeted already exists in the file system.

[Issue: #1378]

* Updated the documentation for #1378

* Added missing "sure" in prompt text

* Added timeout to prompt + dirname

* Fixed complication errors

Co-authored-by: Vincent Prouillet <balthek@gmail.com>
2021-09-04 08:10:02 +02:00
Vincent Prouillet
8e40720aca Next 2021-08-24 09:14:18 +02:00
Vincent Prouillet
1249d4dc84 Prepare for 0.14.1 2021-08-24 08:50:44 +02:00
Vincent Prouillet
f7a4ef2617 Add draft to section variable in templates
Closes #1592
2021-08-20 19:47:41 +02:00
Vincent Prouillet
8b43667a94 Ensure code block contents are always escaped
Closes #1581
2021-08-18 09:05:00 +02:00
Vincent Prouillet
88e5c6e167 Update deps 2021-08-12 08:54:55 +02:00
Vincent Prouillet
9275d932e2 Next version 2021-08-08 10:29:44 +02:00
Vincent Prouillet
ece6cb9307 Update release date 2021-07-19 19:32:26 +02:00
Vincent Prouillet
c0895b62f9 Update deps 2021-07-18 14:03:14 +02:00
Vincent Prouillet
8c3ce7d7fb Update changelog 2021-07-10 08:58:51 +02:00
Vincent Prouillet
e62664b4ff Unify {page,section}.assets
Closes #1510
2021-06-24 22:22:50 +02:00
Vincent Prouillet
c0a0df4fe9 Update resize_image docs 2021-06-11 23:39:48 +02:00
Vincent Prouillet
1bf5cd7bf8 Update docs + sandbox files 2021-06-11 21:14:45 +02:00
Vincent Prouillet
ae916eb6c5 Some more tweaks 2021-06-10 10:26:12 +02:00
Vincent Prouillet
9e0cac6d4d Cleanup of get_url and get_file_hash 2021-06-10 10:26:12 +02:00
Vincent Prouillet
7fb99eaa44 Revamp the images template functions 2021-06-10 10:26:12 +02:00
Vincent Prouillet
5365efebb3 Add protobuf syntax highlighting 2021-05-10 22:09:36 +02:00
Vincent Prouillet
fecc3cf148 Strip footnotes link from summaries
Closes #1282
2021-05-08 23:27:23 +02:00
Vincent Prouillet
e92e4f1003 Tweaks to load_data + update deps 2021-04-21 21:43:02 +02:00
Vincent Prouillet
d3caa56da2 Nest translations in languages options 2021-04-07 22:13:15 +02:00
Vincent Prouillet
187bc30f00 Serializing lang aware configs 2021-04-07 22:13:15 +02:00
Vincent Prouillet
86b42fc1ab Move taxonomies to language options dict 2021-04-07 22:13:15 +02:00
Tiago Seabra
534174ae78
feat: add base16-atelierdune-light highlight theme (#1406)
* feat: add base16-aterlierdune-light highlight theme

* docs: add base16-atelierdune-light theme to CHANGELOG
2021-03-14 09:49:29 +01:00
Vincent Prouillet
2a46e07e74 Add path to TaxonomyTerm
Closes #1336
2021-02-22 21:27:52 +01:00
Vincent Prouillet
0b94e0917d Update changelog 2021-02-21 08:41:49 +01:00
Vincent Prouillet
aa57541c21 Force newline after front-matter
Closes #1287
2021-02-02 21:53:37 +01:00
Vincent Prouillet
8e6c3f4fef Update changelog + deps 2021-02-02 20:25:27 +01:00
southerntofu
6950759eda
Internal links are supported in markdown filter (#1318)
* 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>
2021-01-20 09:24:55 +01:00
Vincent Prouillet
779a15a500 Pass lang to 404
Closes #1281
2021-01-09 10:21:50 +01:00
Vincent Prouillet
ccad454922 Percent decode paths on zola serve 2021-01-07 19:16:31 +01:00
Vincent Prouillet
b9b4ef9f04 Add data-lang on code blocks 2021-01-02 09:29:28 +01:00
Vincent Prouillet
7540ecd58e Prefer custom syntax before built-in ones 2020-12-29 10:36:40 +01:00
Vincent Prouillet
657905ed6e Remove watch-only 2020-12-22 21:35:15 +01:00
Vincent Prouillet
fc8b4066f2 Update syntaxes + replace js lang in rendering
Closes #1241, #1211
2020-12-15 10:42:35 +01:00
Vincent Prouillet
cc3e4f9133 Update changelog + deps 2020-12-14 20:45:32 +01:00
Vincent Prouillet
59d3d8a3da Enable smart punctuation
Closes #740
2020-12-14 20:43:31 +01:00
Vincent Prouillet
2c681f3439 Add some external link markdown tweaking options
Closes #681, #695
2020-12-14 20:43:31 +01:00
Vincent Prouillet
94634fe87d Move markdown config to its own section in config.toml 2020-12-14 20:43:31 +01:00
Vincent Prouillet
92282608fe Update changelog 2020-12-14 20:43:31 +01:00
Ian Chen
cb75334498 fix typo (#1229) 2020-12-14 20:43:31 +01:00
Vincent Prouillet
a26422d401 Update changelog 2020-12-14 20:43:31 +01:00
areille
6a31ccff99 Enable html minification (#1208)
* Next version

* Remove lines forcing minify_html to false

* Update documentation about minify_html

* Update changelog

Co-authored-by: Vincent Prouillet <balthek@gmail.com>
2020-12-14 20:42:55 +01:00
Vincent Prouillet
bc3a41f56b Update changelog 2020-12-14 20:42:55 +01:00
Vincent Prouillet
5233cc9585 Next version 2020-12-14 20:42:55 +01:00
Vincent Prouillet
94c016521c Fix zola serve 2020-09-28 09:36:16 +02:00
Vincent Prouillet
0230e3297f Next version 2020-09-27 14:15:44 +02:00
Vincent Prouillet
2fa83af956 Set release date 2020-09-27 11:19:20 +02:00
Vincent Prouillet
59d9d26f0e Fix shortcodes issues with newlines
Closes #1172
2020-09-24 20:02:43 +02:00
Vincent Prouillet
366e5c426f Avoid panics when binding addresses 2020-09-22 12:22:26 +02:00
Vincent Prouillet
b313c97ceb Fix slugified taxonomies rendering
Closes #1177
2020-09-22 09:46:22 +02:00
Vincent Prouillet
bff0193df7 Next version 2020-09-22 09:46:22 +02:00
Vincent Prouillet
935c4a595c Update changelog 2020-09-04 23:39:12 +02:00
Vincent Prouillet
b854ccae28 Prepare for release 2020-09-04 22:42:07 +02:00
Vincent Prouillet
f786783299 Update pulldown_cmark 2020-09-03 21:22:20 +02:00
Vincent Prouillet
e0068ef116 Remove mention from changelog 2020-09-01 21:23:29 +02:00
Vincent Prouillet
4f5fd63281 Update deps + pinned 2020-08-28 19:49:19 +02:00
Vincent Prouillet
7666043b16
Merge branch 'master' into next 2020-08-17 21:39:29 +02:00
Vincent Prouillet
278cc82fc7
Change zola serve to load HTML from memory instead of disk (#1114)
* Change zola serve to load HTML from memory instead of disk

* Be smart about assets copying

* Be a tiny bit smarter on template changes

* Add zola serve --fast
2020-08-16 18:39:04 +02:00
Vincent Prouillet
b4c5e9a34a Update changelog 2020-07-29 20:49:15 +02:00
Vincent Prouillet
d7a557f0b8 Update livereload.js 2020-07-24 23:46:27 +02:00
Tshepang Lekhonkhobe
d21ac14423
make text visible on markdown renderers (#1096) 2020-07-22 10:39:19 +02:00
Vincent Prouillet
fb994c71d7 Make search index configurable
Closes #961
2020-06-29 20:02:27 +02:00
Vincent Prouillet
b30394f862 Tweak a bit the test_site test 2020-06-18 22:33:23 +02:00
Vincent Prouillet
2230968ab1 Update changelog 2020-06-18 21:22:48 +02:00
Matthias
5e31a32166
Add support for SVG files to get_image_metadata (Fixes #769) (#1063)
* Add support for SVG files to `get_image_metadata`

* Add support for SVG files to `get_image_metadata`

* Update documentation after adding SVG support
2020-06-18 11:36:11 +02:00
Vincent Prouillet
2e9b7ba522 Enable task lists 2020-06-11 18:29:05 +02:00
Vincent Prouillet
f41fab8676 Start changelog 2020-06-11 18:21:52 +02:00
Michael Plotke
1200cfc2f0
mention code block output change 2020-06-03 08:12:09 -05:00
Vincent Prouillet
a9a3a2e6b4 Mention 0.11 breaking change
Closes #1047
2020-06-03 07:59:32 +02:00
Vincent Prouillet
b87f17570f Remove unneeded build_timestamp on config 2020-05-28 09:21:42 +02:00
Vincent Prouillet
eb9e22c14b Update Changelog to mention taxonomy rss 2020-05-27 21:20:24 +02:00
Vincent Prouillet
3a292d294a Prepare for release 2020-05-25 10:26:30 +02:00
Vincent Prouillet
bfbc16d3ad Update changelog 2020-05-23 11:51:08 +02:00
Vincent Prouillet
c04e6ebaf5 Some tweaks 2020-04-21 19:28:58 +02:00
Chris Morgan
4653e68715 Add lang, taxonomy and term to feed template
Also a FIXME on the rebuilding part, because it’s presently very wrong.
2020-04-14 17:29:51 +05:30
Chris Morgan
eb7751955a WIP: add an 'updated' field to pages
Also change a few other things to use it, as noted in CHANGELOG.md.

TODO:

- Write a couple of tests: updated field, last_updated template variable

One slight open questions: should `updated` default to the value of
`date` rather than to None? Then pages with `date` could safely assume
`updated`.
2020-04-14 17:29:46 +05:30
Chris Morgan
048949ea31 Rename last_build_date to latest_date
The variable name matched the RSS tag it ended up in, but was misleading
about what it actually was—because if you actually want “last build
date”, you should use `now()`. (Due to the potential for edits, I think
that either there should be an official `updated` field on pages, or
that these templates should use `now()`.)
2020-04-14 17:27:08 +05:30
Chris Morgan
e25915b231 Support and default to generating Atom feeds
This includes several breaking changes, but they’re easy to adjust for.

Atom 1.0 is superior to RSS 2.0 in a number of ways, both technical and
legal, though information from the last decade is hard to find.
http://www.intertwingly.net/wiki/pie/Rss20AndAtom10Compared
has some info which is probably still mostly correct.

How do RSS and Atom compare in terms of implementation support? The
impression I get is that proper Atom support in normal content websites
has been universal for over twelve years, but that support in podcasts
was not quite so good, but getting there, over twelve years ago. I have
no more recent facts or figures; no one talks about this stuff these
days. I remember investigating this stuff back in 2011–2013 and coming
to the same conclusion. At that time, I went with Atom on websites and
RSS in podcasts. Now I’d just go full Atom and hang any podcast tools
that don’t support Atom, because Atom’s semantics truly are much better.

In light of all this, I make the bold recommendation to default to Atom.

Nonetheless, for compatibility for existing users, and for those that
have Opinions, I’ve retained the RSS template, so that you can escape
the breaking change easily.

I personally prefer to give feeds a basename that doesn’t mention “Atom”
or “RSS”, e.g. “feed.xml”. I’ll be doing that myself, as I’ll be using
my own template with more Atom features anyway, like author information,
taxonomies and making the title field HTML.

Some notes about the Atom feed template:

- I went with atom.xml rather than something like feed.atom (the .atom
  file format being registered for this purpose by RFC4287) due to lack
  of confidence that it’ll be served with the right MIME type. .xml is a
  safer default.

- It might be nice to get Zola’s version number into the <generator>
  tag. Not for any particularly good reason, y’know. Just picture it:

    <generator uri="https://www.getzola.org/" version="0.10.0">
	Zola
    </generator>

- I’d like to get taxonomies into the feed, but this requires exposing a
  little more info than is currently exposed. I think it’d require
  `TaxonomyConfig` to preferably have a new member `permalink` added
  (which should be equivalent to something like `config.base_url ~ "/" ~
  taxonomy.slug ~ "/"`), and for the feed to get all the taxonomies
  passed into it (`taxonomies: HashMap<String, TaxonomyTerm>`).
  Then, the template could be like this, inside the entry:

    {% for taxonomy, terms in page.taxonomies %}
        {% for term in terms %}
            <category scheme="{{ taxonomies[taxonomy].permalink }}"
		term="{{ term.slug }}" label="{{ term.name }}" />
	{% endfor %}
    {% endfor %}

Other remarks:

- I have added a date field `extra.updated` to my posts and include that
  in the feed; I’ve observed others with a similar field. I believe this
  should be included as an official field. I’m inclined to add author to
  at least config.toml, too, for feeds.
- We need to have a link from the docs to the source of the built-in
  templates, to help people that wish to alter it.
2020-04-14 17:27:08 +05:30