quarto-dev / quarto-dev/quarto-cli

Add support for slug

Open
#6,422 5 comments 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement websites
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Discussed in https://github.com/quarto-dev/quarto-cli/discussions/1408

Originally posted by sciwonder July 15, 2022
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 in config.yaml, for example:

permalinks:
  event: '/talk/:slug/'
  authors: '/author/:slug/'
  tags: '/tag/:slug/'
  categories: '/category/:slug/'
  publication_types: '/publication-type/:slug/'
  post: '/post/:year/:month/:day/:slug'

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!)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Discussion 1408 and compare the requested Hugo/Wowchemy permalink patterns with Quarto's _metadata.yml and post YAML header examples. Done means the issue's requested configurable slug and permalink patterns are defined, implemented, and documented with examples for blog posts and related content types.

Written by the indexing model from the issue text.

Assessment

Tech stack
yaml
Domain
web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.