πββοΈ Made by @abhijithvijayan
Update: The flexibility of this project allows you to push the static site to any github repo and deploy it with any service like Netlify. I'd recommend connecting the repo to Netlify service and deploy it there. Also, Netlify provides features like Custom Domain free of charges.
Install NodeJS
Install a version that is officially supported by Ghost, preferably latest LTS
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs
Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Ghost is written in Node.js, so you will need the Node.js runtime.
brew install node
brew install wget
sudo apt-get install build-essential
Initialize npm
npm init
Enter the credentials when asked
- github username in the name field*
- repository name(eg: username.github.io)
- a description*
Leave the other less important fields empty.
Install yarn
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update && sudo apt install yarn
npm install ghost-cli@latest -g
Change the present working directory
mkdir ghost && cd ghost
Install Ghost
ghost install local --no-start --enable --port 2368
ghost start
Open browser and navigate to
http://localhost:2368/
http://localhost:2368/ghost/
Go to the above link in your browser ans if it doesn't show anything, check the status of the blog with
ghost status
Create an account, read the intial blog post how to edit with Markdown etc.
Create a repo with create-remote-repo
CLI
You must use the username/username.github.io
naming scheme. The repo name must be lower case even if your username has upper case letters.
npx create-remote-repo username.github.io
# Replace with your username
Create a file named deploy.sh
with contents from deploy.sh
Give execute permission
chmod u+x deploy.sh
Deploy with
./deploy.sh
For the initial push, please wait up to 10 minutes until GitHub deploys your subdomain.
All upcoming pushes are much faster and you can see your static ghost blog posts at https://username.github.io
To write new Blog posts or update the existing ones, just start Ghost, edit, then generate and deploy the static pages.
cd ghost
ghost start
Visit
http://localhost:2368/ghost/
Login and write new posts
After writing new posts, deploy with wget
.
Run the deploy.sh script/.
./deploy.sh
Enter the credentials when asked!
- Live Version: https://abhijithvijayan.github.io/ghost-blog-demo/
- Demo Repo: https://github.com/abhijithvijayan/ghost-blog-demo
- Custom Theme Repo: https://github.com/abhijithvijayan/Casper-XYZ