Per-Project Logo to use as og:image (for social posts) #1714

Closed
opened 2025-11-02 04:10:45 -06:00 by GiteaMirror · 6 comments
Owner

Originally created by @coolaj86 on GitHub (Apr 20, 2018).

If I paste a project link into Facebook, LinkedIn, Twitter, etc it will first try to read from the og:image tag to get the photo that it should use in the image preview.

For example, https://git.coolaj86.com/coolaj86/greenlock.js shows this in the <head>:

<meta property="og:image" content="https://secure.gravatar.com/avatar/0a8b345ddcfc5401f578c850442f1e1b?d=identicon">

And shows this preview:

screen shot 2018-04-20 at 3 13 36 pm

However, I have a specific logo for this project and I would rather show the project logo than my own headshot.

I kindly request a feature to be added which would allow a specific logo to be chosen. For example, if there is a .githeme/logo.png or .gittheme/logo.jpg in the project repository, that that be used instead of the default author logo.

branch master:

.gittheme
.gittheme/logo.png
main.go
README.md

I'd also like to have a feature so that if .gittheme/config.yml exists that it specifies whether the logo (if none is present already) be pulled from the author, organization, or site. For example:

.gittheme/config.yml:

logo: 'site'
Originally created by @coolaj86 on GitHub (Apr 20, 2018). If I paste a project link into Facebook, LinkedIn, Twitter, etc it will first try to read from the `og:image` tag to get the photo that it should use in the image preview. For example, https://git.coolaj86.com/coolaj86/greenlock.js shows this in the `<head>`: ``` <meta property="og:image" content="https://secure.gravatar.com/avatar/0a8b345ddcfc5401f578c850442f1e1b?d=identicon"> ``` And shows this preview: ![screen shot 2018-04-20 at 3 13 36 pm](https://user-images.githubusercontent.com/122831/39074146-80fb1c0e-44ad-11e8-83c1-5ceb26eebf68.png) However, I have a specific logo for this project and I would rather show the project logo than my own headshot. I kindly request a feature to be added which would allow a specific logo to be chosen. For example, if there is a `.githeme/logo.png` or `.gittheme/logo.jpg` in the project repository, that that be used instead of the default author logo. `branch master`: ``` .gittheme .gittheme/logo.png main.go README.md ``` I'd also like to have a feature so that if `.gittheme/config.yml` exists that it specifies whether the logo (if none is present already) be pulled from the author, organization, or site. For example: `.gittheme/config.yml`: ``` logo: 'site' ```
GiteaMirror added the type/proposaltype/enhancement labels 2025-11-02 04:10:45 -06:00
Author
Owner

@lafriks commented on GitHub (Apr 21, 2018):

I would rather see this as setting in database not in git (also from performance point of view)

@lafriks commented on GitHub (Apr 21, 2018): I would rather see this as setting in database not in git (also from performance point of view)
Author
Owner

@coolaj86 commented on GitHub (Apr 23, 2018):

Performance is a non-issue. All of the top-level git file structure is already cached anyway.

Putting it in a database would make it proprietary and non-portable.

As the number of git systems grows, I hope that a standard emerges so that features like default issue templates and og tags work just as well in gitea as they do on github or gitlab.

@coolaj86 commented on GitHub (Apr 23, 2018): Performance is a non-issue. All of the top-level git file structure is already cached anyway. Putting it in a database would make it proprietary and non-portable. As the number of git systems grows, I hope that a standard emerges so that features like default issue templates and og tags work just as well in gitea as they do on github or gitlab.
Author
Owner

@saitho commented on GitHub (May 1, 2019):

Related to #694

@saitho commented on GitHub (May 1, 2019): Related to #694
Author
Owner

@lunny commented on GitHub (May 6, 2019):

@solderjs maybe @sergey-dryabzhinsky could also solve this one in his coming PR.

@lunny commented on GitHub (May 6, 2019): @solderjs maybe @sergey-dryabzhinsky could also solve this one in his coming PR.
Author
Owner

@lunny commented on GitHub (Jul 6, 2019):

Since #694 closed by #6986, this is easy to implement.

@lunny commented on GitHub (Jul 6, 2019): Since #694 closed by #6986, this is easy to implement.
Author
Owner

@6543 commented on GitHub (Sep 7, 2020):

closed by https://github.com/go-gitea/gitea/pull/12586

@6543 commented on GitHub (Sep 7, 2020): closed by https://github.com/go-gitea/gitea/pull/12586
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1714