mirror of
https://github.com/zyllian/webdog.git
synced 2025-05-10 02:26:42 -07:00
implement custom embeds for regular pages
This commit is contained in:
parent
750c0c501f
commit
4fb1f2183d
5 changed files with 28 additions and 6 deletions
|
@ -14,6 +14,7 @@ use std::{
|
|||
};
|
||||
|
||||
use eyre::Context;
|
||||
use resource::EmbedMetadata;
|
||||
use serde::Deserialize;
|
||||
use url::Url;
|
||||
use util::get_name;
|
||||
|
@ -67,6 +68,9 @@ pub struct PageMetadata {
|
|||
pub title: Option<String>,
|
||||
/// The template to use for the page. If not specified, it defaults to "base".
|
||||
pub template: Option<String>,
|
||||
/// custom embed info for a template
|
||||
#[serde(default)]
|
||||
pub embed: Option<EmbedMetadata>,
|
||||
/// The page's custom scripts, if any.
|
||||
#[serde(default)]
|
||||
pub scripts: Vec<String>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue