Skip to content

Commit e1c5fb3

Browse files
committed
Add a highlight.css and the highlight.js lib for code highlighting
Generated with: hugo gen chromastyles --style=autumn > highlight.css
1 parent ebfd562 commit e1c5fb3

File tree

4 files changed

+163
-0
lines changed

4 files changed

+163
-0
lines changed

config.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ title = "Consortium for Python Data API Standards"
44
theme = "kube"
55
description = "The purpose of the Consortium is to develop API standards for common Python data structures for scientific, data science and machine learning users and applications - using a combination of design discussions, requirements engineering and data-driven approaches."
66
Paginate = 4
7+
pygmentsUseClasses = true
78

89
[Params]
910
RSSLink = "/index.xml"

layouts/_default/baseof.html

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
<!DOCTYPE html>
2+
<html lang="{{ .Site.LanguageCode }}">
3+
4+
<head>
5+
{{ .Hugo.Generator }}
6+
<meta charset="utf-8">
7+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
8+
<meta name="viewport" content="width=device-width, initial-scale=1">
9+
<title>{{ block "title" . }}{{ .Title }} | {{ .Site.Title }}{{ end }}</title>
10+
11+
{{ with .Description }}
12+
<meta name="description" content="{{ . }}"> {{ end }}
13+
<!-- noindex meta -->
14+
{{ $default_noindex_kinds := slice "section" "taxonomy" "taxonomyTerm" }}
15+
{{ $noindex_kinds := .Site.Params.noindex_kinds | default $default_noindex_kinds }}
16+
{{ $is_noindex_true := and (isset .Params "noindex") .Params.noindex }}
17+
{{ if or (in $noindex_kinds .Kind) ($is_noindex_true) }}
18+
<meta name="robots" content="noindex">
19+
{{ end }}
20+
21+
{{ partial "meta/name-author" . }}
22+
{{ template "_internal/opengraph.html" . }}
23+
{{ partial "meta/ogimage" . }}
24+
<!-- Site verification -->
25+
{{ if .IsHome }} {{ partial "site-verification" . }} {{ end }}
26+
<!-- add googleAnalytics in config.toml -->
27+
{{ template "_internal/google_analytics_async.html" . }}
28+
{{ if .RSSLink }}
29+
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" /> {{ end }}
30+
31+
<link rel="canonical" href="{{ .Permalink }}"> {{ if (isset .Params "prev") }}
32+
<link rel="prev" href="{{ .Params.prev }}"> {{ end }} {{ if (isset .Params "next") }}
33+
<link rel="next" href="{{ .Params.next }}"> {{ end }}
34+
35+
{{ partial "favicon" . }}
36+
37+
<link href="{{ "/css/font.css" | relURL }}" rel="stylesheet" type="text/css">
38+
<link href="{{ "/css/kube.min.css" | relURL }}" rel="stylesheet" type="text/css">
39+
<link href="{{ "/css/kube.legenda.css" | relURL }}" rel="stylesheet" type="text/css">
40+
<link href="{{ "/css/highlight.css" | relURL }}" rel="stylesheet" type="text/css">
41+
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/styles/default.min.css">
42+
<link href="{{ "/css/master.css" | relURL }}" rel="stylesheet" type="text/css">
43+
<link href="{{ "/css/kube.demo.css" | relURL }}" rel="stylesheet" type="text/css">
44+
<!-- Your own theme here -->
45+
<link href="{{ "/css/custom.css" | relURL }}" rel="stylesheet" type="text/css">
46+
<!-- js vendor -->
47+
<script src="{{ "/js/jquery-2.1.4.min.js" | relURL }}" type="text/javascript">
48+
</script>
49+
50+
<script type="text/javascript" src="{{ "/js/tocbot.min.js" | relURL }}"></script>
51+
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/highlight.min.js"></script>
52+
</head>
53+
54+
55+
<body class="page-kube">
56+
<header>{{ block "header" . }}{{ end }}</header>
57+
<main>{{ block "main" . }}{{ end }}</main>
58+
<footer>{{ block "footer" . }}{{ end }}</footer>
59+
60+
61+
<script src="{{ "/js/kube.js" | relURL }}" type="text/javascript">
62+
</script>
63+
<script src="{{ "/js/kube.legenda.js" | relURL }}" type="text/javascript">
64+
</script>
65+
<script src="{{ "/js/master.js" | relURL }}" type="text/javascript">
66+
</script>
67+
</body>
68+
69+
</html>

