diff options
Diffstat (limited to 'src/directive/mod.rs')
-rw-r--r-- | src/directive/mod.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/directive/mod.rs b/src/directive/mod.rs index a97f3a5..59c352c 100644 --- a/src/directive/mod.rs +++ b/src/directive/mod.rs @@ -15,6 +15,7 @@ pub enum Directive { Meta(Meta), Img(Img), Inline(Inline), + PageStats(PageStats), Tag(Tag), } @@ -55,6 +56,10 @@ impl TryFrom<ParsedDirective> for Directive { Self::check_args(&p, Meta::REQUIRED, Meta::ALLOWED, Meta::ALLOW_ANY_UNNAMED)?; Directive::Meta(Meta::from(p)) } + "pagestats" => { + Self::check_args(&p, PageStats::REQUIRED, PageStats::ALLOWED, PageStats::ALLOW_ANY_UNNAMED)?; + Directive::PageStats(PageStats::from(p)) + } "tag" => { Self::check_args(&p, Tag::REQUIRED, Tag::ALLOWED, Tag::ALLOW_ANY_UNNAMED)?; Directive::Tag(Tag::from(p)) @@ -108,6 +113,7 @@ impl Directive { Self::Img(x) => x.process(site, meta), Self::Inline(x) => x.process(site, meta), Self::Meta(x) => x.process(site, meta), + Self::PageStats(x) => x.process(site, meta), Self::Tag(x) => x.process(site, meta), } } @@ -122,5 +128,8 @@ pub use img::Img; mod inline; pub use inline::Inline; +mod pagestats; +pub use pagestats::PageStats; + mod tag; use tag::Tag; |