summaryrefslogtreecommitdiffstats
path: root/models/packages/package_version.go
diff options
context:
space:
mode:
authorJohn Olheiser <john.olheiser@gmail.com>2023-04-28 15:51:17 -0500
committerGitHub <noreply@github.com>2023-04-28 15:51:17 -0500
commitbc784a705bc5a49ddb3ceffe1ef1205fd15f0c08 (patch)
tree0ab880a2395b69cc309ae8e7dd5b41e3da027361 /models/packages/package_version.go
parent3843252938e55b0e769d2291afea73242e255b1b (diff)
downloadgitea-bc784a705bc5a49ddb3ceffe1ef1205fd15f0c08.tar.gz
gitea-bc784a705bc5a49ddb3ceffe1ef1205fd15f0c08.zip
Override alias template to preserve anchor fragment (#24394)
This PR fixes an annoyance where docs aliases aren't preserving their anchor fragments. The refactor included aliases to keep old links from dying, but currently they redirect without their anchor, which was used _often_ to jump to sections. This overrides the alias template with an alternative that preserves the anchor fragment. To note, this is just a copy of the [embedded template](https://github.com/gohugoio/hugo/blob/5c7b79cf7f00aa2651dd5f0364ee575af6715a31/tpl/tplimpl/embedded/templates/alias.html), but defaults to a JS redirect that preserves the anchor, and uses the meta tag as a fallback for noscript users. --------- Signed-off-by: jolheiser <john.olheiser@gmail.com>
Diffstat (limited to 'models/packages/package_version.go')
0 files changed, 0 insertions, 0 deletions