Commit graph

44 commits

Author SHA1 Message Date
Spencer Burris 428b5942c7
Fix documentation typos (#1157) 2020-09-04 22:53:31 +02:00
Ken d198ad64db
Doc add a missing arg to get_taxonomy_url (#1139)
This feature is already exist, but not in the doc yet

Related #766
2020-08-18 13:06:49 +02:00
René Ribaud 282a755fb1
Add feed autodiscovery documentation (#1123)
* Add feed autodiscovery documentation

* Fix link in template
2020-08-12 09:20:16 +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
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
GaaH 41bbaeb970
Add an optionnal lang parameter to get_url (#982)
* get_url takes an optionnal  parameter

* Documentation about the 'lang' parameter of 'get_url'

Co-authored-by: Gaëtan Caillaut <gaetan.caillaut@live.com>
2020-04-12 19:23:17 +02:00
Vincent Prouillet b2eb00a374 Ensure lang is always set on default sections 2020-04-12 19:17:29 +02:00
Vincent Prouillet fb6cbe008f Mention how to get config variables in templates 2020-04-12 18:48:00 +02:00
Vincent Prouillet 469babbd97 Update docs on markdown filter
Closes #989
2020-04-12 17:26:01 +02:00
Andrew Barchuk 2e6d996709
Fix a pair of Tera links (#968) 2020-03-11 07:59:54 +01:00
Damian Carrillo 1a3e91f5f4
Fixing a missing link to Tera Filters (#966)
The previous link results in a 404. This is the updated link.
2020-03-09 08:15:18 +01:00
Vincent Prouillet 782cc7d686 Fix some more merge conflicts 2020-02-02 17:50:36 -08:00
photong 51d4b6bd6a Simple clean up of documentation. (#849)
* Update installation.md

* Update cli-usage.md

* Update installation.md

* Update directory-structure.md

* Update configuration.md

* Update overview.md

* Update section.md

* Update page.md

* Update section.md

* Update configuration.md

* Update page.md

* Update section.md

* Update page.md

* Update shortcodes.md

* Update linking.md

* Update table-of-contents.md

* Update syntax-highlighting.md

* Update taxonomies.md

* Update search.md

* Update sass.md

* Update index.md

* Update multilingual.md

* Update overview.md

* Update pages-sections.md

* Update pagination.md

* Update taxonomies.md

* Update rss.md

* Update sitemap.md

* Update robots.md

* Update 404.md

* Update archive.md

* Update overview.md

* Update installing-and-using-themes.md

* Update creating-a-theme.md

* Update netlify.md

* Update github-pages.md

* Update gitlab-pages.md

* Update index.md

* Update page.md

* Update section.md

* Updates.
2020-02-02 17:48:42 -08:00
Eduardo Pinho 1bafec4309 Update links to Tera documentation (#873)
- "/templates" section is gone upstream
2019-12-10 07:00:58 +01:00
Stuart Small 12d2576fba Fix for #632 - add ability to get asset image dimensions (#670) 2019-05-30 20:06:24 +02:00
Vincent Prouillet ec61a57841 Use @/ for internal links rather than ./
Close #686
2019-05-27 14:35:18 +02:00
Vincent Prouillet b29596c3cc Mention the 404 page does not get current_path/current_url
Close #586
2019-05-01 23:06:05 +02:00
Vincent Prouillet 50caf1c90c Fix typo in docs
Closes #636
2019-03-25 23:15:53 +01:00
Vincent Prouillet 5d695d7ce8
Merge pull request #567 from getzola/next
v.0.6.0
2019-03-25 20:26:07 +01:00
Vincent Prouillet c63b7fde44 load_data now defaults to plain type + fix bug with get_taxonomy fn 2019-03-16 10:01:11 +01:00
Jordan Shurmer bf1fd1a086
Fix minor documentation quirks in templates/overview 2019-02-27 08:54:09 -05:00
Vincent Prouillet 779511ae43 Pass down lang and start docs 2018-12-28 13:24:49 +01:00
Vincent Prouillet 1d97b24898
Merge branch 'master' into next 2018-11-07 19:45:03 +01:00
Jake Howard fef522bb29
Add links to tera documentation for filters and functions
Fixes https://github.com/Keats/gutenberg/issues/510. Well, should help with it.
2018-11-02 14:45:51 +00:00
Jake Howard aad12d829f Remote data (#494) 2018-10-29 20:13:09 +01:00
Vincent Prouillet 0101e5cb12 Update docs to refer to zola 2018-10-18 23:11:36 +02:00
Luke Frisken 1baa7750f3 CSV and TOML loading global functions (#379)
Local CSV/TOML/JSON loading Tera function
2018-10-18 17:32:30 +02:00
Vincent Prouillet 86c418372f Add metadata_only to get_section 2018-10-18 16:49:33 +02:00
Vincent Prouillet 84a3193e97 Last fixes 2018-08-03 19:47:39 +02:00
Vincent Prouillet efddb24b95 We actually need get_taxonomy_url. Also update docs 2018-07-31 16:35:16 +02:00
Vincent Prouillet 9e3c66186b
Merge branch 'master' into next 2018-07-31 15:33:51 +02:00
Daniel Sockwell b563142fc0 Add index page section to documentation (#331)
* Add `index page` section to documentation

The current documentation does not describe how to create a index page.
I initially found this confusing, because I expected an index page to be
a **page** rather than a section.  Thus, I tried to access the page
content with `{{ page.content }}` and was very frustrated when I could
not.

This addition clarifies that the index page is **always** a section,
even if it does not have any sub-pages.  This should also help people
who intend to use Gutenberg to build stand-alone webpages, rather than
blogs.
2018-07-16 08:49:26 +02:00
Vojtech Kral 7c8d39fe9c Docs for resize_image() 2018-06-25 18:05:04 +02:00
Vincent Prouillet b120754862 Update shortcode parsing and docs 2018-06-25 18:02:21 +02:00
Vincent Prouillet 54841b19bb
Merge pull request #220 from Keats/markdown-inline
Markdown inline
2018-02-02 17:29:16 +01:00
Vincent Prouillet 16f658c70c Move test_site and turn rebuild.rs into a component 2018-01-29 18:40:12 +01:00
Vincent Prouillet 29ce510aa3 Add inline option of markdown filter
Fix #197
2018-01-26 16:22:38 +01:00
Vincent Prouillet f3b1553a26 Update docs about trans 2018-01-16 13:57:31 +01:00
Vincent Prouillet 322d2f30fb Add get_taxonomy_url global_fn
And fix bug with taxonomies urls
2017-11-26 10:07:34 +01:00
Carson Page 8759323a16 Add trailing_slash opt. to get_url (#173)
* Added inital trailing_slash impl

* Added simple test

* Updated docs website to use trailing_slash option

* Updated documentation to reflect new trailing_slash option

* Added combined cachebust and trailing_slash test
2017-11-26 10:07:34 +01:00
King Claudy a6919d4b6d Docs : Fix typo in Templates/Overview 2017-10-22 13:16:25 +02:00
Justus Perlwitz 7d13489555 Fix tera netlify link 2017-10-19 16:04:47 +02:00
Vincent Prouillet bdcad38310 Finishing up site (#131)
* Finishing up site

* Make site a bit responsive

* Fix menu responsiveness

* Remove Fira Sans and revamp a bit text

* Update list of syntax and change output of syntax

* Add Rust mention

* Some doc tweaks

* Correct capitalization for GitHub

Correct capitalization for GitHub

* Some CSS tweaks

* More css tweaks + favicon

* Add link to my site
2017-10-19 13:48:50 +02:00
Vincent Prouillet dee1dbe667 Working on site
And some tweaks as I write the docs
2017-09-29 15:37:58 +09:00