diff --git a/site/config.yaml b/site/config.yaml
index da44ff7..ac63e57 100644
--- a/site/config.yaml
+++ b/site/config.yaml
@@ -11,6 +11,7 @@ resources:
output_path_long: blog
resource_template: blog-post.tera
resource_list_template: blog-list.tera
+ tag_list_template: basic-link-list.tera
rss_template: rss/blog-post.tera
rss_title: zyl's blog
rss_description: feed of recent blog posts on zyl's website.
@@ -24,6 +25,7 @@ resources:
output_path_long: images
resource_template: image.tera
resource_list_template: images.tera
+ tag_list_template: basic-link-list.tera
rss_template: rss/image.tera
rss_title: zyl's images
rss_description: feed of newly uploaded images from zyl's website.
diff --git a/src/link_list.rs b/src/link_list.rs
index 5d927cb..88d1f5b 100644
--- a/src/link_list.rs
+++ b/src/link_list.rs
@@ -25,14 +25,14 @@ impl<'l> Link<'l> {
/// Renders a basic list of links.
pub fn render_basic_link_list(
builder: &SiteBuilder,
+ template: &str,
links: Vec,
title: &str,
) -> eyre::Result {
let data = LinkTemplateData { links, title };
- let out = builder.tera.render(
- "basic-link-list.tera",
- &tera::Context::from_serialize(data)?,
- )?;
+ let out = builder
+ .tera
+ .render(template, &tera::Context::from_serialize(data)?)?;
let out = builder.build_page_raw(
PageMetadata {
title: Some(title.to_owned()),
diff --git a/src/resource.rs b/src/resource.rs
index 64e005b..2165345 100644
--- a/src/resource.rs
+++ b/src/resource.rs
@@ -146,6 +146,8 @@ pub struct ResourceBuilderConfig {
pub resource_template: String,
/// The template used to render a list of resources.
pub resource_list_template: String,
+ /// The template used to render the resource's tag pages.
+ pub tag_list_template: String,
/// Template used when rendering the RSS feed.
pub rss_template: String,
/// The RSS feed's title.
@@ -406,6 +408,7 @@ impl ResourceBuilder {
.collect();
let out = crate::link_list::render_basic_link_list(
builder,
+ &self.config.tag_list_template,
links,
&self.config.tag_list_title,
)?;