Skip to content

Commit 64feaeb

Browse files
committed
Pass section.generate_feed
1 parent c67655e commit 64feaeb

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## 0.17.1 (unreleased)
44

55
- Fix bugs with colocated directories in the root `content` directory
6+
- Add `generate_feed` field to the `section` object in templates
67

78
## 0.17.0 (2023-02-16)
89

components/content/src/ser.rs

+2
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ pub struct SerializingSection<'a> {
160160
subsections: Vec<&'a str>,
161161
translations: Vec<TranslatedContent<'a>>,
162162
backlinks: Vec<BackLink<'a>>,
163+
generate_feed: bool,
163164
}
164165

165166
#[derive(Debug)]
@@ -218,6 +219,7 @@ impl<'a> SerializingSection<'a> {
218219
reading_time: section.reading_time,
219220
assets: &section.serialized_assets,
220221
lang: &section.lang,
222+
generate_feed: section.meta.generate_feed,
221223
pages,
222224
subsections,
223225
translations,

docs/content/documentation/templates/pages-sections.md

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

0 commit comments

Comments
 (0)