Remove earlier/later/lighter/heavier from pages when rendering sections

This commit is contained in:
Vincent Prouillet 2019-01-21 17:54:44 +01:00
parent e77dbe0697
commit e119b68533
6 changed files with 311 additions and 248 deletions

View file

@ -2,6 +2,11 @@
## 0.6.0 (unreleased) ## 0.6.0 (unreleased)
### Breaking
- `earlier/later` and `lighter/heavier` are not set anymore on pages when rendering
a section
### Other
- Add support for content in multiple languages - Add support for content in multiple languages
- Lower latency on serve before rebuilding from 2 to 1 second - Lower latency on serve before rebuilding from 2 to 1 second
- Allow processing PNG and produced images are less blurry - Allow processing PNG and produced images are less blurry

546
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -6,5 +6,5 @@ authors = ["Vincent Prouillet <prouillet.vincent@gmail.com>"]
[dependencies] [dependencies]
tera = "0.11" tera = "0.11"
toml = "0.4" toml = "0.4"
image = "0.20" image = "0.21"
syntect = "3" syntect = "3"

View file

@ -7,7 +7,7 @@ authors = ["Vojtěch Král <vojtech@kral.hk>"]
lazy_static = "1" lazy_static = "1"
regex = "1.0" regex = "1.0"
tera = "0.11" tera = "0.11"
image = "0.20" image = "0.21"
rayon = "1" rayon = "1"
errors = { path = "../errors" } errors = { path = "../errors" }

View file

@ -225,7 +225,7 @@ impl<'a> SerializingSection<'a> {
let mut subsections = Vec::with_capacity(section.subsections.len()); let mut subsections = Vec::with_capacity(section.subsections.len());
for k in &section.pages { for k in &section.pages {
pages.push(library.get_page_by_key(*k).to_serialized(library)); pages.push(library.get_page_by_key(*k).to_serialized_basic(library));
} }
for k in &section.subsections { for k in &section.subsections {

View file

@ -32,9 +32,11 @@ word_count: Number;
// Based on https://help.medium.com/hc/en-us/articles/214991667-Read-time // Based on https://help.medium.com/hc/en-us/articles/214991667-Read-time
reading_time: Number; reading_time: Number;
// `earlier` and `later` are only populated if the section variable `sort_by` is set to `date` // `earlier` and `later` are only populated if the section variable `sort_by` is set to `date`
// and only set when rendering the page itself
earlier: Page?; earlier: Page?;
later: Page?; later: Page?;
// `heavier` and `lighter` are only populated if the section variable `sort_by` is set to `weight` // `heavier` and `lighter` are only populated if the section variable `sort_by` is set to `weight`
// and only set when rendering the page itself
heavier: Page?; heavier: Page?;
lighter: Page?; lighter: Page?;
// See the Table of contents section below for more details // See the Table of contents section below for more details