Skip to content

Quarto should output websites with "pretty" URLs #2065

Open

Description

@sellorm

When using quarto to build websites, some static site generators, for instance mkdocs, create sites with "pretty" URLs by default. It would be great if Quarto also did this.

For instance, in a project containing the file science.md, quarto render will generate that as science.html, resulting in a URL like, https://example.com/science.html. In contrast, mkdocs build would generate it as science/index.html, meaning that, when published, it could be accessed at https://example.com/science/.

The current workaround would be to create the original file at science/index.md, in which case, both quarto and mkdocs would generate the same HTML in the same places.

This is important for sites that might be considering migrating to quarto that are not currently structured along the lines of the workaround.

Activity

  1. eitsupi commented on Aug 23, 2022

    @eitsupi
    Contributor

    I believe this can be worked around by simply setting an alias. (No need to rename the file)
    https://quarto.org/docs/websites/website-navigation.html#redirects

    ---
    title: science
    aliases:
      - /science/
    ---
  2. added this to the v1.3 milestone on Sep 14, 2022
  3. added
    needs-discussion
    on Sep 14, 2022
  4. ghost removed
    needs-discussion
    on Sep 14, 2022
  5. added
    enhancement
    on Nov 15, 2022
  6. modified the milestones: v1.3, Future on Nov 15, 2022
  7. added
    websites
    on Mar 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementwebsites

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions