Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abhijithvijayan/ghost-on-github-pages
💻⏰ Ghost on Github Pages. Build and deploy Ghost for free in a few minutes.
https://github.com/abhijithvijayan/ghost-on-github-pages
blog free ghost ghost-installation ghost-on-github-pages github-pages
Last synced: 22 days ago
JSON representation
💻⏰ Ghost on Github Pages. Build and deploy Ghost for free in a few minutes.
- Host: GitHub
- URL: https://github.com/abhijithvijayan/ghost-on-github-pages
- Owner: abhijithvijayan
- License: apache-2.0
- Created: 2018-06-09T22:58:50.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-04-17T08:45:26.000Z (over 3 years ago)
- Last Synced: 2024-10-04T12:14:04.722Z (about 1 month ago)
- Topics: blog, free, ghost, ghost-installation, ghost-on-github-pages, github-pages
- Language: Shell
- Homepage: https://abhijithvijayan.github.io/ghost-blog-demo/
- Size: 6.09 MB
- Stars: 52
- Watchers: 3
- Forks: 13
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Ghost Blog Platform on Github Pages
[![](https://img.shields.io/badge/last--update-Apr--2020-red.svg)](https://github.com/abhijithvijayan/ghost-on-github-pages/commits/master)
[![Visit blog!](https://img.shields.io/badge/visit-blog-blue.svg)](https://abhijithvijayan.github.io/ghost-blog-demo/)> https://abhijithvijayan.github.io/ghost-blog-demo/
🙋♂️ 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](https://netlify.app). I'd recommend connecting the repo to Netlify service and deploy it there. Also, Netlify provides features like Custom Domain free of charges.
## Table of Contents
- [Requirements](#requirements)
- [1) Install Major Dependencies](#1-Install-Major-Dependencies)
- [2) Install Other Packages](#2-Install-Other-Packages)
- [Setup](#setup)
- [1) Install Ghost](#1-Download-and-Install-Ghost)
- [2) Create a new Github repository](#2-Create-your-GitHub-Pages-repo)
- [3) Deploying to Github Pages](#3-Deploy-to-GitHub-Pages)
- [How to update your blog?](#Write-new-Blog-posts)
## Requirements
## 1) Install Major Dependencies
### Install [NodeJS](https://nodejs.org/en/download/package-manager/)
Install a version that is officially [supported]((https://docs.ghost.org/docs/supported-node-versions)) by Ghost, preferably latest LTS
```
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs
```## 2) Install Other Packages
### Install [Homebrew](https://brew.sh/)
```
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
```### Install Node.js runtime
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](https://classic.yarnpkg.com/en/docs/install/#debian-stable)
```
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
```
## Setup
## 1) Download and Install Ghost
```
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
```## Start Ghost
```
ghost start
```Open browser and navigate to
```
http://localhost:2368/
```![image](https://preview.ibb.co/no4n5U/desktop.jpg)
## Login to Ghost
```
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
```![](https://i.imgur.com/OeAsLDw.png)
Create an account, read the intial blog post how to edit with Markdown etc.
## 2) Create your GitHub Pages repo
Create a repo with [`create-remote-repo`](https://github.com/abhijithvijayan/create-remote-repo-cli) 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.
```js
npx create-remote-repo username.github.io# Replace with your username
```## 3) Deploy to GitHub Pages
Create a file named `deploy.sh` with contents from [deploy.sh](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
## Write new Blog posts
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
## Deploy with `wget`
After writing new posts, deploy with `wget`.
Run the [deploy.sh](deploy.sh) script/.```
./deploy.sh
```Enter the credentials when asked!
### Voila! You got yourself a ghost blog on github pages
- Live Version:
- Demo Repo:
- Custom Theme Repo: