middleman / middleman-blog

Blog Engine Extension for Middleman
https://middlemanapp.com
MIT License
325 stars 179 forks source link

Calendar and tag pages without .html aren't rendered within layout automatically #375

Open a2ikm opened 4 years ago

a2ikm commented 4 years ago

Expected behaviour

Even if year_link, month_link, day_link and tag_link don't end with .html, their pages are rendered within layout automatically like article pages.

Actual behaviour

These calendar and tag pages are not rendered within layout. If layout: some_layout_name option is specified in their templates, they are rendered within layout.

I guess, article pages inherit blog_options.layout at here, but calendar and tag pages don't. Additionally, pages without .html don't match with extensions_with_layout at here. So explicit layout option is required.

Steps to reproduce the problem

I uploaded a sample project to reproduce it at https://github.com/a2ikm/middleman-blog-test. Its config.rb have chages against default like this:

diff --git a/config.rb b/config.rb
index a373af1..a30c7aa 100644
--- a/config.rb
+++ b/config.rb
@@ -24,16 +24,16 @@
   # This will add a prefix to all links, template references and source paths
   # blog.prefix = "blog"

-  # blog.permalink = "{year}/{month}/{day}/{title}.html"
+  blog.permalink = "{year}/{month}/{day}/{title}"
   # Matcher for blog source files
   # blog.sources = "{year}-{month}-{day}-{title}.html"
-  # blog.taglink = "tags/{tag}.html"
+  blog.taglink = "tags/{tag}"
   # blog.layout = "layout"
   # blog.summary_separator = /(READMORE)/
   # blog.summary_length = 250
-  # blog.year_link = "{year}.html"
-  # blog.month_link = "{year}/{month}.html"
-  # blog.day_link = "{year}/{month}/{day}.html"
+  blog.year_link = "{year}"
+  blog.month_link = "{year}/{month}"
+  blog.day_link = "{year}/{month}/{day}"
   # blog.default_extension = ".markdown"

   blog.tag_template = "tag.html"

Additional information

markets commented 4 months ago

ℹ️ This issue is stale because it has been open for more than 90 days with no activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.