mirror of
https://github.com/cobalt-org/cobalt.rs
synced 2024-11-14 16:07:22 +00:00
feat(liquid): Add page.slug
This was removed in #257 because it was deemed as not being needed but a use case was found in #384. I'm not fully convinced about that use case but I feel there are probably others, like in having an identifier to use in creating a table of contents. Fixed #384
This commit is contained in:
parent
fe21623f93
commit
46de52e502
1 changed files with 1 additions and 0 deletions
|
@ -166,6 +166,7 @@ fn document_attributes(
|
|||
let attributes = vec![
|
||||
("permalink".to_owned(), liquid::Value::scalar(url_path)),
|
||||
("title".to_owned(), liquid::Value::scalar(&front.title)),
|
||||
("slug".to_owned(), liquid::Value::scalar(&front.slug)),
|
||||
(
|
||||
"description".to_owned(),
|
||||
liquid::Value::scalar(front.description.as_ref().map(|s| s.as_str()).unwrap_or("")),
|
||||
|
|
Loading…
Reference in a new issue