Skip to content

Instantly share code, notes, and snippets.

View CookieCookson's full-sized avatar
🍪
Cookie

Christian Cook CookieCookson

🍪
Cookie
View GitHub Profile
@mortenson
mortenson / ghpages.js
Last active January 22, 2021 19:56
Publish a sub-directory in your repository as the contents of your gh-pages branch
/**
This script takes a sub-directory of your repository, renames relative links
in HTML files to point to a Github Pages subdirectory, and publishes to your
gh-pages branch.
Use:
1. Download this script into the root of your project.
2. Run npm install --save-dev fs-extra rebase gh-pages
3. Rename "your-project" to the name of your Github project
4. If you have more than one HTML file, add it to the "files"