Skip to content

Commit 07fb1a0

Browse files
committed
Add rouge for syntax highlighting, styels
1 parent b5a3d13 commit 07fb1a0

File tree

5 files changed

+46
-107
lines changed

5 files changed

+46
-107
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
_site
22
.sass-cache
33
.jekyll-metadata
4-
**.orig
4+
**.orig

_config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ paginate: 5
1818
gems: [jekyll-paginate, kramdown]
1919
# Build settings
2020
markdown: kramdown
21+
highlighter: rouge
22+
kramdown.syntax_highlighter_opts.block.line_numbers: true

_sass/_base.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@import url(//spoqa.github.io/spoqa-han-sans/css/SpoqaHanSans-kr.css);

_sass/_syntax-highlighting.scss

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
Darkly Pygments Theme
3+
(c) 2014 Sourcey
4+
http://sourcey.com
5+
*/
6+
7+
.highlight {
8+
white-space: pre;
9+
overflow: auto;
10+
word-wrap: normal; /* horizontal scrolling */
11+
-moz-border-radius: 3px;
12+
-webkit-border-radius: 3px;
13+
border-radius: 3px;
14+
padding: 20px;
15+
background: #343642;
16+
color: #C1C2C3;
17+
}
18+
.highlight .hll { background-color: #ffc; }
19+
.highlight .gd { color: #2e3436; background-color: #0e1416; }
20+
.highlight .gr { color: #eeeeec; background-color: #c00; }
21+
.highlight .gi { color: #babdb6; background-color: #1f2b2d; }
22+
.highlight .go { color: #2c3032; background-color: #2c3032; }
23+
.highlight .kt { color: #e3e7df; }
24+
.highlight .ni { color: #888a85; }
25+
.highlight .c,.highlight .cm,.highlight .c1,.highlight .cs { color: #8D9684; }
26+
.highlight .err,.highlight .g,.highlight .l,.highlight .n,.highlight .x,.highlight .p,.highlight .ge,
27+
.highlight .gp,.highlight .gs,.highlight .gt,.highlight .ld,.highlight .s,.highlight .nc,.highlight .nd,
28+
.highlight .ne,.highlight .nl,.highlight .nn,.highlight .nx,.highlight .py,.highlight .ow,.highlight .w,.highlight .sb,
29+
.highlight .sc,.highlight .sd,.highlight .s2,.highlight .se,.highlight .sh,.highlight .si,.highlight .sx,.highlight .sr,
30+
.highlight .s1,.highlight .ss,.highlight .bp { color: #C1C2C3; }
31+
.highlight .k,.highlight .kc,.highlight .kd,.highlight .kn,.highlight .kp,.highlight .kr,
32+
.highlight .nt { color: #729fcf; }
33+
.highlight .cp,.highlight .gh,.highlight .gu,.highlight .na,.highlight .nf { color: #E9A94B ; }
34+
.highlight .m,.highlight .nb,.highlight .no,.highlight .mf,.highlight .mh,.highlight .mi,.highlight .mo,
35+
.highlight .il { color: #8ae234; }
36+
.highlight .o { color: #989DAA; }
37+
.highlight .nv,.highlight .vc,.highlight .vg,.highlight .vi { color: #fff; }

css/style.scss

Lines changed: 5 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
@charset "utf-8";
55

66

7-
87
// Our variables
9-
$base-font-family: "PT Sans", Helvetica, Arial, sans-serif;
10-
$base-font-size: 16px;
8+
$base-font-family: "Spoqa Han Sans", "PT Sans", Helvetica, Arial, sans-serif;
9+
$base-font-size: 14px;
1110
$base-font-weight: 400;
1211
$small-font-size: $base-font-size * 0.875;
1312
$base-line-height: 1.5;
@@ -208,34 +207,6 @@ blockquote {
208207

209208

210209

211-
/**
212-
* Code formatting
213-
*/
214-
pre,
215-
code {
216-
font-size: 15px;
217-
border: 1px solid $grey-color-light;
218-
border-radius: 3px;
219-
background-color: #eef;
220-
}
221-
222-
code {
223-
padding: 1px 5px;
224-
}
225-
226-
pre {
227-
padding: 8px 12px;
228-
overflow-x: auto;
229-
230-
> code {
231-
border: 0;
232-
padding-right: 0;
233-
padding-left: 0;
234-
}
235-
}
236-
237-
238-
239210
/**
240211
* Wrapper
241212
*/
@@ -290,8 +261,8 @@ pre {
290261
}
291262

292263
.post {
293-
font-family: "Source Sans Pro";
294-
font-size: 18px;
264+
font-family: "Spoqa Han Sans", "Source Sans Pro";
265+
font-size: 1em;
295266
font-weight: 300;
296267
padding-top: 0;
297268
margin-top: 20px;
@@ -651,76 +622,4 @@ pre {
651622
}
652623
.postNext {
653624
text-align: right;
654-
}
655-
656-
/**
657-
* Syntax highlighting styles
658-
*/
659-
.highlight {
660-
background: #fff;
661-
@extend %vertical-rhythm;
662-
663-
.highlighter-rouge & {
664-
background: #eef;
665-
}
666-
667-
.c { color: #998; font-style: italic } // Comment
668-
.err { color: #a61717; background-color: #e3d2d2 } // Error
669-
.k { font-weight: bold } // Keyword
670-
.o { font-weight: bold } // Operator
671-
.cm { color: #998; font-style: italic } // Comment.Multiline
672-
.cp { color: #999; font-weight: bold } // Comment.Preproc
673-
.c1 { color: #998; font-style: italic } // Comment.Single
674-
.cs { color: #999; font-weight: bold; font-style: italic } // Comment.Special
675-
.gd { color: #000; background-color: #fdd } // Generic.Deleted
676-
.gd .x { color: #000; background-color: #faa } // Generic.Deleted.Specific
677-
.ge { font-style: italic } // Generic.Emph
678-
.gr { color: #a00 } // Generic.Error
679-
.gh { color: #999 } // Generic.Heading
680-
.gi { color: #000; background-color: #dfd } // Generic.Inserted
681-
.gi .x { color: #000; background-color: #afa } // Generic.Inserted.Specific
682-
.go { color: #888 } // Generic.Output
683-
.gp { color: #555 } // Generic.Prompt
684-
.gs { font-weight: bold } // Generic.Strong
685-
.gu { color: #aaa } // Generic.Subheading
686-
.gt { color: #a00 } // Generic.Traceback
687-
.kc { font-weight: bold } // Keyword.Constant
688-
.kd { font-weight: bold } // Keyword.Declaration
689-
.kp { font-weight: bold } // Keyword.Pseudo
690-
.kr { font-weight: bold } // Keyword.Reserved
691-
.kt { color: #458; font-weight: bold } // Keyword.Type
692-
.m { color: #099 } // Literal.Number
693-
.s { color: #d14 } // Literal.String
694-
.na { color: #008080 } // Name.Attribute
695-
.nb { color: #0086B3 } // Name.Builtin
696-
.nc { color: #458; font-weight: bold } // Name.Class
697-
.no { color: #008080 } // Name.Constant
698-
.ni { color: #800080 } // Name.Entity
699-
.ne { color: #900; font-weight: bold } // Name.Exception
700-
.nf { color: #900; font-weight: bold } // Name.Function
701-
.nn { color: #555 } // Name.Namespace
702-
.nt { color: #000080 } // Name.Tag
703-
.nv { color: #008080 } // Name.Variable
704-
.ow { font-weight: bold } // Operator.Word
705-
.w { color: #bbb } // Text.Whitespace
706-
.mf { color: #099 } // Literal.Number.Float
707-
.mh { color: #099 } // Literal.Number.Hex
708-
.mi { color: #099 } // Literal.Number.Integer
709-
.mo { color: #099 } // Literal.Number.Oct
710-
.sb { color: #d14 } // Literal.String.Backtick
711-
.sc { color: #d14 } // Literal.String.Char
712-
.sd { color: #d14 } // Literal.String.Doc
713-
.s2 { color: #d14 } // Literal.String.Double
714-
.se { color: #d14 } // Literal.String.Escape
715-
.sh { color: #d14 } // Literal.String.Heredoc
716-
.si { color: #d14 } // Literal.String.Interpol
717-
.sx { color: #d14 } // Literal.String.Other
718-
.sr { color: #009926 } // Literal.String.Regex
719-
.s1 { color: #d14 } // Literal.String.Single
720-
.ss { color: #990073 } // Literal.String.Symbol
721-
.bp { color: #999 } // Name.Builtin.Pseudo
722-
.vc { color: #008080 } // Name.Variable.Class
723-
.vg { color: #008080 } // Name.Variable.Global
724-
.vi { color: #008080 } // Name.Variable.Instance
725-
.il { color: #099 } // Literal.Number.Integer.Long
726-
}
625+
}

0 commit comments

Comments
 (0)