diff --git a/src/blogs.rs b/src/blogs.rs index 280456ae4..9a06822fc 100644 --- a/src/blogs.rs +++ b/src/blogs.rs @@ -110,10 +110,6 @@ impl Blog { &self.prefix } - pub(crate) fn path_back_to_root(&self) -> PathBuf { - self.prefix.components().map(|_| Path::new("../")).collect() - } - pub(crate) fn posts(&self) -> &[Post] { &self.posts } diff --git a/src/lib.rs b/src/lib.rs index eb44c43e5..2ff5adb22 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -186,7 +186,6 @@ impl Generator { "title": blog.index_title(), "blog": blog, "other_blogs": other_blogs, - "root": blog.path_back_to_root(), }); let path = blog.prefix().join("index.html"); self.render_template(&path, "index.html", data)?; @@ -209,7 +208,6 @@ impl Generator { "title": format!("{} | {}", post.title, blog.title()), "blog": blog, "post": post, - "root": blog.path_back_to_root().join("../../../"), }); let path = path.join(filename); diff --git a/templates/footer.html b/templates/footer.html index e5bd89fdc..af5ff7c20 100644 --- a/templates/footer.html +++ b/templates/footer.html @@ -1,4 +1,4 @@ -{% macro footer(root) -%} +{% macro footer() -%} - + {% endmacro %} diff --git a/templates/headers.html b/templates/headers.html index 1edacedb0..dd5e0291c 100644 --- a/templates/headers.html +++ b/templates/headers.html @@ -1,4 +1,4 @@ -{% macro headers(root, title, blog) -%} +{% macro headers(title, blog) -%} @@ -15,23 +15,23 @@ - - - - + + + + - - - - - - + + + + + + @@ -39,5 +39,5 @@ - + {% endmacro %} diff --git a/templates/index.html b/templates/index.html index 4dd3597ad..fabccbf68 100644 --- a/templates/index.html +++ b/templates/index.html @@ -11,7 +11,7 @@

See also: {%- for other in other_blogs %} - {{other.link_text | escape_hbs}} + {{other.link_text | escape_hbs}} {%- endfor %}

diff --git a/templates/layout.html b/templates/layout.html index b08f1e7b8..5e8edd71b 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -8,11 +8,11 @@ {{ title | escape_hbs }} - {{ headers::headers(root=root, title=title, blog=blog) | indent(prefix=" ", blank=true) }} + {{ headers::headers(title=title, blog=blog) | indent(prefix=" ", blank=true) }} - {{ nav::nav(root=root, blog=blog) | indent(prefix=" ", blank=true) }} + {{ nav::nav(blog=blog) | indent(prefix=" ", blank=true) }} {%- block page %}{% endblock page %} - {{ footer::footer(root=root) | indent(prefix=" ", blank=true) }} + {{ footer::footer() | indent(prefix=" ", blank=true) }} diff --git a/templates/nav.html b/templates/nav.html index 843c29d1c..296974b7f 100644 --- a/templates/nav.html +++ b/templates/nav.html @@ -1,8 +1,8 @@ -{% macro nav(root, blog) -%} +{% macro nav(blog) -%} {% endmacro %}