Skip to content

Latest commit

 

History

History
70 lines (43 loc) · 2.45 KB

README.md

File metadata and controls

70 lines (43 loc) · 2.45 KB

GhostDevEnv

An easier way to setup a development environment for Ghost Themes using VSCode Devcontainers and Docker

It will also automatically clone the Ghost-Advisory-Theme into the content/theme folder and build it as per "Speedy Development"

Scripts are provided to restart Ghost (ghostrestart) and restart the Tailwind JIT Theme Builder (themerefresh)



Prerequisites

  1. Install Docker Desktop and run it for first time setup
  2. Install Visual Studio Code
  3. Install Extension Remote - Containers for VSCode
  4. Install Git
  5. Setup credentials for Git [Username and Email]



How to use?

  1. git clone https://github.com/AdvisorySG/GhostDevEnv.git $HOME/GhostDevEnv

  2. code $HOME/GhostDevEnv (Or just open folder $HOME/GhostDevEnv in VSCode)

  3. Click on Screenshot 2021-08-13 011706 at the bottom left most corner of VSCode and Click Reopen in container

  4. Wait for container to build

  5. Open new terminal with Ctrl + Shift + `

  6. Go to localhost:2368/ghost Admin Page or localhost:2368 Visitor Page

  7. Follow Commands



Commands

Run command ghostrestart to (re)Start Ghost

Run command themerefresh to (re)Start Ghost Theme listener (same as npm run dev in Theme folder)



How to reopen?

Simply open $HOME/GhostDevEnv in VSCode and follow step (3) onwards in How to use?

Alternatively you can click >File>Save Workspace As to save as a workspace config

Open new terminal with Ctrl + Shift + `

Follow Commands



My themes are not updating!

Refresh Tailwind JIT Builder to update CSS in themes

Open new terminal with Ctrl + Shift + `

themerefresh



My theme is not detected!

Restart Ghost to detect themes

Open new terminal with Ctrl + Shift + `

ghostrestart



Happy Coding ~Dylan