Skip to content

Commit

Permalink
Pass section.generate_feed
Browse files Browse the repository at this point in the history
  • Loading branch information
Keats committed Feb 24, 2023
1 parent c67655e commit 64feaeb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 2 additions & 0 deletions components/content/src/ser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions docs/content/documentation/templates/pages-sections.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 64feaeb

Please sign in to comment.