Giter VIP home page Giter VIP logo

ghost-on-github-pages's Introduction

Ghost Blog Platform on Github Pages

Visit blog!

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

๐Ÿ™‹โ€โ™‚๏ธ Made by @abhijithvijayan

Donate: PayPal, Patreon

Buy Me a Coffee


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.

Table of Contents


Requirements

1) Install Major Dependencies

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

2) Install Other Packages

Install Homebrew

/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

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

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

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

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 wget

After writing new posts, deploy with wget. 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 tejakummarikuntla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ghost-on-github-pages's Issues

How-to install on macOS

HI! Thank you for developing such a great program.

I would like to install it on my Mac, however when I try sudo apt-get install build-essential, it told me command not found: apt-get, which is not available in macOS, as well as

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

Could you plz tell me how to solve it or if it is possible to install it on Mac?
Thanks!

[Bug] sitemap.xml not deployed with deploy.sh

Hello,

It seems that the sitemap.xml which can be handy for SEO does not deploy with deploy.sh.

I'm not sure if that's on purpose or perhaps overlooked. I replicated this on both my and your demo blog.

I suspect it can be related to this here which says Sitemap: http://localhost:2368/sitemap.xml On local host it's accessible.

Ghost blog default blog has it here https://ghost.org/blog/sitemap.xml

Am I missing something here perhaps?

[Bug] Fixed ! Some Problem about deploy.sh

Hi @abhijithvijayan ,

I have found some problem when I run your deploy.sh on my Macbook Pro, and I have fixed it :)

  • The sed shell command which trying to replace jpgg with jpg
  • The sed shell symbol in the command which trying to replace localhost:2368 with username and gh_repo.
  • The Fixing Images step should be to do on the setup step.
  • The master branch had been replaced with main branch by Github team at 2020/10, so you don't need to create master and gh-pages branch.

I will send the PR to you.

Broken images on Safari mobile

Hi!

For some reason demo images are broken on Safari on mobile. I've replicated with your demo site as well. On desktop it seems to work, which is quite weird.

Any idea what may be causing this?
Thank you.
IMG_4994

Let me know how I can provide more relevant data to troubleshoot this.

Add a note on disabling two-factor authentication in deploy.sh

First of all wanted to thank you for a great tool, helped me so much.

Second, it may be a good idea to add in deploy.sh a line which mention two-factor authentication needs to be disabled for it to work. Perhaps it's just me, but I had to disable it so that it could work.

Leaving here as a reference to other as well.

As a side note, perhaps in readme you should node that in deploy.sh nothing has to be altered. I was a bit confused with echo ' -------------------- INFORMATION NEEDED -------------------- ' and took me a few tries to figure out that nothing should be changed there :)

Anyway, thanks so much for the tool once again, keep up the great work.

Can't deploy ghost on github pages

Hello, I'm trying deploy ghost using your deploy scripts but i have problem with push. Could you help me provide any info what should I do next and if you have time.
image

Custom Domain setting

Hi, it's me again.

According to your deploy.sh , I can only deploy to username.github.io . However, as long as I deploy for the next time, even though I have set a custom domain in Github, it will insist on username.github.io .

I wonder what should I change.

Thanks a lot.

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.