Setting up permalinks for posts and other categories of content #1408
Replies: 5 comments 5 replies
-
No, currently links are always mapped to the physical location of content in the site (we'll consider doing slug customization in a future release but it's not an entirely trivial feature as we need to make sure that link resolution and navigation are all aware of the custom slugs) |
Beta Was this translation helpful? Give feedback.
-
I believe redirects/aliases solves this, see https://quarto.org/docs/websites/website-navigation.html#redirects. |
Beta Was this translation helpful? Give feedback.
-
@mcanouil what if I want to use aliases in first place? I mean I want the aliases to be visible on my page, not my real names? Or maybe I dont know how to set them, I just testing them locally |
Beta Was this translation helpful? Give feedback.
-
thank you for quick reply, I understand the complexity related to such mapping; I think that Hugo also has similar limitation, but it has one level of complexity less, as the the post could be created from single markdown file not needing folder and index.qmd; With the current structure quarto is much more suitable for showcasing whole projects and publication (as this is really well mapping to folder), not so much for daily blogging with many files/posts where the folder structure I use for writing might be not the best for the online presentation (as my personal preference); |
Beta Was this translation helpful? Give feedback.
-
Now tracked in: |
Beta Was this translation helpful? Give feedback.
-
I don't know if this is a feature currently (I searched but couldn't find any info on it), but is there a way to set up preferences for permalinks to things like blog posts in
_metadata.yml
in the posts folder? In my previous blog setup (using Hugo and Wowchemy), I had the following inconfig.yaml
, for example:For blog posts, this translated to a hyperlink that started off with the year, followed by month, followed by day, and then the post's slug, which was specified within the post with
slug:
in the YAML header (e.g., //blog-name.netlify.app/post/2022/07/16/slug-for-blog-post/). Others might prefer a smaller hyperlink (e.g.,'/post/:year/:slug'
) or even just the slug. I think setting this up in_metadata.yml
might provide greater consistency. (Apologies if this feature already exists and I've just missed it in the documentation!)Beta Was this translation helpful? Give feedback.
All reactions