diff --git a/crates/treehouse/src/html/breadcrumbs.rs b/crates/treehouse/src/html/breadcrumbs.rs
index d64f5ba..211e940 100644
--- a/crates/treehouse/src/html/breadcrumbs.rs
+++ b/crates/treehouse/src/html/breadcrumbs.rs
@@ -17,16 +17,16 @@ pub fn breadcrumbs_to_html(
if element != "index" {
s.push_str("
");
{
- let element = path
+ let short_element = path
.get(i - 1)
.map(|p| format!("{p}/"))
.and_then(|prefix| element.strip_prefix(prefix.as_str()).map(Cow::Borrowed))
.unwrap_or_else(|| Cow::Owned(format!("/{element}")));
write!(
s,
- "{element}",
+ "{short_element}",
site = EscapeAttribute(&config.site),
- element = EscapeAttribute(&element)
+ element = EscapeAttribute(element)
)
.unwrap();
}