From 0454bf71b56b6c13c84e3fbfd2afa0a7b0742c18 Mon Sep 17 00:00:00 2001 From: Kyle Mathews Date: Sat, 16 Apr 2016 14:08:57 -0700 Subject: [PATCH] Make HTML & md wrappers consistent + test html frontmatter --- lib/isomorphic/wrappers/html.js | 7 +++++-- test/fixtures/static-wrappers/pages/html.html | 4 +++- test/integration/static-html-wrappers.js | 1 - 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/isomorphic/wrappers/html.js b/lib/isomorphic/wrappers/html.js index 548002b29fdee..fb902e1f4d5ee 100644 --- a/lib/isomorphic/wrappers/html.js +++ b/lib/isomorphic/wrappers/html.js @@ -12,9 +12,12 @@ module.exports = React.createClass({ }, render () { - const html = this.props.route.page.data.body + const post = this.props.route.page.data return ( -
+
+

{post.title}

+
+
) }, }) diff --git a/test/fixtures/static-wrappers/pages/html.html b/test/fixtures/static-wrappers/pages/html.html index 12b51076e097b..e4edf7a531384 100644 --- a/test/fixtures/static-wrappers/pages/html.html +++ b/test/fixtures/static-wrappers/pages/html.html @@ -1,2 +1,4 @@ -

html

+

This is a page with the .html extension.

diff --git a/test/integration/static-html-wrappers.js b/test/integration/static-html-wrappers.js index 6de86b4cd1c1b..b988209e637c4 100644 --- a/test/integration/static-html-wrappers.js +++ b/test/integration/static-html-wrappers.js @@ -22,7 +22,6 @@ test('md/index.html has an h1 that states file extention', async t => { const filePath = path.join(fixturePath, 'public', 'md', 'index.html') const $ = await dom(filePath) - // MD wrapper spits out an h1 tag. Shouldn't it be consistent with HTML const heading = $('h1').last() t.truthy(heading) const headingText = heading.text()