Haven
A Multi-column Ghost Theme.
Compact | Non compact |
---|---|
![]() |
![]() |
To switch between these layouts set the $compact-preview-layout
variable to true/false
in assets/_base.scss
.
Syntax highlighting
Syntax highlighting is powered by Prism. By default it uses the Okaidia theme and supports
the following languages: Javascript, CSS, Markup, C-like, Typescript, PHP, SASS/SCSS, Twig, YAML and Bash.
Extending the supported languages or changing the theme can easily be done by modifying the prismjs
in
the .babelrc
file.
In case you don't need the Syntax highlighting at all simply remove these lines from assets/js/index.js
:
import Prism from 'prismjs';
Prism.highlightAll();
Development
Locale development
- Clone the repository to
<ghost directory>/content/themes/haven
- Install npm dependencies with
npm i
- Run
npm run dev
to start webpack with the--watch
flag - SASS and JS will be automatically compiled after changes
Testing
The theme is tested against
- gscan (
npm run gscan
) - sass-lint (
npm run sass-lint
) - eslint (
npm run eslint
)
Alternatively you can run npm test
to test all of the above.
Building
To build the theme simply run npm run build
. This will run webpack
in production, which will
automatically take care of asset optimization (aka minification and uglification).