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

Created on 20 Apr 2018  路  6Comments  路  Source: go-gitea/gitea

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'
kinenhancement kinproposal

Most helpful comment

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

All 6 comments

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

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.

Related to #694

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

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

internalfx picture internalfx  路  3Comments

tuxfanou picture tuxfanou  路  3Comments

haytona picture haytona  路  3Comments

jonasfranz picture jonasfranz  路  3Comments

kolargol picture kolargol  路  3Comments