Browse Source

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

index-subcmd
Vincent Prouillet 5 years ago
parent
commit
e119b68533
6 changed files with 311 additions and 248 deletions
  1. +5
    -0
      CHANGELOG.md
  2. +301
    -245
      Cargo.lock
  3. +1
    -1
      components/errors/Cargo.toml
  4. +1
    -1
      components/imageproc/Cargo.toml
  5. +1
    -1
      components/library/src/content/ser.rs
  6. +2
    -0
      docs/content/documentation/templates/pages-sections.md

+ 5
- 0
CHANGELOG.md View File

@@ -2,6 +2,11 @@

## 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
- Lower latency on serve before rebuilding from 2 to 1 second
- Allow processing PNG and produced images are less blurry


+ 301
- 245
Cargo.lock
File diff suppressed because it is too large
View File


+ 1
- 1
components/errors/Cargo.toml View File

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

+ 1
- 1
components/imageproc/Cargo.toml View File

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

errors = { path = "../errors" }


+ 1
- 1
components/library/src/content/ser.rs View File

@@ -225,7 +225,7 @@ impl<'a> SerializingSection<'a> {
let mut subsections = Vec::with_capacity(section.subsections.len());

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 {


+ 2
- 0
docs/content/documentation/templates/pages-sections.md View File

@@ -32,9 +32,11 @@ word_count: Number;
// Based on https://help.medium.com/hc/en-us/articles/214991667-Read-time
reading_time: Number;
// `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?;
later: Page?;
// `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?;
lighter: Page?;
// See the Table of contents section below for more details


Loading…
Cancel
Save