-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
modifying the way the site shows markdown and adding the bundle analyzer
- Loading branch information
1 parent
ff6b251
commit 058d5e3
Showing
7 changed files
with
837 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import remark from 'remark'; | ||
import html from 'remark-html'; | ||
|
||
// this was originally copied from the React.js blog starter here | ||
// https://github.com/zeit/next.js/blob/canary/examples/blog-starter/lib/markdownToHtml.js | ||
|
||
// the "content" of this site's posts are just raw text for the most part, but using | ||
// remark and remark-html here enables support if I want to use additional Markdown syntax | ||
|
||
// if you get a terminal message like | ||
// "mdast-util-to-hast: deprecation: `allowDangerousHTML` is nonstandard, use `allowDangerousHtml` instead" | ||
// this is in the "mdast-util-to-hast project and is already being fixed by the PR here | ||
// https://github.com/remarkjs/remark-html/pull/29 | ||
|
||
export default async function markdownToHtml(markdown) { | ||
const result = await remark().use(html).process(markdown); | ||
return result.toString(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
const withBundleAnalyzer = require('@next/bundle-analyzer')({ | ||
enabled: process.env.ANALYZE === 'true', | ||
}); | ||
module.exports = withBundleAnalyzer({}); |
Oops, something went wrong.
058d5e3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to following URLs: