diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..81f2493 --- /dev/null +++ b/.gitignore @@ -0,0 +1,196 @@ +# Created by https://www.gitignore.io/api/node,python,sublimetext + +### Node ### +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Typescript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env + + +### Python ### +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +.pytest_cache/ +nosetests.xml +coverage.xml +*.cover +.hypothesis/ + +# Translations +*.mo +*.pot + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule.* + +# SageMath parsed files +*.sage.py + +# Environments +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ + +### SublimeText ### +# cache files for sublime text +*.tmlanguage.cache +*.tmPreferences.cache +*.stTheme.cache + +# workspace files are user-specific +*.sublime-workspace + +# project files should be checked into the repository, unless a significant +# proportion of contributors will probably not be using SublimeText +# *.sublime-project + +# sftp configuration file +sftp-config.json + +# Package control specific files +Package Control.last-run +Package Control.ca-list +Package Control.ca-bundle +Package Control.system-ca-bundle +Package Control.cache/ +Package Control.ca-certs/ +Package Control.merged-ca-bundle +Package Control.user-ca-bundle +oscrypto-ca-bundle.crt +bh_unicode_properties.cache + +# Sublime-github package stores a github token in this file +# https://packagecontrol.io/packages/sublime-github +GitHub.sublime-settings + + +# End of https://www.gitignore.io/api/node,python,sublimetext \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index 4901de1..0000000 --- a/README.md +++ /dev/null @@ -1,68 +0,0 @@ -# Ghost on Github Pages -![Ghost is an awesome open-source blogging plataform. Now you can host it for free at Github Pages.](http://i.imgur.com/3ACSCiW.jpg) -![Ghost is an awesome open-source blogging plataform. Now you can host it for free at Github Pages.](https://cloud.githubusercontent.com/assets/120485/6626501/b2bb072c-c8ff-11e4-8e1a-2e78e68fd5c3.png) - -[Ghost](https://github.com/tryghost/Ghost) is a simple, powerful publishing platform that allows you to share your stories with the world. It usually needs a paid host, but there's some ways to host your Ghost installation at Github Pages, for free. - -In order to create your own Ghost blog for free and host it at Github pages, check the following instructions. These instructions were tested within Linux, if you know how to make it work for Windows or Mac OS, please let me know and I'll add the instructions here. [**Check out the Live Demo**](https://github.com/paladini/paladini.github.io). - -**Note:** that the first time installation take some time (about 10 minutes), but after that you just need to run `npm start` to use Ghost at your computer (creating posts, modifying the website, etc.) and `./update_website.sh` to send the changes to your website. Simple as that. - -## Prerequisites -Before we start, you need to install some prerequisites: -- [**pip**](https://pip.pypa.io/en/stable/quickstart/): Python 2.7.9 and later comes with *pip* by default, so it won't will bother you. -- [**buster**](https://pypi.python.org/pypi/buster/0.1.3): a Python package. -- [**NodeJS**](https://nodejs.org/en/): make sure that your [NodeJS version is officially supported by latest Ghost release](http://support.ghost.org/supported-node-versions/). -- [**npm**](https://nodejs.org/en/): NodeJS package manager. -- [**knex-migrator**](https://github.com/TryGhost/knex-migrator): you will also need to run `knex-migrator init` - -## Installing for the first time -#### 1) Download the latest version of Ghost at [Ghost download page](https://ghost.org/developers/). -![Download the latest version of Ghost](http://i.imgur.com/eO6a2UR.png) - -#### 2) Extract it somewhere you'll remember. In my example, at `/home/paladini/ghost`. -![Extract the Ghost folder somewhere you'll remember](http://i.imgur.com/wFx9uEu.png) - -#### 3) Open the Terminal and navigate to the extracted folder. Run `npm install`. -![Run "npm install". This step will take several minutes.](http://i.imgur.com/jUBPv3h.png) - -#### 4) Now we've Ghost installed. Let's start it's localhost server running `npm start`: -![Run the Ghost server at localhost for the first time using "npm start"](http://i.imgur.com/m49izT3.png) - -#### 5) Ghost now will be live at [http://localhost:2368](http://localhost:2368). Let's create your user and configure Ghost for the first time: go to [http://localhost:2368/ghost](http://localhost:2368/ghost) and follow the instructions. -![Follow the Ghost instructions for the first time install.](http://i.imgur.com/lss8Rbw.png) - -#### 6) Now you are at the Ghost Administrative Panel, personalize your page and create the desired content. -![Ghost Administrative Panel](http://i.imgur.com/lXhbMJK.png) - -#### 7) Go to [Github.com](http://www.github.com) and create a repository called `YOUR_USERNAME.github.io` (in my case it was [paladini.github.io](http://paladini.github.io)). -![Create a repository called "YOUR_USERNAME.github.io".](tutorial_images/ghost-at-github-create-repository.png) - -#### 8) Download [this script](https://github.com/paladini/ghost-for-github-pages/blob/master/update_website.sh) and [this HTML page](https://raw.githubusercontent.com/paladini/ghost-on-github-pages/master/index.html) and put it inside Ghost folder. Open a terminal window, go the Ghost folder and run `chmod +x update_website.sh`. -![](tutorial_images/ghost-at-github-pages-for-free-index-script.png) - -#### 9) Open another Terminal window and go to Ghost folder (in my case: `/home/paladini/ghost`). Run the following commands: - -```sh -buster setup -buster generate -git init -git remote add origin git@github.com:YOUR_USERNAME/YOUR_USERNAME.github.io.git -git add -A -git commit -m "First commit" -git push origin master -f -``` - -#### 10) After about 10 minutes (according to Github Pages), your website will be live at [http://YOUR_USERNAME.github.io](http://YOUR_USERNAME.github.io). In my case, this is my page: -![](tutorial_images/ghost-at-github-pages-7.png) - -## Updating the website [creating new posts, changing theme, etc.] -Whenever you want to create a new post, change the theme of the site (etc.), you should run `npm start` inside the Ghost folder to start the server at the localhost. Then you can go to [http://localhost:2368/ghost/](http://localhost:2368/ghost/) and do whatever you want to. - -To send the changes to your page, just run `./update_website.sh` from the Terminal. Remember that Github takes about 10 minutes to update the website. - -## About -This readme was created in less than one hour, so if it have any problems or you has some question in some topic, please contact me at fernandopalad at gmail dot com. Feel free to improve it or make any critics. - -**References:** -- http://ledtechnica.com/free-ghost-hosting-on-github-pages/ diff --git a/includes/deploy.sh b/includes/deploy.sh new file mode 100644 index 0000000..143e53c --- /dev/null +++ b/includes/deploy.sh @@ -0,0 +1,73 @@ +#!/usr/bin/env bash + +HOME_PATH=$HOME +GHOST_PATH="${HOME_PATH}/.ghost/current" +GHOST_SERVER_URL="localhost:2373/" + +first_deploy() { + if [ -d "$GHOST_PATH" ]; then + cd "$GHOST_PATH" + + # Expects an input from user to provide a Git remote URL in which Ghost will be deployed. + echo ' -------------------- INFORMATION NEEDED -------------------- ' + echo '' + echo "Following you'll be asked to enter a Git Remote URL in which you would like to deploy Ghost." + echo "Example:" + echo " git@github.com:YOUR_USERNAME/YOUR_REPOSITORY.git" + echo '' + read -p "Remote URL: " remote_url + + # Setting up buster on the current folder. + buster setup --gh-repo="$remote_url" + buster generate --domain="$GHOST_SERVER_URL" + + git init + git remote add origin "$remote_url" + + # Add .gitignore + if [ -f "gitignore.base" ]; then + $(rm -f .gitignore) + $(cp gitignore.base .gitignore) + fi + + git add -A + git commit -m "First commit on Github Pages using Ghost." + git push origin master:master master:gh-pages -f + fi +} + +update() { + if [ -d "$GHOST_PATH" ]; then + cd "$GHOST_PATH" + + # Generating static files + buster generate --domain="$GHOST_SERVER_URL" + + # Commiting changes to repository in order to deploy new content. + git add -A + git commit -m "Update on the website at $(date)" + git push origin master:master master:gh-pages -f + fi +} + +deploy() { + if [ -d "$GHOST_PATH" ]; then + cd "$GHOST_PATH" + + # Check if repo already exists on current path + repo_exists="$(git status)" + case "fatal" in + *"$repo_exists"*) + echo '[INFO] Configuring git repository...' + echo '[INFO] Generating static files from Ghost server...' + first_deploy + exit + ;; + esac + echo '[INFO] Deploying to your Github repository...' + update + fi +} +deploy + + diff --git a/includes/gitignore.base b/includes/gitignore.base new file mode 100644 index 0000000..81f2493 --- /dev/null +++ b/includes/gitignore.base @@ -0,0 +1,196 @@ +# Created by https://www.gitignore.io/api/node,python,sublimetext + +### Node ### +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Typescript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env + + +### Python ### +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +.pytest_cache/ +nosetests.xml +coverage.xml +*.cover +.hypothesis/ + +# Translations +*.mo +*.pot + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule.* + +# SageMath parsed files +*.sage.py + +# Environments +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ + +### SublimeText ### +# cache files for sublime text +*.tmlanguage.cache +*.tmPreferences.cache +*.stTheme.cache + +# workspace files are user-specific +*.sublime-workspace + +# project files should be checked into the repository, unless a significant +# proportion of contributors will probably not be using SublimeText +# *.sublime-project + +# sftp configuration file +sftp-config.json + +# Package control specific files +Package Control.last-run +Package Control.ca-list +Package Control.ca-bundle +Package Control.system-ca-bundle +Package Control.cache/ +Package Control.ca-certs/ +Package Control.merged-ca-bundle +Package Control.user-ca-bundle +oscrypto-ca-bundle.crt +bh_unicode_properties.cache + +# Sublime-github package stores a github token in this file +# https://packagecontrol.io/packages/sublime-github +GitHub.sublime-settings + + +# End of https://www.gitignore.io/api/node,python,sublimetext \ No newline at end of file diff --git a/index.html b/includes/index.html similarity index 100% rename from index.html rename to includes/index.html diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..7c78f16 --- /dev/null +++ b/install.sh @@ -0,0 +1,124 @@ +#!/usr/bin/env bash +RELATIVE_PATH=$(dirname "$0") +GHOST_ZIP=includes/latest_ghost_release.zip +HOME_PATH=$HOME +GHOST_PATH="${HOME_PATH}/.ghost/" + +# Operating system specific instructions +if [ "$(uname -s)" = 'Linux' ]; then + CURRENT_SCRIPT_PATH=$(readlink -f "$0") +else + CURRENT_SCRIPT_PATH=$(readlink "$0") +fi +CURRENT_FOLDER_PATH=$(dirname "$CURRENT_SCRIPT_PATH") + +check_ghost_folder() { + if [ ! -d "includes/ghost" ]; then + echo '[ERROR] Ghost not found at includes/ghost!!! Exiting...' + exit + fi +} + +local_setup() { + if [ -d "$GHOST_PATH" ]; then + echo '[INFO] Ghost already installed at' "$GHOST_PATH" + else + echo '[INFO] Installing Ghost-CLI...' + mkdir -p "$GHOST_PATH" + cd "$GHOST_PATH" + + # Installing Ghost CLI + npm i -g ghost-cli@latest + + # Installing local version of Ghost + echo '[INFO] Trying to install Ghost using Ghost-CLI...' + echo '[INFO] Installing Ghost at' "$GHOST_PATH" + ghost install local --no-start --enable + fi + # echo '[INFO] Finished!' +} + +move_includes() { + if [ ! -d "includes/" ]; then + cd "$RELATIVE_PATH" + fi + $(cp includes/deploy.sh "$GHOST_PATH/") + $(cp includes/deploy.sh "$GHOST_PATH""/current/") + $(cp includes/index.html "$GHOST_PATH""/current/") + $(cp includes/gitignore.base "$GHOST_PATH""/current/") + $(cp includes/gitignore.base "$GHOST_PATH""/current/.gitignore") + $(chmod +x "$GHOST_PATH""/deploy.sh") +} + +local_deps() { + echo '[INFO] Installing needed dependencies...' + + cd "$GHOST_PATH" + success=0 + check_pip=$(which pip) + check_pip2=$(which pip2) + check_pip27=$(which pip2.7) + + if [ "$check_pip" ]; then + pip install buster + success=`expr $success + 1` + else + echo "[INFO] Command 'pip' was not found on path..." + fi + + if [ "$check_pip2" ]; then + pip2 install buster + success=`expr $success + 1` + else + echo "[INFO] Command 'pip2' was not found on path..." + fi + + if [ "$check_pip27" ]; then + pip2.7 install buster + success=`expr $success + 1` + else + echo "[INFO] Command 'pip2.7' was not found on path..." + fi + + # Checking if pip was found and 'buster' was successfully installed. + if [ "$success" -eq "0" ]; then + echo "[WARN] Command pip cannot be found on your system." + echo "[WARN] Trying to install pip for Python 2..." + + # Trying to install pip for different OSs (MacOS and Linux) + if [ "$(uname)" == "Darwin" ]; then + echo '[INFO] Mac OS detected.' + sudo easy_install pip + sudo pip install --upgrade virtualenv + sudo pip install buster + elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then + echo '[INFO] Linux detected.' + sudo apt-get install python-setuptools python-dev build-essential + sudo easy_install pip + sudo pip install --upgrade virtualenv + sudo pip install buster + else + echo '[ERROR] Operating System not supported yet. Please, open a Github Issue at https://github.com/paladini/ghost-on-github-pages/issues telling about this problem.' + echo "[ERROR] Since 'pip' for Python 2 and 'buster' was not found and cannot be installed, I'm exiting this installation script now." + exit + fi + fi + + # echo '[INFO] pip and Buster packages were successfully installed.' + echo '[INFO] Done! Dependencies appears to be okay.' +} + +local_run() { + if [ -d "$GHOST_PATH" ]; then + echo '[INFO] Starting Ghost server...' + cd "$GHOST_PATH" + ghost start --enable + fi +} + +local_setup +local_deps +local_run +move_includes + +(cd "$GHOST_PATH" && ./deploy.sh) diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..ba44713 --- /dev/null +++ b/readme.md @@ -0,0 +1,119 @@ +# Ghost on Github Pages + +![image](https://user-images.githubusercontent.com/3361224/39667855-7f37e624-5095-11e8-9297-6a2e63aaac4b.png) + +[Ghost](https://github.com/tryghost/Ghost) is a fully open source, adaptable platform for building and running a modern online publication - a complete professional publishing platform. **Now you can build your own Ghost blog for free in a few minutes.** After that initial setup, it's very easy to maintain a fresh and modern blog. + +
+

