Merge pull request #38 from citricsquid/meta-descriptions

Adds meta descriptions to status code pages and index (closes #37)
This commit is contained in:
Samuel Ryan 2015-12-11 03:09:00 +00:00
commit 6d47d28d5e
4 changed files with 8 additions and 0 deletions

View File

@ -8,6 +8,7 @@ var elevate = require('metalsmith-elevate');
var ignore = require('metalsmith-ignore');
var collectionGrouping = require('metalsmith-collection-grouping');
var fingerprint = require('metalsmith-fingerprint-ignore');
var excerpts = require('metalsmith-better-excerpts');
var metalsmith = Metalsmith(__dirname);
metalsmith
@ -41,6 +42,7 @@ var metalsmith = Metalsmith(__dirname);
.use(branch('**/*.md')
.use(markdown())
.use(excerpts({pruneLength: 400}))
.use(layouts({
engine: 'jade',
directory: 'templates',

View File

@ -22,6 +22,7 @@
"jade": "^1.11.0",
"lodash.groupby": "^3.1.1",
"metalsmith": "^2.1.0",
"metalsmith-better-excerpts": "^0.1.7",
"metalsmith-branch": "0.0.4",
"metalsmith-collection-grouping": "^0.1.0",
"metalsmith-collections": "^0.7.0",

View File

@ -3,6 +3,9 @@ extends layout.jade
block title
title !{code} !{title} — httpstatuses.com
block description
meta(name='description' content='HTTP Status Code ' + code + ': ' + excerpt)
block contents
article.code.container
h2 !{groups.codes[set].title}

View File

@ -7,6 +7,8 @@ html(lang="en")
link(rel='stylesheet', href='/' + fingerprint['style.css'])
meta(name='viewport', content='width=device-width, initial-scale=1.0')
meta(charset='utf-8')
block description
meta(name='description' content='HTTP Status Code directory, with definitions, details and helpful code references.')
body
block contents
script.