Browse Source

Serialize page & section paths is, without leading slash

index-subcmd
Vincent Prouillet 7 years ago
parent
commit
f11cc6abb4
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      components/content/src/page.rs
  2. +1
    -1
      components/content/src/section.rs

+ 1
- 1
components/content/src/page.rs View File

@@ -191,7 +191,7 @@ impl ser::Serialize for Page {
state.serialize_field("description", &self.meta.description)?;
state.serialize_field("date", &self.meta.date)?;
state.serialize_field("slug", &self.slug)?;
state.serialize_field("path", &format!("/{}", self.path))?;
state.serialize_field("path", &self.path)?;
state.serialize_field("permalink", &self.permalink)?;
state.serialize_field("summary", &self.summary)?;
state.serialize_field("tags", &self.meta.tags)?;


+ 1
- 1
components/content/src/section.rs View File

@@ -145,7 +145,7 @@ impl ser::Serialize for Section {
state.serialize_field("title", &self.meta.title)?;
state.serialize_field("description", &self.meta.description)?;
state.serialize_field("extra", &self.meta.extra)?;
state.serialize_field("path", &format!("/{}", self.path))?;
state.serialize_field("path", &self.path)?;
state.serialize_field("permalink", &self.permalink)?;
state.serialize_field("pages", &self.pages)?;
state.serialize_field("subsections", &self.subsections)?;


Loading…
Cancel
Save