1K

MyGhost Theme for Ghost Blog

Completed

A Minimalist Theme for Ghost Blog: The theme is written using Handlebars and compiled with Gulp/PostCSS. You need to install Node, Yarn, and Gulp to develop the theme.

MyGhost Theme for Ghost Blog

Instructions

Manual Installation

  1. Download the theme
  2. Log in to Ghost and navigate to the Design settings area to upload the theme's zip file.
  3. After uploading, you can select the MyGhost theme for use.

You can automatically install the theme via Github Action.

  1. Log in to your Ghost blog admin area, navigate to Settings > Integrations > Add custom integration to create an API.
  2. Enter a name for the API, such as Github Action, and select Create.
  3. In the popup window, you will see the Admin API Key and API URL. You will need these two values for the following steps.
  4. Fork this repository: Fork MyGhost
  5. Log in to Github and navigate to the repository Settings area.
  6. Under the Secrets and variables tab, select Actions.
  7. Next, choose Secrets, then click New repository secret and create two environment variables: GHOST_ADMIN_API_URL and GHOST_ADMIN_API_KEY, with values corresponding to the API URL and Admin API Key created in step 3.
  8. Select Actions and click I understand my workflows, go ahead and enable them.
  9. Select Actions and choose Deploy Theme.
  10. Click Run workflow and wait for the installation process to complete.

Note: The above steps only need to be done once. Later, whenever you edit the theme code, commit and push the changes to Github, Github Action will automatically install the updated theme on your Ghost blog website.

Development

MyGhost is developed based on Ghost's basic Starter theme. You can refer to the Ghost Themes Documentation for more details.

Important: The theme is written using Handlebars and compiled with Gulp/PostCSS. You need to install Node, Yarn, and Gulp to develop the theme.

After installing the necessary software, you can run the following commands to develop the theme:

# Clone the repo
git clone https://github.com/nguyenhongthe/MyGhost.git

# Move into the theme directory
cd MyGhost

# Install dependencies
yarn

# Run the theme in development mode
yarn dev

You can now edit the files in /assets/css/, which will be automatically compiled into the /assets/built/ directory.

To run the theme on a Ghost server, you need to create a symbolic link (symlink) from the theme directory to the Ghost blog content directory.

# Create a symbolic link
ln -s /dir/to/your/themes/MyGhost /dir/to/your/ghost-site/content/themes/myghost

Restart your Ghost blog, and the theme will appear in the Design area of the Ghost Admin.

Useful Commands

Package the theme files into the dist/MyGhost.zip file. You can upload this file to your website for manual theme installation.

yarn zip

Contributing and Reporting Issues

  • If you encounter any issues while using the theme or have suggestions for improvement, please create a new issue at nguyenhongthe/MyGhost/issues.

  • This repository is automatically synced with the private monorepo: nguyenhongthe/repo.vnscdn.com via Github Action. Please do not create pull requests directly in this repository.

Copyright © 2012-2024 Nguyễn Hồng Thế Blog - Released under the MIT License.