From b883ea4048f476d0aec5be4480d5beccdedcc1db Mon Sep 17 00:00:00 2001 From: Robert Love Date: Sun, 11 Dec 2022 11:57:54 +1100 Subject: [PATCH] Add docs --- docs/.gitignore | 5 +++ docs/404.html | 18 +++++++++ docs/Gemfile | 33 +++++++++++++++ docs/_config.yaml | 4 ++ docs/_data/highlighters.yaml | 75 +++++++++++++++++++++++++++++++++++ docs/_layouts/code.html | 29 ++++++++++++++ docs/_layouts/default.html | 15 +++++++ docs/assets/img/highlight.svg | 3 ++ docs/code.md | 20 ++++++++++ docs/index.html | 31 +++++++++++++++ index.html | 0 11 files changed, 233 insertions(+) create mode 100644 docs/.gitignore create mode 100644 docs/404.html create mode 100644 docs/Gemfile create mode 100644 docs/_config.yaml create mode 100644 docs/_data/highlighters.yaml create mode 100644 docs/_layouts/code.html create mode 100644 docs/_layouts/default.html create mode 100644 docs/assets/img/highlight.svg create mode 100644 docs/code.md create mode 100644 docs/index.html delete mode 100644 index.html diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..f40fbd8 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,5 @@ +_site +.sass-cache +.jekyll-cache +.jekyll-metadata +vendor diff --git a/docs/404.html b/docs/404.html new file mode 100644 index 0000000..cf90f92 --- /dev/null +++ b/docs/404.html @@ -0,0 +1,18 @@ +--- +layout: default +title: Page not found +description: The requested page could not be found. +--- + +
+
+
+
+

404

+

{{- page.title -}}

+

{{ page.description }}

+ Home +
+
+
+
diff --git a/docs/Gemfile b/docs/Gemfile new file mode 100644 index 0000000..1bccf29 --- /dev/null +++ b/docs/Gemfile @@ -0,0 +1,33 @@ +source "https://rubygems.org" +# Hello! This is where you manage which Jekyll version is used to run. +# When you want to use a different version, change it below, save the +# file and run `bundle install`. Run Jekyll with `bundle exec`, like so: +# +# bundle exec jekyll serve +# +# This will help ensure the proper Jekyll version is running. +# Happy Jekylling! +gem "jekyll", "~> 4.3.1" +# This is the default theme for new Jekyll sites. You may change this to anything you like. +gem "minima", "~> 2.5" +# If you want to use GitHub Pages, remove the "gem "jekyll"" above and +# uncomment the line below. To upgrade, run `bundle update github-pages`. +# gem "github-pages", group: :jekyll_plugins +# If you have any plugins, put them here! +group :jekyll_plugins do + gem "jekyll-feed", "~> 0.12" +end + +# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem +# and associated library. +platforms :mingw, :x64_mingw, :mswin, :jruby do + gem "tzinfo", ">= 1", "< 3" + gem "tzinfo-data" +end + +# Performance-booster for watching directories on Windows +gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin] + +# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem +# do not have a Java counterpart. +gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby] diff --git a/docs/_config.yaml b/docs/_config.yaml new file mode 100644 index 0000000..202e17f --- /dev/null +++ b/docs/_config.yaml @@ -0,0 +1,4 @@ +title: Highlight +description: Every Pygments and Rouge CSS stylesheet all in one place and ready to use. +baseurl: "/highlight" +url: "https://signified.github.io" diff --git a/docs/_data/highlighters.yaml b/docs/_data/highlighters.yaml new file mode 100644 index 0000000..23ec77f --- /dev/null +++ b/docs/_data/highlighters.yaml @@ -0,0 +1,75 @@ +- title: Pygments + styles: + - default + - emacs + - friendly + - friendly_grayscale + - colorful + - autumn + - murphy + - manni + - material + - monokai + - perldoc + - pastie + - borland + - trac + - native + - fruity + - bw + - vim + - vs + - tango + - rrt + - xcode + - igor + - paraiso-light + - paraiso-dark + - lovelace + - algol + - algol_nu + - arduino + - rainbow_dash + - abap + - solarized-dark + - solarized-light + - sas + - staroffice + - stata + - stata-light + - stata-dark + - inkpot + - zenburn + - gruvbox-dark + - gruvbox-light + - dracula + - one-dark + - lilypond + - nord + - nord-darker + - github-dark +- title: Rouge + styles: + - base16 + - base16.dark + - base16.light + - base16.monokai + - base16.monokai.dark + - base16.monokai.light + - base16.solarized + - base16.solarized.dark + - base16.solarized.light + - bw + - colorful + - github + - gruvbox + - gruvbox.dark + - gruvbox.light + - igorpro + - magritte + - molokai + - monokai + - monokai.sublime + - pastie + - thankful_eyes + - tulip diff --git a/docs/_layouts/code.html b/docs/_layouts/code.html new file mode 100644 index 0000000..22e329a --- /dev/null +++ b/docs/_layouts/code.html @@ -0,0 +1,29 @@ + + + + + + + + + + + + {{- content -}} + + + diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html new file mode 100644 index 0000000..da2c5b8 --- /dev/null +++ b/docs/_layouts/default.html @@ -0,0 +1,15 @@ + + + + + + + + + + {{- site.title -}} + + + {{ content }} + + diff --git a/docs/assets/img/highlight.svg b/docs/assets/img/highlight.svg new file mode 100644 index 0000000..af61f03 --- /dev/null +++ b/docs/assets/img/highlight.svg @@ -0,0 +1,3 @@ + + + diff --git a/docs/code.md b/docs/code.md new file mode 100644 index 0000000..30c67c7 --- /dev/null +++ b/docs/code.md @@ -0,0 +1,20 @@ +--- +layout: code +--- + +```python +from typing import Iterator + +# This is an example +class Math: + @staticmethod + def fib(n: int) -> Iterator[int]: + """ Fibonacci series up to n """ + a, b = 0, 1 + while a < n: + yield a + a, b = b, a + b + +result = sum(Math.fib(42)) +print("The answer is {}".format(result)) +``` diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..c27e5e4 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,31 @@ +--- +layout: default +--- + +
+
+

{{ site.title }}

+

{{ site.description }}

+ View on GitHub +
+
+
+
+ {% for highlighter in site.data.highlighters %} +

{{- highlighter.title -}}

+
+ {% for style in highlighter.styles %} +
+

{{- style -}}

+
+ +
+
+ {% endfor %} +
+ {% unless forloop.last %} +
+ {% endunless %} + {% endfor %} +
+
diff --git a/index.html b/index.html deleted file mode 100644 index e69de29..0000000