Implement code highlighting via PrismJS

PrismJS has been locally included with a custom theme, to allow auto-highlighting of code blocks.
This commit is contained in:
Bea 2021-01-03 11:25:51 +01:00
parent 6fbeeb7303
commit 1890876929
4 changed files with 82 additions and 1 deletions

View File

@ -0,0 +1,75 @@
/* Code blocks */
.token.comment,
.token.block-comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: #999;
}
.token.punctuation {
color: #ccc;
}
.token.tag,
.token.attr-name,
.token.namespace,
.token.deleted {
color: #e2777a;
}
.token.function-name {
color: #6196cc;
}
.token.boolean,
.token.number,
.token.function {
color: #f08d49;
}
.token.property,
.token.class-name,
.token.constant,
.token.symbol {
color: #f8c555;
}
.token.selector,
.token.important,
.token.atrule,
.token.keyword,
.token.builtin {
color: #cc99cd;
}
.token.string,
.token.char,
.token.attr-value,
.token.regex,
.token.variable {
color: #7ec699;
}
.token.operator,
.token.entity,
.token.url {
color: #67cdcc;
}
.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}
.token.inserted {
color: green;
}

1
assets/js/prism.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -26,6 +26,11 @@
<script src="{{asset "js/remark42-comments.js"}}"></script>
{{/is}}
{{#is "post, page"}}
<script src="{{asset "js/prism.min.js"}}"></script>
<link rel="stylesheet" type="text/css" href="{{asset "css/prism-mind-theme.css"}}"/>
{{/is}}
{{#is "index"}}
<title>{{@site.title}}</title>
{{/is}}

View File

@ -1,7 +1,7 @@
{
"name": "mindtheme",
"description": "Mind Overflow's official website style",
"version": "0.0.11",
"version": "0.0.12",
"engines": {
"ghost-api": "v3"
},