Go to file
qvalentin 0d2aedee88 add basic workflow config 2021-08-30 19:14:44 +02:00
.github/workflows add basic workflow config 2021-08-30 19:14:44 +02:00
src fix js rendering 2021-08-29 19:14:17 +02:00
Dockerfile add dockerfile 2021-08-29 19:14:37 +02:00
README.md add readme 2021-08-29 19:14:30 +02:00
server.py fix js rendering 2021-08-29 19:14:17 +02:00

README.md

Gist-it Reborn

Embed any code from GitHub in your website just like a gist.

Based on this original Repo, but quickly and dirtily rewritten in Python 3 using Pygments.

Usage

Add the following snippet to your html or markdown to have the code be placed at that position.


<script src="https://example.com/https://github.com/qvalentin/gist-it-reborn/blob/main/server.py"></script>

Config

style

With the style query parameter you can select a highlighting style. A preview of possible values can be found here.

Just append the query parameter style to the url.

https://example.com/https://github.com/qvalentin/gist-it-reborn/blob/main/server.py?style=monokai

Selecting lines

You can choose to only show certain lines of the code. The parameter slice can be given in the format from:to.

https://example.com/https://github.com/qvalentin/gist-it-reborn/blob/main/server.py?slice=5:20