forked from github/docs
-
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.
Remove hubdown and use our own markdown pipeline (github#17551)
* Uninstall hubdown, install unified deps * Create create-processor * Use it * Update a doc * Tweak the language * Use the same versions that hubdown used
- Loading branch information
Showing
5 changed files
with
59 additions
and
98 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
const unified = require('unified') | ||
const markdown = require('remark-parse') | ||
const emoji = require('remark-gemoji-to-emoji') | ||
const remark2rehype = require('remark-rehype') | ||
const raw = require('rehype-raw') | ||
const slug = require('rehype-slug') | ||
const autolinkHeadings = require('rehype-autolink-headings') | ||
const highlight = require('rehype-highlight') | ||
const html = require('rehype-stringify') | ||
const graphql = require('highlightjs-graphql').definer | ||
const remarkCodeExtra = require('remark-code-extra') | ||
const codeHeader = require('./plugins/code-header') | ||
|
||
module.exports = function createProcessor () { | ||
return unified() | ||
.use(markdown) | ||
.use(remarkCodeExtra, { transform: codeHeader }) | ||
.use(emoji) | ||
.use(remark2rehype, { allowDangerousHTML: true }) | ||
.use(slug) | ||
.use(autolinkHeadings, { behavior: 'wrap' }) | ||
.use(highlight, { languages: { graphql }, subset: false }) | ||
.use(raw) | ||
.use(html) | ||
} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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