go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
44.94k stars 5.48k forks source link

Canonical link for SEO #17426

Open ghost opened 3 years ago

ghost commented 3 years ago

Feature Description

Gitea should include a canonical link in the HTML to help with SEO. I've noticed bots wasting time crawling issues pages etc with random different parameters. I could disallow indexing on query strings but based on a little research, the proper way is for the page to have a canonical url without the parameters.

I do not have any issue trackers with more than once page so I'm not sure whether page number uses query parameter or not.

Screenshots

lunny commented 3 years ago

Hi, Could you help to send a PR to resolve this?