How can we make Ghost better?

Theme settings JSON file (like Shopify's settings_schema.json)

To read more about settings_schema.json -> https://docs.shopify.com/themes/theme-development/storefront-editor/settings-schema

I think this idea would fit perfectly with Ghost, and would help keep the theme settings UI consistent with the rest of the backend. It could also be extended to App's when they are officially supported.

240 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    AndrewAndrew shared this idea  ·   ·  Admin →

    11 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Michael EarlsMichael Earls commented  · 

        Here's a +1 vote for considering this approach.

        I have the need to allow users of my theme to set configuration values that need to be included on the page.

        JSON Config Example: { readMoreButton : { cssClass: 'btn-xs btn-success', value: 'Click Me!' } }

        Then, in my theme, i'd simply use:

        <button class='btn {{ readMoreButton.cssClass }}'>{{ readMoreButton.value }}</button>

      • Don McCurdyDon McCurdy commented  · 

        Yes please! I don't have strong preferences on how this should be done (theme settings UI would be excellent, but I'd settle for custom fields in config.js).

        Couple cases I've run into, in the process of forking a theme for my blog –

        * Include a GitHub handle, like current Twitter / Facebook support.
        * Specify Typekit Kit ID for fonts (Google Fonts aren't the only show in town)

      • Anonymous commented  · 

        Is there any workaround for this now? Can i access ENV variables somehow for example?

      • Kiko BeatsKiko Beats commented  · 

        I didn't find a way to do it and I think that could be powerful for develop more complete themes.

        Imagine that you have a structure of your posts in a common file called `post.hb` but, instead of stay here, you have a file called `grid.hbs`

        For visualize your posts need a `post.hbs` file, so let's create one and load the template structure as:

        ```hbs
        {{!< grid }}
        ```

        Now, in another part of your theme (for example, an especial page) you want to use the same structure that a common post, but you want to disable comments and hide the sidebar. Just configure the grid call as:

        ```hbs
        {{!< grid sidebar='false' comments='false' fullscreen='true'}}
        ```
        of course in my grid implementation I must a block (or something) where I do something like:

        ```hbs
        {{#if sidebar}}
        {{> sidebar}}
        {{/if}}
        ```

        so configure the call is useful to avoid duplicate files and keep all in order.

      • Slava KnyazevSlava Knyazev commented  · 

        Okay so I thought of this concept a bunch of times. Users should NEVER be required to edit code in order to use a theme but that happens way too often. I don't like that. I want people do be able to set their twitter or youtube or whatever I want from them directly from the theme selection.

        Oh you want this theme? You should tell us this this and that for a better experience!

        I'm typing in a hurry but you get the idea. How to integrate it? I don't know but be creative!

        Cheers! Gotta run!

      • IreIre commented  · 

        This would be really brilliant

      • David BDavid B commented  · 

        I was just about add something similar.

        Shopify's model for this is really well done, and I agree would suit Ghost perfectly.

      • Lloyd DavidLloyd David commented  · 

        You can hard code your themes options in your .hbs file, then change those cosmetic "CSS" settings via the settings screen, like in tumblr for example, the handle bar type code is added then the visual editor in settings in tumblr, is then used to change the appearance.

      Feedback and Knowledge Base