Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oxalorg/ghpublish
Directly publish your blog posts to GitHub Pages from the command line.
https://github.com/oxalorg/ghpublish
github-page jekyll
Last synced: 2 months ago
JSON representation
Directly publish your blog posts to GitHub Pages from the command line.
- Host: GitHub
- URL: https://github.com/oxalorg/ghpublish
- Owner: oxalorg
- License: mit
- Created: 2016-06-21T13:35:55.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-07-29T22:27:03.000Z (over 2 years ago)
- Last Synced: 2024-10-03T06:47:32.479Z (3 months ago)
- Topics: github-page, jekyll
- Language: Python
- Homepage:
- Size: 44.9 KB
- Stars: 7
- Watchers: 3
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# ghPublish
Directly publish your blog posts to GitHub Pages from the command line.
## Overview
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.
## Installation
Install it directly from PyPI using `pip3`. Only supported on Python 3.x.
`pip3 install ghPublish`
## Usage
### Quickstart
- Write a top kek blog post, preferably in markdown or html.
- Rename your blog post appropriately to how you have Jekyll configured.
- Default is `YYYY-MM-DD-slugged-title-string.md`Now that you have the file ready.
1. You need to **preview** the file *locally*.
- `ghPublish --preview -f `
- This will render your markdown file to html and automagically open in le browser.
2. **Publish** the changes to github.
- `ghPublish -u -f `
- This works for both adding new files, and updating existing ones.
- Password is asked only once, then a token is generated and stored in a config file.That's it. Your blog has been pushed live to `.github.io`.
### Slowstart
```
$ 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 exitRequired:
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)
```## Extra
### Dependencies
* mistune - pure python markdown renderer
* requests - http request library
* pygments### Contributors
Author: [Mitesh Shah](http://miteshshah.com)
### License
MIT License
Copyright (c) 2016 Mitesh Shah