Let's make a Ghost blog go live right now?

+
+ +That was made possible because we've created some powerful automation scripts to deploy your Ghost blog as static content on Github Pages. Interested? Join us throughout this guide, but first [check out the live demo here](http://paladini.github.io/ghost-on-github-pages-demo/). + +## Table of Contents + + * [Requirements](#requirements) + * [Setup](#setup) + + [1) Download and extract `ghost-on-github-pages`](#1-download-and-extract-ghost-on-github-pages) + + [3) Create a new Github repository](#3-create-a-new-github-repository) + + [4) Install](#4-install) + + [5) Deploying to Github Pages](#5-deploying-to-github-pages) + * [How to update your blog?](#how-to-update-your-blog) + * [FAQ](#faq) + * [About](#about) + +## Requirements + +Major dependencies should be installed in your computer. This is only step currently done by your own. + +- [Python 2](https://www.python.org/download/releases/2.7.2/): install some of Python 2.X, because `buster` package doesn't support Python 3. +- [NodeJS](https://nodejs.org/en/): [install a version that is officially supported by Ghost](https://docs.ghost.org/docs/supported-node-versions), just like Node v6.9 or Node v8.9. +- [npm](https://nodejs.org/en/): NodeJS package manager. + +Besides that, there's some minor dependencies too, but they should be automatically installed for you (tested on MacOS High Sierra and Ubuntu 16.04). If needed, [check out the minor dependencies here](https://github.com/paladini/ghost-on-github-pages/wiki/Minor-dependencies) and install by yourself. + +## Setup + +### 1) Download and extract `ghost-on-github-pages` +Download the latest version of this repository code [by clicking here](https://github.com/paladini/ghost-on-github-pages/archive/master.zip). After downloading the project, extract it anywhere you'll remember later. E.g: I've extract the .zip file to `/home/1doctecnologia/ghost-on-github-pages`: + +![image](https://user-images.githubusercontent.com/3361224/39670056-92682f46-50d2-11e8-9c78-2bee3fcb0cb2.png) + +### 2) Create a new Github repository +Create a new repository that is going to store your Ghost blog and also give you a free Github Pages domain. I've created a public Github repo called [`ghost-on-github-pages-demo`](https://github.com/paladini/ghost-on-github-pages-demo) to use as example throughout this guide. + +**[IMPORTANT]** Copy the repository remote URL to your clipboard (SSH or HTTPS), because you will be asked to provide this later. E.g: `git@github.com:paladini/ghost-on-github-pages-demo.git`. + + +### 3) Install + +Now we are ready to install everything needed using the script called `install.sh`. Open a new Terminal window, navigate to the previous extract folder and then run: + +``` +$ chmod +x install.sh +$ ./install.sh +``` + +During the process you will be asked to enter the repository remote URL that was copied to your clipboard in the previous step. + +Everything will be installed at `/home/YOUR_USERNAME/.ghost/` (e.g: `/home/paladini/.ghost`). _Everything_ means the local Ghost server, a few static files required by GH Pages and some useful scripts for deploying your blog on Github Pages. + +In the end, the script will start Ghost server and then make a first deploy to Github. All the static files generated from default Ghost blog will be commited to your Github repository. However it can take up to 10 minutes to your Ghost blog go live at [http://YOUR_USERNAME.github.io/YOUR_REPOSITORY](http://YOUR_USERNAME.github.io/YOUR_REPOSITORY). It should look like this: + +![image](https://user-images.githubusercontent.com/3361224/39674582-58571054-5124-11e8-8326-0fe6c4747620.png) + +[You can see my Ghost blog here](http://paladini.github.io/ghost-on-github-pages-demo/). + +### 4) Deploying to Github Pages +Let's customize your Ghost blog for the first time. To do that, we are going to access the administrative panel that's running at [http://localhost:2373/ghost](http://localhost:2373/ghost). + +A Ghost initial setup screen will appear and you should complete the setup to continue. After that, you can explore the beautiful Ghost Administrative Panel and change whatever you like: + +![image](https://user-images.githubusercontent.com/3361224/39673575-541ac008-5115-11e8-86f8-8e2984884cde.png) + +With some changes, you may want to see the new version of your blog online at Github Pages. Just run the script `deploy.sh` (located at`/home/YOUR_USERNAME/.ghost/deploy.sh`): + +``` +# Only for the first time +$ chmod +x ~/.ghost/deploy.sh + +# Anytime you want to deploy new updates to your blog on Github Pages: +$ cd ~/.ghost +$ ./deploy.sh +``` + +The `deploy.sh` script will make a push to your Github repository, modifying both `master` and `gh-pages` branches with the changes you've made. The updated blog should go live very soon at the same address ([http://YOUR_USERNAME.github.io/YOUR_REPOSITORY](http://YOUR_USERNAME.github.io/YOUR_REPOSITORY)). + +## How to update your blog? +Whenever you want to update your blog (e.g: create a new article, change the blog theme, etc.), just open your local Ghost blog and make all desired modifications. When finished, open a Terminal window and run the following commands to deploy your changes from the local Ghost blog to Github Pages: + +``` +$ cd ~/.ghost +$ ./deploy.sh +``` + +Remember that Github takes about 10 minutes to update the website. + +## FAQ + +**1) Where is located Ghost files?** +Ghost and all scripts you may need will be placed at `.ghost` folder inside your Home directory, i.e: `/home/YOUR_USERNAME/.ghost`. + +**2) Why branches `master` and `gh-pages` are equal?** +Currently they are mirror branches and are designed that way to facilitate GH Pages deploy. You should avoid updating them manually - our scripts handle that for you. Soon I'll be developing a lightweight version for branch `gh-pages` that will make it contain only static files. + +**3) What `deploy.sh` do in the background?** +This script is responsible for deploying updates from your local Ghost blog to your online blog at Github Pages. The general logic of the script can be read below: + +If there's no Git repository at Ghost installation directory (`~/.ghost/current`), a new one will be created for you with all needed branches. At the same time, `buster` will be configured to generate static files from the running Ghost server. After that, a commit will be made to the remote repository at Github (our _first deploy_) containing default Ghost blog theme and configurations. + +If a Git repository was found at Ghost installation path, then `buster` will be called to generate static files and a new commit will be pushed to remote branches on Github (`master` and `gh-pages`). + +**4) What's the purpose of this repository?** +This repository is a guide that compiles everything you need to know in order to setup and maintain your Ghost by your own, with no costs associated. It's purpose is to teach any people interested on how to setup in 20 minutes a free blog under Github Pages using Ghost blogging platform. + +## About +This project was created some years ago and I've made a major update on it's core in May 2018. Besides that, the documentation/guide has been almost rewritten from scratch. If you have any problems or would like to ask some questions, [feel free to open an issue anytime](https://github.com/paladini/ghost-on-github-pages/issues/new). + +**References:** +- http://ledtechnica.com/free-ghost-hosting-on-github-pages/ \ No newline at end of file diff --git a/tutorial_images/ghost-at-github-create-repository.png b/tutorial_images/ghost-at-github-create-repository.png deleted file mode 100644 index 6dab2de..0000000 Binary files a/tutorial_images/ghost-at-github-create-repository.png and /dev/null differ diff --git a/tutorial_images/ghost-at-github-pages-1.png b/tutorial_images/ghost-at-github-pages-1.png deleted file mode 100644 index ca22502..0000000 Binary files a/tutorial_images/ghost-at-github-pages-1.png and /dev/null differ diff --git a/tutorial_images/ghost-at-github-pages-2.png b/tutorial_images/ghost-at-github-pages-2.png deleted file mode 100644 index e0e4510..0000000 Binary files a/tutorial_images/ghost-at-github-pages-2.png and /dev/null differ diff --git a/tutorial_images/ghost-at-github-pages-3.png b/tutorial_images/ghost-at-github-pages-3.png deleted file mode 100644 index 7c9b183..0000000 Binary files a/tutorial_images/ghost-at-github-pages-3.png and /dev/null differ diff --git a/tutorial_images/ghost-at-github-pages-4.png b/tutorial_images/ghost-at-github-pages-4.png deleted file mode 100644 index 621b4e6..0000000 Binary files a/tutorial_images/ghost-at-github-pages-4.png and /dev/null differ diff --git a/tutorial_images/ghost-at-github-pages-5.png b/tutorial_images/ghost-at-github-pages-5.png deleted file mode 100644 index 17ae508..0000000 Binary files a/tutorial_images/ghost-at-github-pages-5.png and /dev/null differ diff --git a/tutorial_images/ghost-at-github-pages-6.png b/tutorial_images/ghost-at-github-pages-6.png deleted file mode 100644 index 8acc759..0000000 Binary files a/tutorial_images/ghost-at-github-pages-6.png and /dev/null differ diff --git a/tutorial_images/ghost-at-github-pages-7.png b/tutorial_images/ghost-at-github-pages-7.png deleted file mode 100644 index 9d8b973..0000000 Binary files a/tutorial_images/ghost-at-github-pages-7.png and /dev/null differ diff --git a/tutorial_images/ghost-at-github-pages-for-free-index-script.png b/tutorial_images/ghost-at-github-pages-for-free-index-script.png deleted file mode 100644 index b9de564..0000000 Binary files a/tutorial_images/ghost-at-github-pages-for-free-index-script.png and /dev/null differ diff --git a/update_website.sh b/update_website.sh deleted file mode 100644 index 70bf7fd..0000000 --- a/update_website.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -buster generate -git add -A -git commit -m "Update on the website at $(date)" -git push origin master \ No newline at end of file