Giter VIP home page Giter VIP logo

ghost-on-github-pages's Introduction

Ghost Blog Platform on Github Pages

Visit blog!

Demo Version: https://abhijithvijayan.github.io/ghost-blog-demo/

Table of Contents


Requirements

1) Install Major Dependencies

Install Python 2

Install Python 2.X, because buster package doesn't support Python 3.

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python2.7

Install NodeJS

Install a version that is officially supported by Ghost, just like Node v6.9 or Node v8.9.

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs

Install npm

NodeJS package manager from https://nodejs.org/en/

sudo apt install npm

2) Install Other Packages

Install Brew

sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/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.

Then run

npm install --production

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-get update && sudo apt-get install yarn

Install Buster

With the tool Buster you can export the Ghost blogs into static pages.

First we install Buster with:

brew install python
sudo apt install python-pip
pip install --upgrade pip
sudo -H pip install buster

Setup

1) Download and Install Ghost

mkdir ghost && cd ghost
sudo npm install ghost-cli@latest -g

Empty the present working directory

sudo rm -r *

Install Ghost

ghost install local --no-start --enable --port 2368

Start Ghost

ghost start

Open browser and navigate to

http://localhost:2368/

image

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

Create an account, read the intial blog post how to edit with Markdown etc.

2) Create your GitHub Pages repo

See the GitHub Pages Basics Documentation for details.

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.

3) Deploy to GitHub Pages

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


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 Buster

After writing new posts, deploy with buster. Run the deploy.sh script/.

./deploy.sh

Enter the credentials when asked!


Voila! You got yourself a ghost blog on github pages.

ghost-on-github-pages's People

Contributors

abhijithvijayan avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.