Socket
Socket
Sign inDemoInstall

gatsby-starter-try-ghost

Package Overview
Dependencies
16
Maintainers
1
Versions
115
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gatsby-starter-try-ghost

Turn your Ghost blog into a flaring fast static site with Gatsby


Version published
Weekly downloads
70
increased by677.78%
Maintainers
1
Created
Weekly downloads
ย 

Readme

Source

Jamify

Jamify's blog starter

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 an enhanced Ghost Casper look and feel. All content is sourced from a headless Ghost CMS.

ย 

๐Ÿ”ฅ Variants

Favor Next.js over Gatsby? Head over to next-cms-ghost!

ย 

๐ŸŽ“ 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
  • Images with lazy-loading and blur-up effect ๐Ÿš€ ๐Ÿ†•
  • Infinite Scroll โœจ
  • 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 ๐Ÿš€ ๐Ÿ†•

ย 

๐Ÿ“ฆ Included Plugins

The following plugins have been included for convenience:

NameVersionDescription
gatsby-theme-ghost-dark-modeversionDark mode toggle ๐ŸŒ—
gatsby-rehype-ghost-linksversionRewrite CMS links from absolute to relative
gatsby-rehype-prismjsversionSyntax highlighting with PrismJS
gatsby-theme-ghost-members ๐Ÿ†•versionMember 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:

NameVersionDescription
gatsby-rehype-inline-images ๐Ÿ†•versionLazy-loading inline images with blur-up
gatsby-theme-ghost-contactversionContact page
gatsby-theme-ghost-commentoversionCommenting system with Commento
gatsby-theme-ghost-toc ๐Ÿ†•versionTable of Contents
gatsby-plugin-ackee-trackerversionSite tracking with Ackee
gatsby-plugin-google-analyticsversionSite 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

    yarn 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`,

    // 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. There are two ways to make your content keys available. Choose the method according to your build scenario.

Building with cloud providers

If you build your project with a cloud provider (e.g. Gatsby, Netlify, Vercel), the best option is to provide the keys with environment variables:

KeyValue (example)
GHOST_API_URLhttp://localhost:2368
GHOST_CONTENT_API_KEY9fccdb0e4ea5b572e2e5b92942

The place where you can define them depends on the provider, but you usually find the option under the site settings. This avoids publishing keys in a public repository and is most secure.

Building locally

If you build locally or on a private network where the build directory is not accessible to the world, you can safely add a new .ghost.json file in your base directory with the following JSON structure:


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

This file is part of .gitignore to avoid accidentally publishing it to your public repository. Change the apiUrl and contentApiKey to match your own Ghost CMS Content API keys.

ย 

๐Ÿคฏ 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.

ย 

๐Ÿ’ซ Deploy

Deploy to Netlify

Deploy with Vercel

ย 

๐Ÿ”ง Update

It is recommended to install npm-upgrade with sudo npm install npm-upgrade -g. Change into the base directory and update all packages with:

    npm-upgrade

You will be prompted to update all packages within your package.json file. Next, download the new packages:

    yarn
    yarn clean

The update process is now complete and you can start a new build with yarn build (or yarn develop).

ย 

๐Ÿ’ฃ Reporting issues

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

ย 

๐Ÿง Disclaimer

This project is not affiliated with Gatsby or Ghost.

ย 

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

Keywords

FAQs

Last updated on 02 Mar 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with โšก๏ธ by Socket Inc