Giter Club home page Giter Club logo

Comments (4)

danielclough avatar danielclough commented on August 25, 2024 1

from gatsby-theme-try-ghost.

styxlab avatar styxlab commented on August 25, 2024

Starting from a fresh clone of gatsby-starter-try-ghost, I was able to build your project without errors. There were some braking changes in the latest updates. One option is to clone gatsby-starter-try-ghost again and go from there.

Otherwise you need to also update gatsby-config.js and package.json. Update: As @danielclough mentions below, this can be achieved by:

  1. yarn add gatsby-theme-ghost-dark-mode gatsby-transformer-rehype gatsby-rehype-ghost-links gatsby-rehype-prismjs prismjs

  2. add the following into gatsby-config.js

{
    resolve: `gatsby-theme-ghost-dark-mode`,
    options: {
        // Set to true if you want your theme to default to dark mode (default: false)
        // Note that this setting has an effect only, if
        //    1. The user has not changed the dark mode
        //    2. Dark mode is not reported from OS
        defaultModeDark: false,
        // If you want the defaultModeDark setting to take precedence
        // over the mode reported from OS, set this to true (default: false)
        overrideOS: false,
    },
},
{
    resolve: `gatsby-transformer-rehype`,
    options: {
        filter: node => (
            node.internal.type === `GhostPost` ||
            node.internal.type === `GhostPage`
        ) && node.slug !== `data-schema`,
        plugins: [
            {
                resolve: `gatsby-rehype-ghost-links`,
            },
            {
                resolve: `gatsby-rehype-prismjs`,
            },
        ],
    },
},
  1. yarn clean
  2. yarn build

from gatsby-theme-try-ghost.

styxlab avatar styxlab commented on August 25, 2024

@danielclough Thanks for explicitly laying out the second option. Unfortunately, markup does not come through if you reply to an issue via email. I have therefore updated the original answer with your findings. Also note that yarn add gatsby-theme-ghost-dark-mode is needed, if you include it in your config.

from gatsby-theme-try-ghost.

styxlab avatar styxlab commented on August 25, 2024

Closing this issue as solved.

from gatsby-theme-try-ghost.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.