Skip to content

Always add a trailing slash if missing to the configured baseURL #11669

Closed
@bep

Description

@bep

E.g.

  • https://example.com => https://example.com/
  • https://example.com/docs => https://example.com/docs/

This is an example of why it can be problematic to expose configuration as API (site.BaseURL).

Note that to me the important part is to standardise it, so we could do

  • https://example.com/ => https://example.com

If that's considered less breaking.

Note that I strongly recommend not using `site.BaseURL´ to construct URLs.

/cc @jmooring

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions