Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix link to customizing-gitea #25056

Merged
merged 2 commits into from
Jun 3, 2023

Conversation

kodermho
Copy link
Contributor

@kodermho kodermho commented Jun 2, 2023

The link to customizing-gitea in the label documentation is broken. This PR should adjust the relative path to fix the link

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 2, 2023
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jun 2, 2023
Copy link
Member

@silverwind silverwind left a comment

Choose a reason for hiding this comment

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

I wonder if there is a linter to catch these.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jun 2, 2023
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jun 2, 2023
@silverwind
Copy link
Member

@kodermho can you also fix the same link in docs/content/doc/usage/labels.zh-cn.md?

@silverwind silverwind self-requested a review June 2, 2023 19:04
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. labels Jun 2, 2023
@silverwind
Copy link
Member

silverwind commented Jun 2, 2023

Actually I think this may need this format:

[linkname]{{< relref "doc/administration/customizing-gitea.en-us.md" >}}

At least I see this relref format used in various docs files, but not consistently.

@delvh
Copy link
Member

delvh commented Jun 2, 2023

The problem is the explicit section label.
That's probably why it isn't a relref yet.
I initially wanted to note that as well, then I noticed.

@silverwind
Copy link
Member

silverwind commented Jun 2, 2023

I wonder what's the point of these relref. Is this some custom processing that we do? I guess any decent markdown render should be able to produce correct links but I guess it has something to do with our nonstandard language suffixes.

@delvh
Copy link
Member

delvh commented Jun 2, 2023

AFAIK, it's a function we've gotten through Hugo, to render the links correctly.
For example, for relrefs we know at compile time if the link is correct.
For normal links, we can never be sure as they might point at an external URL outside our control.
But yes, that function also handles our localization suffixes.

@silverwind
Copy link
Member

silverwind commented Jun 2, 2023

Ah, this is https://gohugo.io/functions/relref/, but we are not actually using it in the recommended way with two args.

For normal links, we can never be sure as they might point at an external URL outside our control.

Anything that starts with ./ can be statically analyzed and I think writing a linter for this "standard" format would be quite trivial actually.

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jun 2, 2023
@6543 6543 merged commit 7fca405 into go-gitea:main Jun 3, 2023
@GiteaBot GiteaBot added this to the 1.20.0 milestone Jun 3, 2023
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Sep 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants