A bookmarklet to toggle between GitHub Pages site and source
If you're on a GitHub Pages site like https://sroberts.github.io/
, clicking the bookmarlet will redirect you to https://github.com/sroberts/sroberts.github.io
.
If you're on a GitHub Pages repo like https://github.com/benbalter/benbalter.github.io
, clicking the bookmarklet will redirect you to http://ben.balter.com
.
If you're on a GitHub Pages site like http://ben.balter.com
, clicking the bookmarklet will do absolutely nothing. That's crazy talk.
Guessing and blind luck. Mostly just reading the URL, moving some things around, and hoping the resulting page exists. It's not an exact science. YMMV.
- Visit ben.balter.com/pages-toggle-bookmarklet/
- Drag the link to your bookmark bar
- Click bookmarklet to toggle between site and source
I'd love your help making the script better. The source lives in src
and the built files live in dist
. To build locally:
- Clone down the repo and
cd
into the directory script/bootstrap
- Make your changes
script/build