static/css/custom.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
mark, code, samp, kbd {
3+
position: relative;
4+
top: -1px;
5+
padding: 4px 4px 2px 4px;
6+
display: inline-block;
7+
line-height: 1;
8+
color: rgba(49, 52, 57, 0.85); }
9+
10+
code {
11+
background: #f8f8f8; }

static/css/highlight.css

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
/* Background */ .chroma { background-color: #ffffff }
2+
/* Other */ .chroma .x { }
3+
/* Error */ .chroma .err { color: #ff0000; background-color: #ffaaaa }
4+
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
5+
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; }
6+
/* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #ffffcc }
7+
/* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
8+
/* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
9+
/* Keyword */ .chroma .k { color: #0000aa }
10+
/* KeywordConstant */ .chroma .kc { color: #0000aa }
11+
/* KeywordDeclaration */ .chroma .kd { color: #0000aa }
12+
/* KeywordNamespace */ .chroma .kn { color: #0000aa }
13+
/* KeywordPseudo */ .chroma .kp { color: #0000aa }
14+
/* KeywordReserved */ .chroma .kr { color: #0000aa }
15+
/* KeywordType */ .chroma .kt { color: #00aaaa }
16+
/* Name */ .chroma .n { }
17+
/* NameAttribute */ .chroma .na { color: #1e90ff }
18+
/* NameBuiltin */ .chroma .nb { color: #00aaaa }
19+
/* NameBuiltinPseudo */ .chroma .bp { }
20+
/* NameClass */ .chroma .nc { color: #00aa00; text-decoration: underline }
21+
/* NameConstant */ .chroma .no { color: #aa0000 }
22+
/* NameDecorator */ .chroma .nd { color: #888888 }
23+
/* NameEntity */ .chroma .ni { color: #880000; font-weight: bold }
24+
/* NameException */ .chroma .ne { }
25+
/* NameFunction */ .chroma .nf { color: #00aa00 }
26+
/* NameFunctionMagic */ .chroma .fm { }
27+
/* NameLabel */ .chroma .nl { }
28+
/* NameNamespace */ .chroma .nn { color: #00aaaa; text-decoration: underline }
29+
/* NameOther */ .chroma .nx { }
30+
/* NameProperty */ .chroma .py { }
31+
/* NameTag */ .chroma .nt { color: #1e90ff; font-weight: bold }
32+
/* NameVariable */ .chroma .nv { color: #aa0000 }
33+
/* NameVariableClass */ .chroma .vc { }
34+
/* NameVariableGlobal */ .chroma .vg { }
35+
/* NameVariableInstance */ .chroma .vi { }
36+
/* NameVariableMagic */ .chroma .vm { }
37+
/* Literal */ .chroma .l { }
38+
/* LiteralDate */ .chroma .ld { }
39+
/* LiteralString */ .chroma .s { color: #aa5500 }
40+
/* LiteralStringAffix */ .chroma .sa { color: #aa5500 }
41+
/* LiteralStringBacktick */ .chroma .sb { color: #aa5500 }
42+
/* LiteralStringChar */ .chroma .sc { color: #aa5500 }
43+
/* LiteralStringDelimiter */ .chroma .dl { color: #aa5500 }
44+
/* LiteralStringDoc */ .chroma .sd { color: #aa5500 }
45+
/* LiteralStringDouble */ .chroma .s2 { color: #aa5500 }
46+
/* LiteralStringEscape */ .chroma .se { color: #aa5500 }
47+
/* LiteralStringHeredoc */ .chroma .sh { color: #aa5500 }
48+
/* LiteralStringInterpol */ .chroma .si { color: #aa5500 }
49+
/* LiteralStringOther */ .chroma .sx { color: #aa5500 }
50+
/* LiteralStringRegex */ .chroma .sr { color: #009999 }
51+
/* LiteralStringSingle */ .chroma .s1 { color: #aa5500 }
52+
/* LiteralStringSymbol */ .chroma .ss { color: #0000aa }
53+
/* LiteralNumber */ .chroma .m { color: #009999 }
54+
/* LiteralNumberBin */ .chroma .mb { color: #009999 }
55+
/* LiteralNumberFloat */ .chroma .mf { color: #009999 }
56+
/* LiteralNumberHex */ .chroma .mh { color: #009999 }
57+
/* LiteralNumberInteger */ .chroma .mi { color: #009999 }
58+
/* LiteralNumberIntegerLong */ .chroma .il { color: #009999 }
59+
/* LiteralNumberOct */ .chroma .mo { color: #009999 }
60+
/* Operator */ .chroma .o { }
61+
/* OperatorWord */ .chroma .ow { color: #0000aa }
62+
/* Punctuation */ .chroma .p { }
63+
/* Comment */ .chroma .c { color: #aaaaaa; font-style: italic }
64+
/* CommentHashbang */ .chroma .ch { color: #aaaaaa; font-style: italic }
65+
/* CommentMultiline */ .chroma .cm { color: #aaaaaa; font-style: italic }
66+
/* CommentSingle */ .chroma .c1 { color: #aaaaaa; font-style: italic }
67+
/* CommentSpecial */ .chroma .cs { color: #0000aa; font-style: italic }
68+
/* CommentPreproc */ .chroma .cp { color: #4c8317 }
69+
/* CommentPreprocFile */ .chroma .cpf { color: #4c8317 }
70+
/* Generic */ .chroma .g { }
71+
/* GenericDeleted */ .chroma .gd { color: #aa0000 }
72+
/* GenericEmph */ .chroma .ge { font-style: italic }
73+
/* GenericError */ .chroma .gr { color: #aa0000 }
74+
/* GenericHeading */ .chroma .gh { color: #000080; font-weight: bold }
75+
/* GenericInserted */ .chroma .gi { color: #00aa00 }
76+
/* GenericOutput */ .chroma .go { color: #888888 }
77+
/* GenericPrompt */ .chroma .gp { color: #555555 }
78+
/* GenericStrong */ .chroma .gs { font-weight: bold }
79+
/* GenericSubheading */ .chroma .gu { color: #800080; font-weight: bold }
80+
/* GenericTraceback */ .chroma .gt { color: #aa0000 }
81+
/* GenericUnderline */ .chroma .gl { text-decoration: underline }
82+
/* TextWhitespace */ .chroma .w { color: #bbbbbb }

0 commit comments

Comments
 (0)