Skip to content

Commit

Permalink
Add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
robertlove committed Dec 11, 2022
1 parent 12d2b62 commit b883ea4
Show file tree
Hide file tree
Showing 11 changed files with 233 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
_site
.sass-cache
.jekyll-cache
.jekyll-metadata
vendor
18 changes: 18 additions & 0 deletions docs/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
layout: default
title: Page not found
description: The requested page could not be found.
---

<section class="d-flex flex-column justify-content-center align-items-center vh-100 overflow-hidden text-center">
<div class="container mb-5">
<div class="row">
<div class="col-12 col-md-10 col-lg-8 col-xl-6 mx-auto">
<p class="mb-0 text-muted">404</p>
<h1 class="display-1 mb-4">{{- page.title -}}</h1>
<p class="lead mb-4">{{ page.description }}</p>
<a class="btn btn-secondary" href="{{- '/' | relative_url -}}">Home</a>
</div>
</div>
</div>
</section>
33 changes: 33 additions & 0 deletions docs/Gemfile
Original file line number Diff line number Diff line change
@@ -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]
4 changes: 4 additions & 0 deletions docs/_config.yaml
Original file line number Diff line number Diff line change
@@ -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"
75 changes: 75 additions & 0 deletions docs/_data/highlighters.yaml
Original file line number Diff line number Diff line change
@@ -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
29 changes: 29 additions & 0 deletions docs/_layouts/code.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="{{- site.description -}}">
<link rel="icon" href="{{- '/assets/img/highlight.svg' | relative_url -}}">
<link rel="stylesheet" href="pygments/css/default.css" id="style">
<style>
body {
margin: 0;
padding: 0;
}
pre {
margin: 0;
padding: 1em;
height: 100vh;
}
</style>
</head>
<body>
{{- content -}}
<script>
let params = new URLSearchParams(window.location.search);
let style = params.get('style');
document.getElementById('style').href = style;
</script>
</body>
</html>
15 changes: 15 additions & 0 deletions docs/_layouts/default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="{{- site.description -}}">
<link rel="icon" href="{{- '/assets/img/highlight.svg' | relative_url -}}">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
<title>{{- site.title -}}</title>
</head>
<body>
{{ content }}
</body>
</html>
3 changes: 3 additions & 0 deletions docs/assets/img/highlight.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions docs/code.md
Original file line number Diff line number Diff line change
@@ -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))
```
31 changes: 31 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
layout: default
---

<header class="bg-dark text-light py-5 mb-5">
<div class="container">
<h1 class="display-1 mb-4"><i class="bi-braces-asterisk"></i> {{ site.title }}</h1>
<p class="lead mb-4">{{ site.description }}</p>
<a class="btn btn-secondary" href="https://github.com/signified/highlight" target="_blank"><i class="bi-github"></i> View on GitHub</a>
</div>
</header>
<main>
<div class="container">
{% for highlighter in site.data.highlighters %}
<h2 class="display-6 mb-5">{{- highlighter.title -}}</h2>
<div class="row row-cols-1 row-cols-lg-2 row-cols-xxl-3">
{% for style in highlighter.styles %}
<div class="col mb-5">
<h3>{{- style -}}</h3>
<div style="height:300px">
<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">
</div>
</div>
{% endfor %}
</div>
{% unless forloop.last %}
<hr class="my-5">
{% endunless %}
{% endfor %}
</div>
</main>
Empty file removed index.html
Empty file.

0 comments on commit b883ea4

Please sign in to comment.