Skip to content

Commit 7c177ee

Browse files
committed
Switch to kramdown and rouge
1 parent f3e20c0 commit 7c177ee

File tree

5 files changed

+79
-22
lines changed

5 files changed

+79
-22
lines changed

_config.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@ encoding: utf-8
1111
permalink: pretty
1212
paginate_path: /page:num
1313
timezone: Europe/Moscow
14-
markdown: redcarpet
15-
highlighter: none
14+
markdown: kramdown
15+
highlighter: rouge
1616

17-
redcarpet:
18-
extensions: ["no_intra_emphasis", "tables", "autolink", "strikethrough", "with_toc_data"]
17+
kramdown:
18+
input: GFM
19+
hard_wrap: false
1920

2021
defaults:
2122
values:

_includes/footer.html

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
<footer class="blog-footer">
2-
<p>Copyright © 2016 <a href="mailto:{{ site.email }}">{{ site.author }}</a></p>
2+
<p>Copyright © 2016 <a href="mailto:{{ site.email }}?Subject=Vulkan%20Leesons">{{ site.author }}</a></p>
33
<p><a href="#">Back to top</a></p>
44
</footer> <!--/.blog-footer -->
55

66
<script src="//cdn.jsdelivr.net/jquery/1.11.3/jquery.min.js"></script>
77
<script src="//cdn.jsdelivr.net/bootstrap/3.3.6/js/bootstrap.min.js"></script>
8-
9-
<script src="//cdn.jsdelivr.net/prism/1.4.1/prism.js"></script>
10-
<script src="//cdn.jsdelivr.net/prism/1.4.1/components/prism-clike.min.js"></script>
11-
<script src="//cdn.jsdelivr.net/prism/1.4.1/components/prism-c.min.js"></script>
12-
<script src="//cdn.jsdelivr.net/prism/1.4.1/components/prism-cpp.min.js"></script>
13-
<script src="//cdn.jsdelivr.net/prism/1.4.1/components/prism-glsl.min.js"></script>

_includes/head.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
<link rel="stylesheet" href="//cdn.jsdelivr.net/bootstrap/3.3.6/css/bootstrap.min.css">
1212
<link rel="stylesheet" href="//cdn.jsdelivr.net/bootstrap/3.3.6/css/bootstrap-theme.min.css">
13-
<link rel="stylesheet" href="//cdn.jsdelivr.net/prism/1.4.1/themes/prism.css">
1413
<link rel="stylesheet" href="{{ '/css/main.css' | prepend: site.baseurl }}">
14+
<link rel="stylesheet" href="{{ '/css/highlight.css' | prepend: site.baseurl }}">
1515

1616
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
1717
</head>

_posts/2016-02-17-lesson01.md

+8-10
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Some basic info about Vulkan.
99

1010
Little C++ `code` snippet:
1111

12-
```cpp
12+
{% highlight cpp %}
1313
#include <stdio.h>
1414

1515
// Global variable
@@ -19,11 +19,11 @@ int main(int argc, char *argv[]) {
1919
printf("%s\n", strHelloWorld);
2020
return 0;
2121
}
22-
```
22+
{% endhighlight %}
2323

2424
Some GLSL `code` snippet:
2525

26-
```glsl
26+
{% highlight glsl %}
2727
#version 330 core
2828

2929
layout(location = 0) in vec3 position;
@@ -35,15 +35,13 @@ uniform struct Camera {
3535
void main(void) {
3636
gl_Position = camera.modelViewProjection * vec4(position, 1.0);
3737
}
38-
```
39-
40-
We can do this all day long.
38+
{% endhighlight %}
4139

4240
Some basic info about Vulkan.
4341

4442
Little C++ `code` snippet:
4543

46-
```cpp
44+
{% highlight cpp %}
4745
#include <stdio.h>
4846

4947
// Global variable
@@ -53,11 +51,11 @@ int main(int argc, char *argv[]) {
5351
printf("%s\n", strHelloWorld);
5452
return 0;
5553
}
56-
```
54+
{% endhighlight %}
5755

5856
Some GLSL `code` snippet:
5957

60-
```glsl
58+
{% highlight glsl %}
6159
#version 330 core
6260

6361
layout(location = 0) in vec3 position;
@@ -69,6 +67,6 @@ uniform struct Camera {
6967
void main(void) {
7068
gl_Position = camera.modelViewProjection * vec4(position, 1.0);
7169
}
72-
```
70+
{% endhighlight %}
7371

