Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

agnos.is Forums

  1. Home
  2. Tech
  3. Core Files to change Meta Properties og:title and og:image

Core Files to change Meta Properties og:title and og:image

Scheduled Pinned Locked Moved Tech
12 Posts 3 Posters 20 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S This user is from outside of this forum
    S This user is from outside of this forum
    [email protected]
    wrote on last edited by
    #1

    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!

    julian@community.nodebb.orgJ S N 4 Replies Last reply
    0
    • S [email protected]

      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!

      julian@community.nodebb.orgJ This user is from outside of this forum
      julian@community.nodebb.orgJ This user is from outside of this forum
      [email protected]
      wrote on last edited by
      #2

      @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.

      S 1 Reply Last reply
      0
      • julian@community.nodebb.orgJ [email protected]

        @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.

        S This user is from outside of this forum
        S This user is from outside of this forum
        [email protected]
        wrote on last edited by
        #3

        @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.

        1 Reply Last reply
        0
        • S [email protected]

          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!

          julian@community.nodebb.orgJ This user is from outside of this forum
          julian@community.nodebb.orgJ This user is from outside of this forum
          [email protected]
          wrote on last edited by
          #4

          https://github.com/NodeBB/NodeBB/blob/master/src/meta/tags.js#L9

          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.

          1 Reply Last reply
          0
          • S [email protected]

            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!

            S This user is from outside of this forum
            S This user is from outside of this forum
            [email protected]
            wrote on last edited by
            #5

            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.

            1 Reply Last reply
            0
            • S [email protected]

              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!

              N This user is from outside of this forum
              N This user is from outside of this forum
              [email protected]
              wrote on last edited by
              #6

              Could this not become part of the admin GUI considering how important this is?

              1 Reply Last reply
              0
              • julian@community.nodebb.orgJ This user is from outside of this forum
                julian@community.nodebb.orgJ This user is from outside of this forum
                [email protected]
                wrote on last edited by
                #7

                @NodeHam it probably is now. You can customize the brand logo from the ACP now, and have it different from the site logo.

                1 Reply Last reply
                0
                • N This user is from outside of this forum
                  N This user is from outside of this forum
                  [email protected]
                  wrote on last edited by
                  #8

                  Sorry, I meant more than just the logo.

                  Examples...

                  
                  
                  
                  
                  
                  
                  
                  
                  
                  
                  
                  
                  
                  1 Reply Last reply
                  0
                  • julian@community.nodebb.orgJ This user is from outside of this forum
                    julian@community.nodebb.orgJ This user is from outside of this forum
                    [email protected]
                    wrote on last edited by
                    #9

                    @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 😄

                    1 Reply Last reply
                    0
                    • N This user is from outside of this forum
                      N This user is from outside of this forum
                      [email protected]
                      wrote on last edited by
                      #10

                      Can you let me know the url of the repo in case there are more than one where I need to suggest that?

                      1 Reply Last reply
                      0
                      • julian@community.nodebb.orgJ This user is from outside of this forum
                        julian@community.nodebb.orgJ This user is from outside of this forum
                        [email protected]
                        wrote on last edited by
                        #11

                        @NodeHam just the one here 😄

                        https://github.com/NodeBB/NodeBB/issues/new?template=feature-request.yml

                        1 Reply Last reply
                        0
                        • N This user is from outside of this forum
                          N This user is from outside of this forum
                          [email protected]
                          wrote on last edited by
                          #12

                          Ok, thanks.

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups