WIP
This commit is contained in:
parent
41180edb99
commit
81018eeafe
6 changed files with 110 additions and 0 deletions
|
@ -202,6 +202,7 @@ impl Generator {
|
|||
pub struct Page {
|
||||
pub title: String,
|
||||
pub thumbnail: Option<Thumbnail>,
|
||||
pub scripts: Vec<String>,
|
||||
pub breadcrumbs: String,
|
||||
pub tree_path: Option<String>,
|
||||
pub tree: String,
|
||||
|
@ -238,6 +239,7 @@ impl Generator {
|
|||
),
|
||||
alt: thumbnail.alt.clone(),
|
||||
}),
|
||||
scripts: roots.attributes.scripts.clone(),
|
||||
breadcrumbs,
|
||||
tree_path: treehouse
|
||||
.tree_path(parsed_tree.file_id)
|
||||
|
|
|
@ -16,6 +16,11 @@ pub struct RootAttributes {
|
|||
/// ID of picture attached to the page, to be used as a thumbnail.
|
||||
#[serde(default)]
|
||||
pub thumbnail: Option<Picture>,
|
||||
|
||||
/// Additional scripts to load into to the page.
|
||||
/// These are relative to the /static/js directory.
|
||||
#[serde(default)]
|
||||
pub scripts: Vec<String>,
|
||||
}
|
||||
|
||||
/// A picture reference.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue