Skip to content

Conversation

@ferringb
Copy link

@ferringb ferringb commented Jan 3, 2024

This isn't visible in a local hugo server, but the links were using absolute pathing, and in the prod deploy everything is prefixed with /distribution/ .

Overriding the hugo prefix for deploy is another option, but this repo uses relative pathing, so these were fixed accordingly.

This isn't visible in a local hugo server, but the links
were using absolute pathing, and in the prod deploy everything
is prefixed with /distribution/ .

Overriding the hugo prefix for deploy is another option, but
this repo uses relative pathing, so these were fixed accordingly.

Signed-off-by: Brian Harring <ferringb@gmail.com>
@milosgajdos milosgajdos requested a review from thaJeztah January 3, 2024 10:18
### Alternatives

If you just want authentication for your registry, and are happy maintaining users access separately, you should really consider sticking with the native [basic auth registry feature](/about/deploying#native-basic-auth).
If you just want authentication for your registry, and are happy maintaining users access separately, you should really consider sticking with the native [basic auth registry feature](../../about/deploying#native-basic-auth).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These links seem to be broken when rendering on GitHub. Wondering if it works to link to the markdown file instead. I _think _ Hugo replaces those with the correct links; in that case I think they also need one ../ level removed, but haven't tried;

Suggested change
If you just want authentication for your registry, and are happy maintaining users access separately, you should really consider sticking with the native [basic auth registry feature](../../about/deploying#native-basic-auth).
If you just want authentication for your registry, and are happy maintaining users access separately, you should really consider sticking with the native [basic auth registry feature](../about/deploying.md#native-basic-auth).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pathing I used there is correct btw, at least for hugo. The (.*\.md) I'd avoid personally since encoding the template isn't really a norm in hugo- in my limited experience. I'm not sure I'd worry about the github linkage anyways, since nothing else in this repo has that.

> **Warning**: For the scheduler to clean up old entries, `delete` must
> be enabled in the registry configuration. See
> [Registry Configuration](/about/configuration) for more details.
> [Registry Configuration](../../about/configuration) for more details.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for the others;

Suggested change
> [Registry Configuration](../../about/configuration) for more details.
> [Registry Configuration](../about/configuration.md) for more details.

@ferringb ferringb closed this Jan 4, 2024
@ferringb
Copy link
Author

ferringb commented Jan 4, 2024

@thaJeztah Closing this out since it's a larger issue then just what I drove by/fixed while looking at your docs. For reference, take a look at https://distribution.github.io/distribution/about/configuration/#storage and check backend links like azure. Those are also broke.

For reference, the way I've always done what you're doing is via using hugo's ref and relref functionality, rather than hardcoded pathing. The function tag approach has the benefit that hugo should be able to flag broken internal links like the ones I've been referencing.

I may take a stab at doing the conversion (purely for my own hugo practice), but this level of breakage is something I think y'all probably want to handle. That's a lot of docs to touch, in short.

As an interim hack to hack it until it's fixed properly, you might want to look into https://gohugo.io/content-management/urls/#relative-urls . Thar be dragons- if you try that, run hugo serve --baseURL http://localhost:1313/distribution/ and run a broken link checker against it before trusting it.

If I wasn't clear in what I was pointing at for above, feel free to ping; pardon for kicking it back your way. I literally was just cutting a few fix's while looking at your docs, this isn't in the path of what I'm trying to get done ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants