Skip to main content

Overview

A GitHub Pages import tool.

Warning

This will DESTROY your gh-pages branch. If you love it, you’ll want to take backups before playing with this. This script assumes that gh-pages is 100% derivative. You should never edit files in your gh-pages branch by hand if you’re using this script because you will lose your work.

Installation

pip install ghp-import2

Usage

Usage: ghp-import [OPTIONS] DIRECTORY

Options:
-n

Include a .nojekyll file in the branch.

-m MESG

The commit message to use on the target branch.

-p

Push the branch to origin/{branch} after committing.

-r REMOTE

The name of the remote to push to. [origin]

-b BRANCH

Name of the branch to write to. [gh-pages]

-h, --help

show this help message and exit

Its pretty simple. Inside your repository just run ghp-import $DOCS_DIR where $DOCS_DIR is the path to the built documentation. This will write a commit to your gh-pages branch with the current documents in it.

If you specify -p it will also attempt to push the gh-pages branch to GitHub. By default it’ll just run git push origin gh-pages. You can specify a different remote using the -r flag.

You can specify a different branch with -b. This is useful for user and organization page, which are served from the master branch.

ghp-import also recognizes the GIT_DIR environment variable which can be useful for Git hooks.

License

ghp-import is distributed under the Tumbolia Public License. See the LICENSE file for more information.

Changelog

1.0.1 (2016-01-23)

  • Fixed breakage on Python 3. Contributed by Chris Warrick in #1.

1.0.0 (2015-05-09)

  • First release on PyPI.

Release files for ghp-import2 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ghp-import2 1.0.1
File Size Uploaded
ghp-import2-1.0.1.tar.gz 13.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ghp-import2 1.0.1
File Interpreter ABI Platform
ghp_import2-1.0.1-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 20.4 kB

Release files / ghp-import2-1.0.1.tar.gz

Download URL ghp-import2-1.0.1.tar.gz
Size 13.2 kB
Tags Source
SHA-256 checksum
How to use checksums
fdf95846b26c5b42964b3146ffc4f22107bbba7baa42659f0f22bfe08ec96d7f
BLAKE2b-256 checksum
How to use checksums
100d45634cfa166592740c3f00781bc5e108c45064f7da3a0d36a3227ed65241
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / ghp_import2-1.0.1-py2.py3-none-any.whl

Download URL ghp_import2-1.0.1-py2.py3-none-any.whl
Size 7.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
1172fa772abc3dba7f3ff902e7b202eb8ebaf4a463e9d63b8e90cc9edd57330e
BLAKE2b-256 checksum
How to use checksums
5fef9a7f507f73b9ae27830de96419ba99e4b8a6b84ac177df6292a7510a0b66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page