-
-
Notifications
You must be signed in to change notification settings - Fork 604
Theme development with Docker
First of all, thank you so much to D3473R for his awesome job on this! He make it possible! 🙌🏼
The following steps will guide you so that you can have a development environment on your machine without having to install Ghost:
-
Install Docker and docker-compose.
-
Clone or download this repository.
-
Open a Terminal and go to the
src
directory. -
Run
npm install
. -
Start Docker.
-
Run
npm run docker-watch
.
Now you have an instant development setup and when you make changes you will see them right into the browser (hot-reloading).
You can see your blog here: http://localhost:3000
and you can access to the admin here: http://localhost:3000/ghost
.
The credentials for the admin are the following:
User: liebling@example.com
Password: 0123456789
If you add new files you will need to run docker-compose restart
manually, this is because of this (from Ghost docs):
If you add any new files to your theme during development, you'll need to restart Ghost to see the changes take effect.
When you're ready you can build the theme for production just by running npm run production
(within the src
directory).
This command will generate the file liebling.zip
in the root of the theme directory. Now you can upload this file to your own Ghost instance 😎.