-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Improve opengraph previews #26851
Improve opengraph previews #26851
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The template refactor was overdue, and the rest looks good too.
@puni9869 that will be a bit hard in this case as |
🚀 |
* giteaofficial/main: [skip ci] Updated licenses and gitignores Update documents to fix some links (go-gitea#26885) clarify aspects of the dump command (go-gitea#26887) Relocate the `RSS user feed` button (go-gitea#26882) Use Go 1.21 and update dependencies (go-gitea#26878) Update docs about attachment path (go-gitea#26883) Refactor "shortsha" (go-gitea#26877) Fix wrong review requested number (go-gitea#26784) Refactor `og:description` to limit the max length (go-gitea#26876) Reorder blocks in vue SFCs (go-gitea#26874) Make it posible to customize nav text color via css var (go-gitea#26807) Enable djlint H008 and fix issues (go-gitea#26869) Improve opengraph previews (go-gitea#26851) Add more descriptive error on forgot password page (go-gitea#26848) Allow users with write permissions for issues to add attachments with API (go-gitea#26837) Move licenses.txt to /assets directory (go-gitea#26866) # Conflicts: # templates/base/footer_content.tmpl
Add more useful Open Graph metadata for commit and file URLs:
og:title
to the page title, which is a concise summary in both cases (<commit message> · <commit hash>
and<filename> at <branch>
, respectively)og:description
to the commit message body, if availableog:url
to the relevant URLs instead of the repo URLAlso move the relevant meta tags into a separate template as they now take up the majority of the base head template.