Commit graph

1480 commits

Author SHA1 Message Date
Vincent Prouillet f107d438f2 Update snap 2020-06-09 22:28:01 +02:00
Vincent Prouillet a27380e728
Merge pull request #1055 from apiraino/add-new-sublime-themes-2
Add new sublime themes
2020-06-09 22:13:58 +02:00
Vincent Prouillet 779c4dcdab
Merge pull request #1057 from thomasetter/dockerignore
add .dockerignore file to reduce intermediate docker image size and build time
2020-06-09 22:13:24 +02:00
Thomas Etter a3b65b2fcd add .dockerignore file to reduce intermediate docker image size and build time 2020-06-09 12:16:01 +02:00
apiraino bdeb2bdef6
Add themes and syntect file 2020-06-07 00:49:36 +02:00
apiraino ed0ae43c11
Clarify docs about adding a Sublime theme 2020-06-07 00:49:27 +02:00
Vincent Prouillet f138875094
Merge pull request #1049 from bdjnk/patch-1
mention code block output change
2020-06-03 15:36:36 +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 b935dc6273 Fix tests 2020-05-27 22:05:56 +02:00
Vincent Prouillet eb9e22c14b Update Changelog to mention taxonomy rss 2020-05-27 21:20:24 +02:00
Vincent Prouillet ee594cfc3d Make alias template pass HTML validation 2020-05-27 21:17:12 +02:00
Vincent Prouillet d1f7434a5a
Merge pull request #1039 from styfle/patch-1
ZEIT Now => Vercel
2020-05-26 08:39:31 +02:00
Steven c7c4605340
ZEIT Now => Vercel
https://vercel.com/blog/zeit-is-now-vercel
2020-05-25 17:45:55 -04:00
Vincent Prouillet 0d817ee528 Next version 2020-05-25 18:24:19 +02:00
Vincent Prouillet a3a5b9ea06
Merge pull request #976 from getzola/next
0.11.0
2020-05-25 18:14:42 +02:00
Vincent Prouillet 3a292d294a Prepare for release 2020-05-25 10:26:30 +02:00
Stan Rozenraukh 8d32f8b3f3
Fix panic in load_data(url=%s) (#1036)
If there is no response from the server, `load_data` would panic
with: `response status`.

This patch removes the `expect` in favor of an error message that we
couldn't get a response from the server for a given url.
2020-05-25 09:25:41 +02:00
Vincent Prouillet 1c867b6028 Update deps 2020-05-24 20:01:43 +02:00
XAMPPRocky 4389a72bdb
Update Cargo.lock (#1034) 2020-05-24 20:01:00 +02:00
Tymoteusz Wiśniewski 974ae167a8
Make path to config.toml independent from root dir (#1023)
fixes #1022
2020-05-23 11:55:45 +02:00
Vincent Prouillet bfbc16d3ad Update changelog 2020-05-23 11:51:08 +02:00
Hannu Hartikainen 36ec33f042
Change get_url(cachebust=true) to use a hash (#1032)
Cache-busting was previously done with a compile-time timestamp. Change
to the SHA-256 hash of the file to avoid refreshing unchanged files.

The implementation could be used to add a new global fn (say,
get_file_hash) for subresource integrity use, but that's for another
commit.

Fixes #519.

Co-authored-by: Vincent Prouillet <balthek@gmail.com>
2020-05-23 11:46:50 +02:00
Vincent Prouillet e1c8c01149 Consistent path for defult index section
Closes #995
2020-05-23 11:43:24 +02:00
hui.liu 32ca1a14ed
Wrap highlight code blocks with <code> (#1026)
* Wrap highlight code blocks with <code>

* Fix tests for highlight code block
2020-05-18 09:41:56 +02:00
Hannu Hartikainen a7657f30ab
Use {{ page.permalink | safe }} in tutorial (#1024)
The `&#x2F;` urls are confusing to newcomers (at least myself). Use the best practice in the tutorial (see issue #129).
2020-05-13 08:40:06 +02:00
Vincent Prouillet fbf431d612 Update syntect, using rust-onig with bindgen temporarily 2020-05-12 20:07:02 +02:00
Vincent Prouillet bc496e6101 Update syntaxes and syntect 2020-04-29 22:35:28 +02:00
southerntofu e3dc8bbab5
Access heading level in anchor-link.html (#1008)
* Add lvl variable in anchor-link context

* Add docs about lvl in anchor-link.html

* Rename lvl => level
2020-04-29 19:40:25 +02:00
Sven-Hendrik Haase e9b47dae59
Remove implicit dependency on openssl-sys (#1001) (#1005) 2020-04-27 09:49:05 +02:00
Adrian Sieber 79b2338bd3
Fix path of generated page (#1011) 2020-04-27 09:35:53 +02:00
Clément Joly 6b91328e81
Typos (#1010) 2020-04-26 20:35:59 +02:00
Vincent Prouillet b96b187eca Fix tests + rustfmt 2020-04-22 10:07:17 +02:00
Andrew Wonnacott d19855e909
Rewrite link_checker to use a Result internally (#928) 2020-04-22 10:04:10 +02:00
Gelez 7b3279befd
Theme docs: actually edit the config (#996)
I hope it is just not me that misunderstood the sentence above, but I think it should be `true` and not `false`.
2020-04-22 09:48:08 +02:00
Vincent Prouillet c04e6ebaf5 Some tweaks 2020-04-21 19:28:58 +02:00
Vincent Prouillet 93b3b9f9ff Update pinned version in CI 2020-04-21 18:29:41 +02:00
Vincent Prouillet 0ac70cb242
Merge pull request #994 from chris-morgan/misc
Chris Morgan’s whole bunch of miscellaneous work for landing
2020-04-21 18:21:48 +02:00
Vincent Prouillet 07e0853183 Update themes 2020-04-15 18:53:46 +02:00
Vincent Prouillet 8253adbcc0 Fix tests 2020-04-14 19:15:30 +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 0cc1435f35 Make config.description optional in atom.xml 2020-04-14 17:27:08 +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
Chris Morgan 4a10d0497e Normalise built-in templates
Two main purposes of changes here:

- To make the formatting and indentation of the raw output prettier;
- To simplify the HTML yielded by dropping unnecessary bits.

The 404 changes are a tad more extensive, altering the actual wording to
match conventional stub 404 pages a little more.
2020-04-14 17:27:08 +05:30
Chris Morgan cc01d3f82f Make live reload work with missing </body>
The HTML spec doesn’t require it, and I prefer to omit it. This has been
bothering me for ages, but I hadn’t gotten round to fixing it yet.

This can cause nominally invalid HTML to be emitted, if `</body>` was
omitted but `</html>` was present, but that’s unlikely to happen, and
this is for development purposes only, and the right thing will happen
anyway in all environments (per browser behaviour and spec).

I don’t think this warrants a changelog entry.
2020-04-14 17:27:08 +05:30
Chris Morgan cc64803553 Fix documentation of TaxonomyConfig fields
It doesn’t have a field named slug.

It does have a field named lang.
2020-04-14 17:27:08 +05:30
Chris Morgan 896c30d892 Fix a broken Markdown link in the docs
Whitespace is not allowed between the `]` and `(`.
2020-04-14 17:27:08 +05:30