mirror of
https://github.com/zyllian/webdog.git
synced 2025-05-10 02:26:42 -07:00
Make the method to define image pages more generic
This commit is contained in:
parent
e755173d39
commit
b5d44862a2
6 changed files with 427 additions and 292 deletions
|
@ -10,7 +10,7 @@ use pulldown_cmark::{Options, Parser};
|
|||
use serde::Serialize;
|
||||
use url::Url;
|
||||
|
||||
use crate::{images::ImageMetadata, util, PageMetadata, Site, ROOT_PATH, SASS_PATH};
|
||||
use crate::{util, PageMetadata, Site, ROOT_PATH, SASS_PATH};
|
||||
|
||||
/// URLs which need to have a "me" rel attribute.
|
||||
const ME_URLS: &[&str] = &["https://mas.to/@zyl"];
|
||||
|
@ -240,11 +240,6 @@ impl<'a> SiteBuilder<'a> {
|
|||
|
||||
/// Builds the site's various image pages.
|
||||
pub fn build_images(&self) -> anyhow::Result<()> {
|
||||
let images = ImageMetadata::load_all(&self.site.site_path)?;
|
||||
ImageMetadata::build_lists(self, &images)?;
|
||||
for (id, image) in images {
|
||||
image.build(self, id)?;
|
||||
}
|
||||
Ok(())
|
||||
crate::images::build_images(self)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue