Replies: 1 comment 1 reply
-
Interesting question! I think canonically a trailing slash indicates that directory (I.e. the
This is probably the heart of the question. Statiq contains a setting I see two options (or both) going forward:
I don't think either one will be too complicated, assuming I'm understanding the requirement correctly. Let me see what I can do. |
Beta Was this translation helpful? Give feedback.
-
I decided on using
index.md
for my blog posts (and naming the folder the title of my blog post), so any post-specific content (images, etc) can stay in the same directory as the blog post. For example, I have URLs such as:https://domain.test/blog/my-first-post/ (this is index.html)
https://domain.test/blog/my-first-post/image.png
However, the document believes its canonical URL does not contain the trailing slash. Therefore, the canonical URL in the HTML header, the URL in the ATOM and RSS feeds, and links from the homepage all point to the "no slash" URL, which the web server then redirects to the slash.
How do I configure statiq to generate URLs for document that retain the trailing
/
when the document is otherwise ending withindex.html
?edit: I just noticed on Google Webmaster Tools that I have a whole bunch of excluded pages of type "Alternative page with proper canonical tag". It appears that my pages are still getting indexed, but when I see errors or excluded pages, it makes me a bit worried, so I really would like to fix this.
Beta Was this translation helpful? Give feedback.
All reactions