7472
We can do this all day long.

css/highlight.css

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
.hll { background-color: #ffffcc }
2+
.c { color: #60a0b0; font-style: italic } /* Comment */
3+
.err { border: 1px solid #FF0000 } /* Error */
4+
.k { color: #007020; font-weight: bold } /* Keyword */
5+
.o { color: #666666 } /* Operator */
6+
.ch { color: #60a0b0; font-style: italic } /* Comment.Hashbang */
7+
.cm { color: #60a0b0; font-style: italic } /* Comment.Multiline */
8+
.cp { color: #007020 } /* Comment.Preproc */
9+
.cpf { color: #60a0b0; font-style: italic } /* Comment.PreprocFile */
10+
.c1 { color: #60a0b0; font-style: italic } /* Comment.Single */
11+
.cs { color: #60a0b0; background-color: #fff0f0 } /* Comment.Special */
12+
.gd { color: #A00000 } /* Generic.Deleted */
13+
.ge { font-style: italic } /* Generic.Emph */
14+
.gr { color: #FF0000 } /* Generic.Error */
15+
.gh { color: #000080; font-weight: bold } /* Generic.Heading */
16+
.gi { color: #00A000 } /* Generic.Inserted */
17+
.go { color: #888888 } /* Generic.Output */
18+
.gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
19+
.gs { font-weight: bold } /* Generic.Strong */
20+
.gu { color: #800080; font-weight: bold } /* Generic.Subheading */
21+
.gt { color: #0044DD } /* Generic.Traceback */
22+
.kc { color: #007020; font-weight: bold } /* Keyword.Constant */
23+
.kd { color: #007020; font-weight: bold } /* Keyword.Declaration */
24+
.kn { color: #007020; font-weight: bold } /* Keyword.Namespace */
25+
.kp { color: #007020 } /* Keyword.Pseudo */
26+
.kr { color: #007020; font-weight: bold } /* Keyword.Reserved */
27+
.kt { color: #902000 } /* Keyword.Type */
28+
.m { color: #40a070 } /* Literal.Number */
29+
.s { color: #4070a0 } /* Literal.String */
30+
.na { color: #4070a0 } /* Name.Attribute */
31+
.nb { color: #007020 } /* Name.Builtin */
32+
.nc { color: #0e84b5; font-weight: bold } /* Name.Class */
33+
.no { color: #60add5 } /* Name.Constant */
34+
.nd { color: #555555; font-weight: bold } /* Name.Decorator */
35+
.ni { color: #d55537; font-weight: bold } /* Name.Entity */
36+
.ne { color: #007020 } /* Name.Exception */
37+
.nf { color: #06287e } /* Name.Function */
38+
.nl { color: #002070; font-weight: bold } /* Name.Label */
39+
.nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
40+
.nt { color: #062873; font-weight: bold } /* Name.Tag */
41+
.nv { color: #bb60d5 } /* Name.Variable */
42+
.ow { color: #007020; font-weight: bold } /* Operator.Word */
43+
.w { color: #bbbbbb } /* Text.Whitespace */
44+
.mb { color: #40a070 } /* Literal.Number.Bin */
45+
.mf { color: #40a070 } /* Literal.Number.Float */
46+
.mh { color: #40a070 } /* Literal.Number.Hex */
47+
.mi { color: #40a070 } /* Literal.Number.Integer */
48+
.mo { color: #40a070 } /* Literal.Number.Oct */
49+
.sb { color: #4070a0 } /* Literal.String.Backtick */
50+
.sc { color: #4070a0 } /* Literal.String.Char */
51+
.sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */
52+
.s2 { color: #4070a0 } /* Literal.String.Double */
53+
.se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */
54+
.sh { color: #4070a0 } /* Literal.String.Heredoc */
55+
.si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */
56+
.sx { color: #c65d09 } /* Literal.String.Other */
57+
.sr { color: #235388 } /* Literal.String.Regex */
58+
.s1 { color: #4070a0 } /* Literal.String.Single */
59+
.ss { color: #517918 } /* Literal.String.Symbol */
60+
.bp { color: #007020 } /* Name.Builtin.Pseudo */
61+
.vc { color: #bb60d5 } /* Name.Variable.Class */
62+
.vg { color: #bb60d5 } /* Name.Variable.Global */
63+
.vi { color: #bb60d5 } /* Name.Variable.Instance */
64+
.il { color: #40a070 } /* Literal.Number.Integer.Long */

0 commit comments

Comments
 (0)