no-issue Previously we only added an error handler to the first stream in each pipeline, this meant that if another stream errors you would get unhelpful error handlers.
|1 year ago|
|.github||2 years ago|
|assets||1 year ago|
|partials||1 year ago|
|.editorconfig||2 years ago|
|.gitignore||2 years ago|
|.travis.yml||1 year ago|
|LICENSE||1 year ago|
|README.md||1 year ago|
|author.hbs||1 year ago|
|default.hbs||1 year ago|
|error-404.hbs||1 year ago|
|error.hbs||1 year ago|
|gulpfile.js||1 year ago|
|index.hbs||1 year ago|
|package.json||1 year ago|
|page.hbs||1 year ago|
|post.hbs||1 year ago|
|tag.hbs||1 year ago|
|yarn.lock||1 year ago|
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
tag-news.hbs- Custom template for
author-ali.hbs- Custom template for
$ yarn install $ yarn dev
Now you can edit
/assets/css/ files, which will be compiled to
zip Gulp task packages the theme files into
dist/<theme-name>.zip, which you can then upload to your site.
$ yarn zip
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
You can add your own SVG icons in the same manner.
Copyright (c) 2013-2019 Ghost Foundation - Released under the MIT license.