quarto-dev / quarto-dev/quarto-cli

Add project configuration option to allow pagename.md to be published to /pagename/index.html

Open
#6,467 2 comments 3 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

Rendering subpages in a Quarto website to directory URLs like mywebsite.com/about/ and mywebsite.com/blog/my-first-post/ isn't possible without having to resort to creating directories in the Quarto project with index.qmd files inside that directory, or alternatively using aliases.

One drawback of the directory with inside an index.qmd approach is that almost every file in your Quarto website project is now called index.qmd, making it quite tricky to differentiate them when working on the website.

Many static site generators allow you to create a Markdown file like about.md and generate that content in the published website as /about/index.html. An example of this is Hugo. From the documentation:

This structure:
image
Results in:
image

As you can see here, les-miserables.md gets converted to les-miserables/index.html.

I think this would be a super useful feature to have in Quarto as a one-line configuration option, perhaps something optional in the _quarto.yml configuration file. It would make it much easier to manage the website.

An alias could do the same thing, but this is such a common behaviour that I feel it's inefficient to have to add a specific alias for every single Markdown file.

Originally posted by @jozilla in https://github.com/quarto-dev/quarto-cli/discussions/6398#discussioncomment-6671578

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 by tracing how the project-level _quarto.yml configuration controls website rendering and how Markdown pages map to published paths. Done means an optional setting publishes pagename.md as /pagename/index.html without requiring per-page aliases or index.qmd files.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.