Home
Support Forums

How i can change site logo with the help of Netlify CMS?

I am new to netlify and unable to understand how i can made collection schema so if i change site logo from cms so it got changed on main site.
Any help would be appreciated.

Try setting up a file collection with a settings file nested:

collections:
  - name: settings
    label: Settings
    files: 
      - name: general
        label: General settings
        file: data/settings/general.yml
        fields: 
          - {name: logo, label: Site logo, widget: image}

In the designated folder, create a yml file called general.yml and put in your logo:

logo: '/assets/images/logo.svg'

You can now edit the image through the CMS. You can then use that data with your static site generator to display the image.

2 Likes

This is my config.yml file
backend:
name: test-repo

media_folder: public/images
public_folder: /images

collections:

  • name: settings
    label: Settings
    files:
    • name: general
      label: General settings
      file: src/data/logo.json
      fields:
      • {name: logo, label: Site logo, widget: image}

And this is my json file

{
    "logo":"src/assets/img/logo.png"
}

It’s getting saved but not changing on site. :frowning:

Your json file is invalid:

{
  "logo":"src/assets/img/logo.png"
}

1 Like