Skip to content

Commit b883ea4

Browse files
committed
Add docs
1 parent 12d2b62 commit b883ea4

File tree

11 files changed

+233
-0
lines changed

11 files changed

+233
-0
lines changed

docs/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
_site
2+
.sass-cache
3+
.jekyll-cache
4+
.jekyll-metadata
5+
vendor

docs/404.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
layout: default
3+
title: Page not found
4+
description: The requested page could not be found.
5+
---
6+
7+
<section class="d-flex flex-column justify-content-center align-items-center vh-100 overflow-hidden text-center">
8+
<div class="container mb-5">
9+
<div class="row">
10+
<div class="col-12 col-md-10 col-lg-8 col-xl-6 mx-auto">
11+
<p class="mb-0 text-muted">404</p>
12+
<h1 class="display-1 mb-4">{{- page.title -}}</h1>
13+
<p class="lead mb-4">{{ page.description }}</p>
14+
<a class="btn btn-secondary" href="{{- '/' | relative_url -}}">Home</a>
15+
</div>
16+
</div>
17+
</div>
18+
</section>

docs/Gemfile

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
source "https://rubygems.org"
2+
# Hello! This is where you manage which Jekyll version is used to run.
3+
# When you want to use a different version, change it below, save the
4+
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
5+
#
6+
# bundle exec jekyll serve
7+
#
8+
# This will help ensure the proper Jekyll version is running.
9+
# Happy Jekylling!
10+
gem "jekyll", "~> 4.3.1"
11+
# This is the default theme for new Jekyll sites. You may change this to anything you like.
12+
gem "minima", "~> 2.5"
13+
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
14+
# uncomment the line below. To upgrade, run `bundle update github-pages`.
15+
# gem "github-pages", group: :jekyll_plugins
16+
# If you have any plugins, put them here!
17+
group :jekyll_plugins do
18+
gem "jekyll-feed", "~> 0.12"
19+
end
20+
21+
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
22+
# and associated library.
23+
platforms :mingw, :x64_mingw, :mswin, :jruby do
24+
gem "tzinfo", ">= 1", "< 3"
25+
gem "tzinfo-data"
26+
end
27+
28+
# Performance-booster for watching directories on Windows
29+
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
30+
31+
# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem
32+
# do not have a Java counterpart.
33+
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]

docs/_config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
title: Highlight
2+
description: Every Pygments and Rouge CSS stylesheet all in one place and ready to use.
3+
baseurl: "/highlight"
4+
url: "https://signified.github.io"

docs/_data/highlighters.yaml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
- title: Pygments
2+
styles:
3+
- default
4+
- emacs
5+
- friendly
6+
- friendly_grayscale
7+
- colorful
8+
- autumn
9+
- murphy
10+
- manni
11+
- material
12+
- monokai
13+
- perldoc
14+
- pastie
15+
- borland
16+
- trac
17+
- native
18+
- fruity
19+
- bw
20+
- vim
21+
- vs
22+
- tango
23+
- rrt
24+
- xcode
25+
- igor
26+
- paraiso-light
27+
- paraiso-dark
28+
- lovelace
29+
- algol
30+
- algol_nu
31+
- arduino
32+
- rainbow_dash
33+
- abap
34+
- solarized-dark
35+
- solarized-light
36+
- sas
37+
- staroffice
38+
- stata
39+
- stata-light
40+
- stata-dark
41+
- inkpot
42+
- zenburn
43+
- gruvbox-dark
44+
- gruvbox-light
45+
- dracula
46+
- one-dark
47+
- lilypond
48+
- nord
49+
- nord-darker
50+
- github-dark
51+
- title: Rouge
52+
styles:
53+
- base16
54+
- base16.dark
55+
- base16.light
56+
- base16.monokai
57+
- base16.monokai.dark
58+
- base16.monokai.light
59+
- base16.solarized
60+
- base16.solarized.dark
61+
- base16.solarized.light
62+
- bw
63+
- colorful
64+
- github
65+
- gruvbox
66+
- gruvbox.dark
67+
- gruvbox.light
68+
- igorpro
69+
- magritte
70+
- molokai
71+
- monokai
72+
- monokai.sublime
73+
- pastie
74+
- thankful_eyes
75+
- tulip

docs/_layouts/code.html

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<meta name="description" content="{{- site.description -}}">
7+
<link rel="icon" href="{{- '/assets/img/highlight.svg' | relative_url -}}">
8+
<link rel="stylesheet" href="pygments/css/default.css" id="style">
9+
<style>
10+
body {
11+
margin: 0;
12+
padding: 0;
13+
}
14+
pre {
15+
margin: 0;
16+
padding: 1em;
17+
height: 100vh;
18+
}
19+
</style>
20+
</head>
21+
<body>
22+
{{- content -}}
23+
<script>
24+
let params = new URLSearchParams(window.location.search);
25+
let style = params.get('style');
26+
document.getElementById('style').href = style;
27+
</script>
28+
</body>
29+
</html>

docs/_layouts/default.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<meta name="description" content="{{- site.description -}}">
7+
<link rel="icon" href="{{- '/assets/img/highlight.svg' | relative_url -}}">
8+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
9+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
10+
<title>{{- site.title -}}</title>
11+
</head>
12+
<body>
13+
{{ content }}
14+
</body>
15+
</html>

docs/assets/img/highlight.svg

Lines changed: 3 additions & 0 deletions
Loading

docs/code.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
layout: code
3+
---
4+
5+
```python
6+
from typing import Iterator
7+
8+
# This is an example
9+
class Math:
10+
@staticmethod
11+
def fib(n: int) -> Iterator[int]:
12+
""" Fibonacci series up to n """
13+
a, b = 0, 1
14+
while a < n:
15+
yield a
16+
a, b = b, a + b
17+
18+
result = sum(Math.fib(42))
19+
print("The answer is {}".format(result))
20+
```

docs/index.html

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
layout: default
3+
---
4+
5+
<header class="bg-dark text-light py-5 mb-5">
6+
<div class="container">
7+
<h1 class="display-1 mb-4"><i class="bi-braces-asterisk"></i> {{ site.title }}</h1>
8+
<p class="lead mb-4">{{ site.description }}</p>
9+
<a class="btn btn-secondary" href="https://github.com/signified/highlight" target="_blank"><i class="bi-github"></i> View on GitHub</a>
10+
</div>
11+
</header>
12+
<main>
13+
<div class="container">
14+
{% for highlighter in site.data.highlighters %}
15+
<h2 class="display-6 mb-5">{{- highlighter.title -}}</h2>
16+
<div class="row row-cols-1 row-cols-lg-2 row-cols-xxl-3">
17+
{% for style in highlighter.styles %}
18+
<div class="col mb-5">
19+
<h3>{{- style -}}</h3>
20+
<div style="height:300px">
21+
<embed type="text/html" src="{{- '/code' | relative_url -}}?style=https://cdn.jsdelivr.net/gh/signified/highlight/{{- highlighter.title | downcase -}}/css/{{- style -}}.css" class="w-100 h-100">
22+
</div>
23+
</div>
24+
{% endfor %}
25+
</div>
26+
{% unless forloop.last %}
27+
<hr class="my-5">
28+
{% endunless %}
29+
{% endfor %}
30+
</div>
31+
</main>

0 commit comments

Comments
 (0)