GithubHelp home page GithubHelp logo

jamify-media's Introduction

gatsby-starter-try-ghost

Released under MIT license. gatsby-starter-try-ghost npm package version.

A Gatsby starter for creating blogs from headless Ghost CMS.

Turn your Ghost blog into a flaring fast static website. This Gatsby theme is a front-end replacement of the Ghost Handlebars engine featuring the standard Ghost Casper skin and functionality. All content is sourced from a headless Ghost CMS.

Tutorials โœจ ๐Ÿ†•

Check out the Tutorials for practical guides on using this project.

Demo

Play with the Demo to get a first impression.

gatsby-starter-try-ghost

ย 

Features

  • Ghost Casper look and feel
  • Infinite Scroll โœจ ๐Ÿ†•
  • Gatsby images ๐Ÿš€
  • Featured posts pinned on top ๐Ÿ†•
  • Sticky navigation headers
  • Hover on author avatar
  • Styled 404 page
  • SEO optimized
  • Fully responsive
  • Advanced routing ๐Ÿ†•
  • Composable and extensible
  • Incremental build enabled ๐Ÿš€ ๐Ÿ†•

Performance

Lighthouse Score

Included Plugins

The following plugins have been included for convenience:

Name Version Description
gatsby-theme-ghost-dark-mode version Dark mode toggle ๐ŸŒ—
gatsby-rehype-ghost-links version Rewrite CMS links from absolute to relative
gatsby-rehype-prismjs version Syntax highlighting with PrismJS
gatsby-theme-ghost-members ๐Ÿ†• version Member Subscriptions

If you don't need them, you can take them out in gatsby-config.js and package.json which may save you some time during the build process.

More Plugins

Additional features can be integrated by installing Gatsby themes or plugins. The following plugins have been tested to work with gatsby-starter-try-ghost:

Name Version Description
gatsby-theme-ghost-contact version Contact page
gatsby-theme-ghost-commento version Commenting system with Commento
gatsby-theme-ghost-toc ๐Ÿ†• version Table of Contents
gatsby-plugin-ackee-tracker version Site tracking with Ackee
gatsby-plugin-google-analytics version Site tracking with Google Analytics

Getting Started

  1. Install this starter by running

    gatsby new try-ghost https://github.com/styxlab/gatsby-starter-try-ghost
  2. Change directory

    cd try-ghost
  3. Run

    gatsby develop

    and visit your site at http://localhost:8000.

Configure

    //siteConfig.js
    module.exports = {
        // Do not include a trailing slash!
        siteUrl: `https://your-blog.com`,

        // Maximum number of post shown per page
        // Infinite Scroll: Initial chunk of posts, subsequent posts are fetched one by one
        postsPerPage: 3, 
    
        // This allows an alternative site title for meta data for pages.
        siteTitleMeta: `Gatsby Starter Ghost CMS`, 

        // This allows an site description for meta data for pages.
        siteDescriptionMeta: `Turn your Ghost blog into a flaring fast static site with Gatsby`, 
    
        // Change to the width and height of your default share image
        shareImageWidth: 1000, 
        shareImageHeight: 523,
    
        // Used for App and Offline manifest e.g. Mobile Home Screen
        shortTitle: `Ghost`, 
        siteIcon: `favicon.png`, 
        backgroundColor: `#e9e9e9`,
        themeColor: `#15171A`,

        // Include Gatsby images for lazy loading and image optimizations (default: true)
        gatsbyImages: true,

        // Overwrite navigation menu (default: []), label is case sensitive
        // overwriteGhostNavigation: [{ label: `Home`, url: `/` }],
    }

In the configuration shown above, the most important fields to be changed are siteUrl, siteTitleMeta and siteDescriptionMeta. Update at least those to fit your needs.

Ghost Content API keys

All content is sourced from a Ghost CMS. By default, content is fetched from the demo location at https://cms.gotsby.org. Surely you want to source your own content. In your base directory try-ghost, add a new file .ghost.json that contains the following JSON structure:

    {
        "development": {
            "apiUrl": "http://localhost:2368",
            "contentApiKey": "9fccdb0e4ea5b572e2e5b92942"
        },
        "production": {
            "apiUrl": "http://localhost:2368",
            "contentApiKey": "9fccdb0e4ea5b572e2e5b92942"
        }
    }

Change the url and keys to match your own Ghost CMS Content API keys.

Deploy

    gatsby build

After completion of the build process your static site can be found in the public/ folder. Copy those files over to your webserver.

Deploy on Gatsby Cloud

Fork gatsby-starter-try-ghost in GitHub. After logging into Gatsby Cloud make sure Gatsby Cloud has access rights to your forked repository. Select I already have a Gatsby Site and then pick gatsby-starter-try-ghost. Skip integrations. For a first test also skip content keys. The build should start immediately and show the demo site. Provide content keys in order to source in your own content from Ghost CMS.

Ensure headless mode of Ghost CMS

For best SEO results it is strongly recommended to disable the default Ghost Handlebars theme front-end by selecting the Make this site private flag within your Ghost admin settings. This enables password protection in front of the Ghost install and sets <meta name="robots" content="noindex" /> so your Gatsby front-end becomes the authoritative source for search engines.

Reporting issues

Please report all bugs and issues at gatsby-theme-try-ghost/issues as all development is happening there.

Copyright & License

Copyright (c) 2020 styxlab - Released under the MIT license.

jamify-media's People

Contributors

styxlab avatar

Watchers

 avatar  avatar

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.