Replace and fix broken links with hugos relref #801
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As discussed in #764 there are quite a lot of outdated links in the
mastodon documentation. In basically all cases this was resolved by
simply wrapping the old plain markdown link in hugos
relref
function1.
While quite a lot of links on the
/zh-cn/
also appear to be broken,these can not be fixed by just wrapping them in
relref
1. Those areall links to
/spec/
subpages which are just not translated to/zh-cn/
version. Therefore,
/zh-cn/spec/
has been excluded from the automatedchecking as described in the next section.
The page has been checked using the linkchecker2 utility. One process
is running
hugo serve
in order to see all changes in real time andnotice errors directly in your browser. In a separate command prompt the
command
linkchecker http:https://localhost:1313 --ignore-url=/zh-cn/spec
isbeing fired up. Note the
--ignore-url=/zh-cn/spe
to exclude the justnot existing parts of the page as mentioned in the previous paragraph.
There still is some ToDo on the table since quite a lot of the anchors
appear to not be set or at least differ from previous versions. One
example: on
/client/authorized/
is a link to/client/token/#creating-our-application
while the id of referencedheading is
app
. These changes do not fix those Issues as it wouldrequire way more time.
Close #764
Footnotes
https://gohugo.io/functions/relref/ ↩ ↩2
https://github.com/linkchecker/linkchecker ↩