Skip to content

The Ghost Casper theme is alright, let's make it good.

License

Notifications You must be signed in to change notification settings

shrimpynuts/casper-custom

Repository files navigation

Casper-Custom

This is Ghost theme with slight variations on the default Casper theme.

Local development

Go to ghost local directory and run ghost start.

Then go to this package, and run yarn dev.

Now, updates will be hot-loaded, and if the file alias is setup correctly, the ghost instance should update on every reload.

Compile

Run yarn zip, and take the zip file and upload to ghost dashboard.

Roadmap:

  • Split home article feeds with featured / thoughts
  • Disqus comment integration
  • Archive page
  • Remove footer
  • Make header light themed

The main files are:

  • default.hbs - The parent template file, which includes your global header/footer
  • index.hbs - The main template to generate a list of posts, usually the home page
  • post.hbs - The template used to render individual posts
  • page.hbs - Used for individual pages
  • tag.hbs - Used for tag archives, eg. "all posts tagged with news"
  • author.hbs - Used for author archives, eg. "all posts written by Jamie"

One neat trick is that you can also create custom one-off templates by adding the slug of a page to a template file. For example:

  • page-about.hbs - Custom template for an /about/ page
  • tag-news.hbs - Custom template for /tag/news/ archive
  • author-ali.hbs - Custom template for /author/ali/ archive

Development

Casper styles are compiled using Gulp/PostCSS to polyfill future CSS spec. You'll need Node, Yarn and Gulp installed globally. After that, from the theme's root directory:

# install dependencies
yarn install

# run development server
yarn dev

Now you can edit /assets/css/ files, which will be compiled to /assets/built/ automatically.

The zip Gulp task packages the theme files into dist/<theme-name>.zip, which you can then upload to your site.

# create .zip file
yarn zip

About

The Ghost Casper theme is alright, let's make it good.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published