Core Files to change Meta Properties og:title and og:image
-
@SimonQ For topics specifically, they are defined here: https://github.com/NodeBB/NodeBB/blob/master/src/controllers/topics.js#L180-L225
Elsewhere for categories, and all pages have a base set of meta tags as well.
@julian Is there no global file where I can set a default image? I.e. If I wanted to just link the home page to a Facebook link I want it to display an image set by me and not the site-logo.png.
-
I'm looking to change the global meta properties og:title and og:image attributes for my website but can not seem to find the core files. My logo on FB links seem to be cutting off each time so I decided to create a custom image to link to that instead of the default site-logo image set my NodeBB.
Thanks!
NodeBB/src/meta/tags.js at master · NodeBB/NodeBB
Node.js based forum software built for the modern web - NodeBB/src/meta/tags.js at master · NodeBB/NodeBB
GitHub (github.com)
I don't know what'll happen if you define an image here and another image is present in the topic. Give it a try and see.
-
I'm looking to change the global meta properties og:title and og:image attributes for my website but can not seem to find the core files. My logo on FB links seem to be cutting off each time so I decided to create a custom image to link to that instead of the default site-logo image set my NodeBB.
Thanks!
Thanks @julian! The code is a bit daunting and I don't want to risk breaking anything at the moment. Is there any other way for me to change the og:image meta property? I tried adjusting my logo size but, that just made my logo smaller because of NodeBB's resizing in the header.
-
I'm looking to change the global meta properties og:title and og:image attributes for my website but can not seem to find the core files. My logo on FB links seem to be cutting off each time so I decided to create a custom image to link to that instead of the default site-logo image set my NodeBB.
Thanks!
Could this not become part of the admin GUI considering how important this is?
-
S support@community.nodebb.org shared this topic
-
@NodeHam it probably is now. You can customize the brand logo from the ACP now, and have it different from the site logo.
-
Sorry, I meant more than just the logo.
Examples...
-
@NodeHam oh I see, yeah having a dedicated meta and link tag editor in the ACP would be a nice feature.
Feel free to suggest it in the GitHub repo as a feature request
-
Can you let me know the url of the repo in case there are more than one where I need to suggest that?
-
@NodeHam just the one here
Build software better, together
GitHub is where people build software. More than 150 million people use GitHub to discover, fork, and contribute to over 420 million projects.
GitHub (github.com)
-
Ok, thanks.