Commit fea2ceca authored by cgm616's avatar cgm616

Add code syntax highlighting and formatting

parent 0c97d29b
......@@ -19,6 +19,7 @@ var nested = require('metalsmith-nested');
var writemetadata = require('metalsmith-writemetadata');
var dates = require('metalsmith-date-formatter');
var ignore = require('metalsmith-ignore');
var metallic = require('metalsmith-metallic');
var fs = require('fs')
var path = require('path')
......@@ -56,6 +57,7 @@ Metalsmith(__dirname) // instantiate Metalsmith in the cwd
.use(collections({
articles: 'articles/*.md'
}))
.use(metallic())
.use(markdown())
.use(permalinks({relative: false}))
.use(updated())
......
......@@ -4,8 +4,9 @@
<meta charset="UTF-8" />
<title>{{ title }}</title>
<meta name="description" content="{{ description }}">
<script inline src="/js/app.js"></script>
<link inline rel="stylesheet" type="text/css" href="/css/main.css">
<script inline src="/js/app.js" ></script>
<link inline href="/css/main.css" rel="stylesheet" type="text/css">
<link inline href="/css/highlight-default.css" rel="stylesheet" type="text/css">
</head>
<body>
<header>
......
/*
Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull <sourdrums@gmail.com>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #fdf6e3;
color: #657b83;
}
.hljs-comment,
.hljs-quote {
color: #93a1a1;
}
/* Solarized Green */
.hljs-keyword,
.hljs-selector-tag,
.hljs-addition {
color: #859900;
}
/* Solarized Cyan */
.hljs-number,
.hljs-string,
.hljs-meta .hljs-meta-string,
.hljs-literal,
.hljs-doctag,
.hljs-regexp {
color: #2aa198;
}
/* Solarized Blue */
.hljs-title,
.hljs-section,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #268bd2;
}
/* Solarized Yellow */
.hljs-attribute,
.hljs-attr,
.hljs-variable,
.hljs-template-variable,
.hljs-class .hljs-title,
.hljs-type {
color: #b58900;
}
/* Solarized Orange */
.hljs-symbol,
.hljs-bullet,
.hljs-subst,
.hljs-meta,
.hljs-meta .hljs-keyword,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-link {
color: #cb4b16;
}
/* Solarized Red */
.hljs-built_in,
.hljs-deletion {
color: #dc322f;
}
.hljs-formula {
background: #eee8d5;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}
......@@ -124,3 +124,16 @@ footer {
margin-top: 0.8rem;
}
code {
border-radius: 3px;
border: 1px solid #7c7c7c;
background: #fdf6e3;
padding: 1px;
font-size: 1.1rem;
font-family: "Courier New", Courier, monospace;
}
pre code {
font-size: 1rem;
line-height: 1.2rem;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment