Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
G

gatsby-starter-casper

> 编程语言
Open source

The Casper theme v1.4 ported to GatsbyJS

197 stars0 likes0 views
WebsiteGitHub

About

The Casper theme v1.4 ported to GatsbyJS

Gatsby Casper Starter

A blog starter for Gatsby, utilizing the popular Casper (v1.4) theme authored by Ghost.io. The project is based on Gatsby Advanced Starter and has a lot on common with the Gatsby Material Starter, but will evolve separately. In this project the single Casper CSS file has been carefully extracted into individual components with only minor tweaks.

This starter also serves as example for the Gatsby-Pagination library.

Demo website.

GatsbyJS V2

This starter currently supports GatsbyJS version 2, which brings progressive web app features such as automatic code and data splitting (by route), prefetching, with service worker/offline-first support and PRPL pattern.

More information on Gatsby can be found here.

GatsbyJS legacy support

This project uses Semantic Versioning which align with major version of GatsbyJS. Thus, GatsbyJS v1 support can be found in 1.x.x releases of this starter, while GatsbyJS v2 support will be found in 2.x.x releases.

Special thanks to hnspn for migration the project to support Gatsby v2.

Features

  • Blazing fast loading times thanks to pre-rendered HTML and automatic chunk loading of JS files
  • Separate components for everything
  • High configurability:
    • Site information
    • Site social profiles
    • Copyright information
    • More!
  • Author segment
    • Name
    • Location
    • Description
    • Links
    • Follow Me button
    • Social profiles
  • Posts in Markdown
    • Code syntax highlighting
    • Embed YouTube videos
    • Embed Tweets
    • Pages support pagination
    • Read More linked paginated pages
  • Tags
    • Separate page for posts under each tag
    • Pages support pagination.
  • Categories (pages generated but not linked in theme)
    • Separate page for posts under each category
  • Disqus support (needs to be uncommented)
    • Notifications about new disqus comments
  • Google Analytics support
  • NPM scripts for GitHub Pages deployment
  • Social features (uncomment code to use)
    • Twitter tweet button
    • Facebook share/share count
    • Google+ share button
    • easily to add more!
  • SEO
    • Sitemap generation
    • robots.txt
    • General description tags
    • Schema.org JSONLD (Google Rich Snippets)
    • OpenGraph Tags (Facebook/Google+/Pinterest)
    • Twitter Tags (Twitter Cards)
  • RSS feeds
  • Loading progress for slow networks
  • Offline support
  • Web App Manifest support
  • Development tools
    • ESLint for linting
    • Prettier for code style
    • Remark-Lint for linting Markdown
    • write-good for linting English prose
    • gh-pages for deploying to GitHub pages
    • CodeClimate configuration file and badge

NOTE: Feel free to check out Gatsby Material Starter if you are interested in a more opinionated starter with Material Design in mind.

Getting Started

Install this starter (assuming Gatsby is installed) by running from your CLI:

bash
gatsby new YourProjectName https://github.com/haysclark/gatsby-starter-casper
gatsby develop

Alternatively, you can clone the repo or a fork of the repo and install it manually.

bash
git clone https://github.com/haysclark/gatsby-starter-casper YourProjectName # Clone the project
cd YourProjectname
rm -rf .git # Optional, you can leave the .git history for future rebasing
npm install # or yarn install
npm run develop # or gatsby develop

Configuration

Edit the export object in data/SiteConfig:

…

You can also optionally set pathPrefix:

javascript
module.exports = {
 // Note: it must *not* have a trailing slash.
      pathPrefix: '/gatsby-starter-casper', // Prefixes all links. For cases when deployed to example.github.io/gatsby-starter-casper/.
}

WARNING: Make sure to edit static/robots.txt to include your domain for the sitemap!

Content

Posts

Posts are authored using Markdown and include some optional YAML frontmatter data properties. Each post should have a separate folder for the .md file in addition to any images or other media related to that post. Posts are stored in a subfolder in the /content/ directory; the target subfolder is set by the blogPostDir property in SiteConfig.js.

Authors

Each post can reference the author of the post, if the author is not set the default author will be used; which is controlled by the blogAuthorId property in SiteConfig.js. All authors, including the default author (aka blodAuthorId) must have an author JSON file. These JSON files MUST be stored in a folder names authors, for Gatsby to parse them correctly. The location of this authors folder can be controlled by the blogAuthorDir property in SiteConfig.js. It IS possible to have the authors folder inside the blogPostDir folder.

Contributing

First off, thanks for taking the time to contribute!

The project uses Conventional Commits which are simple and easy to follow. In general, use your best judgment, and feel free to propose changes by creating an issue and then mention the issue in your pull request.

License

MIT

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

JavaScript

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言