From 9163c865a73241399bcd4bb7bbf4b67135b77c5a Mon Sep 17 00:00:00 2001 From: qvalentin Date: Sun, 29 Aug 2021 19:14:30 +0200 Subject: [PATCH] add readme --- README.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..4beef7d --- /dev/null +++ b/README.md @@ -0,0 +1,42 @@ +# Gist-it Reborn + +Embed any code from GitHub in your website just like a gist. + +Based on this original [Repo](https://github.com/robertkrimen/gist-it), but quickly and dirtily rewritten in Python 3 using [Pygments](https://pygments.org/). + +# Usage + +Add the following snippet to your html or markdown to have the code be placed at that position. + +```html + + + +``` + +### Config + +#### style + +With the style query parameter you can select a highlighting style. A preview of possible values can be found [here](https://help.farbox.com/pygments.html). + +Just append the query parameter `style` to the url. + +```html +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`. + +```html +https://example.com/https://github.com/qvalentin/gist-it-reborn/blob/main/server.py?slice=5:20 + +``` + + + + +