* 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>
* mention code block output change
* Update snap
* Update themes gallery (#1082)
Co-authored-by: GitHub Action <action@github.com>
* Deployment guide for Vercel
* Change wording a bit
* Update themes gallery (#1122)
Co-authored-by: GitHub Action <action@github.com>
* Add feed autodiscovery documentation (#1123)
* Add feed autodiscovery documentation
* Fix link in template
* Docs/configuration update (#1126)
* Update configuration documentation
- Attempt to split the configuration file into sections to make it more readable and
avoid configuration mistakes (#1056).
- Move translation instructions to the right part.
- Add a bit more explanations to the extra section.
* Take into account @Keats feedbacks
* Remove short notice about translation usage
- A i18n page should be created to better explain it.
* add fix for (#1135) Taxonomies with identical slugs now get merged (#1136)
* add test and implementation for reverse pagination
* incorporate review changes
Co-authored-by: Michael Plotke <bdjnks@gmail.com>
Co-authored-by: Vincent Prouillet <balthek@gmail.com>
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Samyak Bakliwal <w3bcode@gmail.com>
Co-authored-by: René Ribaud <uggla@free.fr>
* Per section/subsection feeds
* Added `generate_feed` variable to section front matter.
* Generate atom/rss feeds for sections/subsections that have the
`generate_feed` variable set to true (false by default); this works
independent of the `generate_feed` variable in the root `config.toml`
file, however, the name (and template) of the feed file for each section
is the same as `feed_filename` in `config.toml`, just located in the
root of each section.
* Slightly edited `atom.xml` and `rss.xml` so that they include the
section title (if any), and the url of a section, if it's a section
feed.
* Section feeds: tests
* Changed a couple of sections' front matter in order to generate feeds
for them for the test.
* Changed the can_build_feed test in site package to can_build_feeds and
included some assertions to make sure that section feeds are generated
when requested.
* Section feeds: documentation
* Added information about the section front matter variable
`generate_feed` in the section content page.
* Added information about section feeds in the feeds template page.
* Section feeds fix: use section.path for feed path
* Don't panic on bad date strings
Instead, show a helpful error message explaining only RFC3339 is
supported.
Fixes#993.
* Try to parse the full range of TOML date formats
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`.
This commit removes the option to sort by order and also removes
`page.next` and `page.previous` variables. Instead, pages can be sorted
by two methods `date` and `weight`. The Tera `reverse` filter will
reverse either of those sorts, so the old `order` behavior can be
achieved by using the `reverse` filter with `weight`.
In place of the `previous`/`next` variables, this commit adds the
`page.earlier`/`page.later` variables (which are set when the page is
sorted by date) and the `page.heavier`/`page.lighter` variables (which
are set when the page is sorted by weight). These variables have the
advantage of not having confusing semantics when the `reverse` filter is
used.