From a66f3bc76084681d9e979303cdf711d0e8dd0cb4 Mon Sep 17 00:00:00 2001 From: Marcus Noble Date: Tue, 26 Jul 2016 10:08:49 +0100 Subject: [PATCH] Added support for drafts --- app.js | 13 +++++++++++-- src/css/main.scss | 9 +++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/app.js b/app.js index a61d780..50c64a2 100644 --- a/app.js +++ b/app.js @@ -41,7 +41,7 @@ Metalsmith(__dirname) site: { title: 'Marcus Noble', description: 'Awesomeness with a side of geek', - url: 'https://blog.marcusnoble.co.uk' + url: 'http://localhost:8000' // 'https://blog.marcusnoble.co.uk' } })) .use(date()) @@ -51,6 +51,11 @@ Metalsmith(__dirname) sortBy: 'date', reverse: true, }, + drafts: { + pattern: 'drafts/*', + sortBy: 'date', + reverse: true, + }, projects: { pattern: 'projects/*' }, @@ -76,6 +81,10 @@ Metalsmith(__dirname) { match: { collection: 'pages' }, pattern: ':title' + }, + { + match: { collection: 'drafts' }, + pattern: 'drafts/:title' } ] })) @@ -107,4 +116,4 @@ Metalsmith(__dirname) app.listen(port, function () { console.log(`App listening on port ${port}`); }); - }); \ No newline at end of file + }); diff --git a/src/css/main.scss b/src/css/main.scss index f46d046..ae9625e 100644 --- a/src/css/main.scss +++ b/src/css/main.scss @@ -37,6 +37,7 @@ a { pre code { overflow: scroll; + padding-bottom: 15px; } figure p { @@ -237,7 +238,7 @@ nav { margin-bottom: 100px; a { - font-size: 1.3em; + font-size: 1.2em; } img{ @@ -245,6 +246,10 @@ nav { max-width: 100%; margin: 0 auto; } + + p > code { + border: 1px dotted; + } } .pagination { @@ -296,4 +301,4 @@ nav { height: 100px; background-size: cover; background-position: center; -} \ No newline at end of file +}