NOTE: Repo moved to https://github.com/nicegist/nicegist.github.io
writing for hackers · zero setup · publish in seconds
A pure JavaScript gist.io replacement, hosted on GitHub*.
* As long as GitHub exists, it will not die. Yay!
When I recognized that gist.io is dead, I stumbled upon a comment in gist.io's issue tracker, that suggested to build a pure JavaScript implementation to be hosted on GitHub pages.
I liked the idea. Thus, Nicegist was born.
- 💥 Supports gist embedding (use
<gist>
tags, i.e.<gist>file.sh</gist>
) - Supports public and secret gists
- Supports CommonMark / GFM syntax
- Automatic code block syntax highlighting
- Automatic headline anchors
- Create a gist on Github with one or more Markdown-syntax files.
- Note the gist ID. (It's usually a longish alpha-numeric string like
dab5cf7977008e504213
.) - View your writing presented nicely at
eyecatchup.github.io/nicegist/YOUR_GIST_ID
Bookmarklet:
Be lazy and drag the Nicegist bookmarklet to your bookmarks bar.
Click it when you’re on a gist page, and it will take you to the corresponding Nicegist page.
javascript:(function(){if(location.hostname==="gist.github.com"){var gistId=location.pathname.split("/").pop();if(location.pathname.split("/").length>2&&gistId.length)location.href="https://eyecatchup.github.io/nicegist/?id="+gistId}})();
Examples:
- Code blocks: Nicegist, Source
- Tables: Nicegist, Source
- 💥 Embedded gists: Nicegist, Source
- Text formatting, images & more: Nicegist, Source
- Example writeup: Nicegist, Source
- GitHub Gist API for fetching gists
- Chromium destilled webpage layout for optimized reading experience
- markdown-it for Markdown parsing
- markdown-it-anchor for automated header anchors
- highlight.js for code block syntax highlighting
- Some regex sugar and a hidden gist feature for gist embedding
- GitHub Pages SPA hack for pretty URLs
(c) 2019, Stephan Schmitz eyecatchup@gmail.com
License: MIT, http://eyecatchup.mit-license.org
URL: https://eyecatchup.github.io/nicegist