Skip to content

jyotirmaybarman/bees

Repository files navigation

Screenshot from 2024-01-29 10-59-31

Theme structure

The main files are:

One 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-jamie.hbs - Custom template for /author/jamie/ archive

 

Development guide

The Starter theme provides a first-class development experience out of the box.

 

Setup

To see realtime changes during development, symlink the Starter theme folder to the content/themes folder in your local Ghost install.

ln -s /path/to/starter /ghost/content/themes/starter

Restart Ghost and select the Starter theme from Settings.

From the theme's root directory, install the dependencies:

npm install

If Node isn't installed, follow the official Node installation guide.

 

Start development mode

From the Starter theme folder, start development mode:

npm run dev

Changes you make to your styles, scripts, and Handlebars files will show up automatically in the browser. CSS and Javascript will be compiled and output to the built folder.

Press ctrl + c in the terminal to exit development mode.

 

Build, zip, and test your theme

Compile your CSS and JavaScript assets for production with the following command:

npm run build

Create a zip archive:

npm run zip

Use gscan to test your theme for compatibility with Ghost:

npm run test

 

Copyright & License

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