WorldCasper2 is Casper 2.x, Ghost's default theme, made translatable into any language (branch i18n-translatable-frontend)
Clone or download
Latest commit c165352 Nov 24, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Slack -> Forum Apr 2, 2018
assets [i18n] Theme's assets/locales folder moved to locales Nov 1, 2018
locales Added Hungarian locale Nov 17, 2018
partials no parenthesis around (name) in translation helper Nov 1, 2018
.editorconfig Add the same .editorconfig as from the Ghost repository (#384) Sep 18, 2017
.gitignore Add a Gulp task to create the zip (#374) Sep 18, 2017
.travis.yml 🛠 Added .travis.yml and gscan tests (#470) Aug 14, 2018
CONTRIBUTING.md [i18n] Added CONTRIBUTING.md file Nov 1, 2018
LICENSE 2018 Jan 2, 2018
README.md Updated README.md Nov 17, 2018
author.hbs [i18n] WorldCasper2: Translatable clone of Casper 2.0, Ghost's defaul… Nov 1, 2018
default.hbs [i18n] Meta title: Translatable pagination Nov 1, 2018
error-404.hbs Made error pages translatable and initiated English and French files … Nov 1, 2018
error.hbs Made error pages translatable and initiated English and French files … Nov 1, 2018
gulpfile.js Minified js (#485) Oct 12, 2018
index.hbs Remove unnecessary role attributes from main element Apr 17, 2018
package.json Upgrading Casper to 2.7.0 Oct 16, 2018
page.hbs 🐛 Fixed image positioning on pages Aug 21, 2018
post.hbs [i18n] More placeholders in translations Nov 1, 2018
subscribe.hbs [i18n] Updated all translations: New strings, apostrophes... Nov 1, 2018
tag.hbs [i18n] WorldCasper2: Translatable clone of Casper 2.0, Ghost's defaul… Nov 1, 2018
yarn.lock Minified javascript in zip(#476) Oct 8, 2018

README.md

WorldCasper2

WorldCasper2 is Casper 2.x, Ghost's default theme, made translatable into any language.

For example, in .hbs theme templates:

{{t "Get the latest posts delivered right to your inbox"}}

Currently available languages:

  • Brazilian Portuguese (pt-BR)
  • Canadian French (fr-CA)
  • Chinese (zh)
  • Croatian (hr)
  • English (en)
  • Finnish (fi)
  • French (fr)
  • German (de)
  • Hungarian (hu)
  • Indonesian (id)
  • Italian (it)
  • Lithuanian (lt)
  • Norwegian Bokmål (nb)
  • Polish (pl)
  • Romanian (ro)
  • Russian (ru)
  • Spanish (es)
  • Swedish (sv)
  • Turkish (tr)

The master branch is Casper.

The translatable branch is i18n-translatable-frontend.

For Casper 1.4 made translatable, see WorldCasper1.

Details in Ghost's blog post Theme translations and blog localisation.

Casper

The default theme for Ghost. This is the latest development version of Casper. If you're just looking to download the latest release, head over to the releases page.

 

screenshot-desktop

 

First time using a Ghost theme?

Ghost uses a simple templating language called Handlebars for its themes.

We've documented our default theme pretty heavily so that it should be fairly easy to work out what's going on just by reading the code and the comments. Once you feel comfortable with how everything works, we also have full theme API documentation which explains every possible Handlebars helper and template.

The main files are:

  • default.hbs - The main template file
  • index.hbs - Used for the home page
  • post.hbs - Used for individual posts
  • page.hbs - Used for individual pages
  • tag.hbs - Used for tag archives
  • author.hbs - Used for author archives

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

  • page-about.hbs - Custom template for the /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:

$ yarn install
$ 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.

$ yarn zip

PostCSS Features Used

  • Autoprefixer - Don't worry about writing browser prefixes of any kind, it's all done automatically with support for the latest 2 major versions of every browser.
  • Variables - Simple pure CSS variables
  • Color Function

SVG Icons

Casper uses inline SVG icons, included via Handlebars partials. You can find all icons inside /partials/icons. To use an icon just include the name of the relevant file, eg. To include the SVG icon in /partials/icons/rss.hbs - use {{> "icons/rss"}}.

You can add your own SVG icons in the same manner.

Copyright & License

Copyright (c) 2013-2018 Ghost Foundation - Released under the MIT license.