Skip to content

Internal references #58

Open
Open

Description

@mtomasini

Is there any reason why most of our links are full URLs instead of relative paths? E.g. at line 9 of ./content/_index.md, we link to the Statement of Purpose of SIG SSLA by linking to https://sslarch.github.io/about/ instead of linking simply to ./about/ (which works, I checked).

The reason I raise this is that, for example, I just moved one of our pages under /documents/ to its own page, and of course that would break the whole link once the document is out - while relative links would tend to be more stable.

We are not doing so much linking that this is going to kill the website, I was wondering if there is any good reason for this.

Activity

  1. joeroe commented on Jun 11, 2026

    @joeroe
    Member

    I'm not aware of any reason to use absolute URLs. Using relative URLs also has the advantage that, if we ever add multilingual pages in the future, Hugo can automatically rewrite links to them. You don't need the ./ (i.e. href="about/" is fine).

    Incidentally if you are moving a page you should leave a redirect at the old location, in case there are any incoming links. For example, by adding this to the frontmatter of the "join us" page:

    aliases:
    - documents/becoming_a_member/
    

    Then the old URL https://sslarch.github.io/documents/becoming_a_member/ will redirect to https://sslarch.github.io/join-us/. You should then delete the old source file.

    For reference: https://gohugo.io/content-management/urls/

  2. mtomasini commented on Jun 11, 2026

    @mtomasini
    ContributorAuthor

    Hugo is really cool, but damn the documentation is extensive 🫣

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions