quarto-dev / quarto-dev/quarto-cli
Add project configuration option to allow pagename.md to be published to /pagename/index.html
Nobody has claimed this yet.
- 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:
Results in:
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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