Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions lib/isomorphic/wrappers/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<div dangerouslySetInnerHTML={{ __html: html }} />
<div>
<h1>{post.title}</h1>
<div dangerouslySetInnerHTML={{ __html: post.html }} />
</div>
)
},
})
4 changes: 3 additions & 1 deletion test/fixtures/static-wrappers/pages/html.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
<h1>html</h1>
<!--
title: html
-->
<p>This is a page with the .html extension.</p>
1 change: 0 additions & 1 deletion test/integration/static-html-wrappers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down