Directly publish your blog posts to GitHub Pages from the command line.
This is a simple command line tool, written in pure python, to allow users to start publishing posts on their jekyll/github powered blogs. It uses the GitHub api and hence does not need git and jekyll installed.
It supports multiple users, custom repositories, and a lot more to come.
Install it directly from PyPI using pip3
. Only supported on Python 3.x.
pip3 install ghPublish
YYYY-MM-DD-slugged-title-string.md
Now that you have the file ready.
ghPublish --preview -f <path to file>
ghPublish -u <Username> -f <path to file>
That's it. Your blog has been pushed live to <username>.github.io
.
$ ghPublish --help
usage: ghPublish [-h] (--preview | -u USER) -f FILE [-r REPO] [-l LOC]
Directly publish your blog posts to GitHub Pages from the command line.
optional arguments:
-h, --help show this help message and exit
Required:
you can either preview the file, or supply a user to publish the file
--preview preview a blog post locally. (default: False)
-u USER, --user USER github username (default: None)
-f FILE, --file FILE path to local file (default: None)
Remote:
optional details for publshing to a custom location in a repository
-r REPO, --repo REPO optional repository name (default: None)
-l LOC, --loc LOC optional file path in repostiory (default: None)
Author: Mitesh Shah
MIT License
Copyright (c) 2016 Mitesh Shah