Added support for drafts

This commit is contained in:
Marcus Noble 2016-07-26 10:08:49 +01:00
parent 85dbfe9fe6
commit a66f3bc760
2 changed files with 18 additions and 4 deletions

13
app.js
View File

@ -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}`);
});
});
});

View File

@ -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;
}
}