Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
gatsby-starter-try-ghost
Advanced tools
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.
Check out the Tutorials for practical guides on using this project.
Play with the Demo to get a first impression.
The following plugins have been included for convenience:
Name | Version | Description |
---|---|---|
gatsby-theme-ghost-dark-mode | Dark mode toggle 🌗 | |
gatsby-rehype-ghost-links | Rewrite CMS links from absolute to relative | |
gatsby-rehype-prismjs | Syntax highlighting with PrismJS | |
gatsby-theme-ghost-members 🆕 | 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.
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-rehype-inline-images 🆕 | Lazy-loading inline images with blur-up | |
gatsby-theme-ghost-contact | Contact page | |
gatsby-theme-ghost-commento | Commenting system with Commento | |
gatsby-theme-ghost-toc 🆕 | Table of Contents | |
gatsby-plugin-ackee-tracker | Site tracking with Ackee | |
gatsby-plugin-google-analytics | Site tracking with Google Analytics |
Install this starter by running
gatsby new try-ghost https://github.com/styxlab/gatsby-starter-try-ghost
Change directory
cd try-ghost
Run
gatsby develop
and visit your site at http://localhost:8000
.
//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.
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.
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.
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.
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.
Please report all bugs and issues at gatsby-theme-try-ghost/issues as all development is happening there.
Copyright (c) 2020 styxlab - Released under the MIT license.
FAQs
Turn your Ghost blog into a flaring fast static site with Gatsby
The npm package gatsby-starter-try-ghost receives a total of 8 weekly downloads. As such, gatsby-starter-try-ghost popularity was classified as not popular.
We found that gatsby-starter-try-ghost demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.