Pass section.generate_feed

This commit is contained in:
Vincent Prouillet 2023-02-22 22:20:40 +01:00 committed by Vincent Prouillet
parent c67655e29f
commit 64feaeb3ee
3 changed files with 5 additions and 0 deletions

View File

@ -3,6 +3,7 @@
## 0.17.1 (unreleased)
- Fix bugs with colocated directories in the root `content` directory
- Add `generate_feed` field to the `section` object in templates
## 0.17.0 (2023-02-16)

View File

@ -160,6 +160,7 @@ pub struct SerializingSection<'a> {
subsections: Vec<&'a str>,
translations: Vec<TranslatedContent<'a>>,
backlinks: Vec<BackLink<'a>>,
generate_feed: bool,
}
#[derive(Debug)]
@ -218,6 +219,7 @@ impl<'a> SerializingSection<'a> {
reading_time: section.reading_time,
assets: &section.serialized_assets,
lang: &section.lang,
generate_feed: section.meta.generate_feed,
pages,
subsections,
translations,

View File

@ -107,6 +107,8 @@ lang: String;
translations: Array<TranslatedContent>;
// All the pages/sections linking this page: their permalink and a title if there is one
backlinks: Array<{permalink: String, title: String?}>;
// Whether this section generates a feed or not. Taken from the front-matter if set
generate_feed: bool;
```
## Table of contents