Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 56825f2

Browse files
committed
install highlight-lisp with code class "lisp"
fixes #11 strangely initializing hl did not work in the header, but does work in default.html Need to fix many code snippets to remove inline html tags.
1 parent ec9770c commit 56825f2

File tree

5 files changed

+561
-0
lines changed

5 files changed

+561
-0
lines changed

‎README.org‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ Each pull request is vetted to correctly compile in Jekyll; this is
5050
then logged on Github and has to pass for a pull request to be
5151
mergable to master.
5252

53+
We use [[https://github.com/orthecreedence/highlight-lisp][highlight-lisp]] for syntax highlighting. Just add a =lisp= class to
54+
your code samples.
5355

5456
** Notes regarding build process.
5557

‎_includes/header.html‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
<script src="{{ site.baseurl }}/js/bootstrap.min.js"></script>
1010
<link href="{{ site.baseurl }}/css/bootstrap.min.css" rel="stylesheet">
1111
<link href="{{ site.baseurl }}/css/theme.css" rel="stylesheet">
12+
<script type="text/javascript" src="{{ site.baseurl }}/js/highlight-lisp.js"></script>
13+
<link href="{{ site.baseurl }}/css/highlight-lisp-github.css" rel="stylesheet">
1214
</head>
1315

1416
<body>
@@ -44,10 +46,13 @@
4446
{% endif %}
4547
</li>
4648
{% endfor %}
49+
</li>
4750

4851
</ul>
4952
</div>
5053

5154
</div>
5255
</div>
5356
</div>
57+
</body>
58+
</html>

‎_layouts/default.html‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@
1313
</div>
1414

1515
{% include footer.html %}
16+
17+
<script type="text/javascript">
18+
HighlightLisp.highlight_auto({className: 'lisp'});
19+
</script>

‎css/highlight-lisp-github.css‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/**
2+
* Inspired by github's default code highlighting
3+
*/
4+
pre { white-space: pre; background-color: #f8f8f8; border: 1px solid #ccc; font-size: 13px; line-height: 19px; overflow: auto; padding: 6px 10px; border-radius: 3px; }
5+
pre code.hl-highlighted {white-space: pre; margin: 0; padding: 0; background: none; border: none; overflow-x: auto; font-size: 13px;}
6+
code.hl-highlighted {margin: 0 2px; padding: 0 5px; white-space: nowrap; font-family: Consolas, "Liberation Mono", Courier, monospace; background: #f8f8f8; border: 1px solid #eaeaea; border-radius: 3px;}
7+
8+
code.hl-highlighted {color: #008080;}
9+
code.hl-highlighted .function {color: #008080;}
10+
code.hl-highlighted .function.known {color: #800603;}
11+
code.hl-highlighted .function.known.special {color: #2d2d2d; font-weight: bold;}
12+
code.hl-highlighted .keyword {color: #990073;}
13+
code.hl-highlighted .keyword.known {color: #990073;}
14+
code.hl-highlighted .symbol {color: #75a;}
15+
code.hl-highlighted .lambda-list {color: #966;}
16+
code.hl-highlighted .number {color: #800;}
17+
code.hl-highlighted .variable.known {color: #c3c;}
18+
code.hl-highlighted .variable.global {color: #939;}
19+
code.hl-highlighted .variable.constant {color: #229;}
20+
code.hl-highlighted .nil {color: #f00;}
21+
code.hl-highlighted .list {color: #222;}
22+
23+
code.hl-highlighted .string, code.hl-highlighted .string * {color: #d14 !important;}
24+
code.hl-highlighted .comment,
25+
code.hl-highlighted .comment *,
26+
code.hl-highlighted .comment .string
27+
code.hl-highlighted .comment .string * {color: #aaa !important;}
28+
code.hl-highlighted .string .comment {color: #d14 !important;}
29+
30+
code.hl-highlighted .list.active {display: inline-block; background: #aefff7;}
31+

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /