Add markdown-it-wikilinks support

This commit is contained in:
Kristian Polso 2018-06-15 09:37:39 +03:00
parent 04f463ba12
commit 449e19dd39
5 changed files with 53 additions and 2 deletions

View file

@ -11,5 +11,18 @@ module.exports = {
docsBranch: 'master', docsBranch: 'master',
editLinkText: 'Edit this page on Github' editLinkText: 'Edit this page on Github'
}, },
ga: 'UA-60403362-1' ga: 'UA-60403362-1',
markdown: {
config: md => {
var wikilinks = require('markdown-it-wikilinks')({
makeAllLinksAbsolute: true,
baseURL: '/glossary.html#',
uriSuffix: '',
htmlAttributes: {
class: 'wikilink'
}
});
md.use(wikilinks);
}
}
} }

View file

@ -23,7 +23,7 @@ featureLinks:
href: https://lbry.io/twitter href: https://lbry.io/twitter
--- ---
Sometimes we say that the LBRY blockchain is the foundation of the LBRY protocol, but that's a lie. Sometimes we say that the LBRY [[blockchain]] is the foundation of the LBRY protocol, but that's a lie.
The foundation of LBRY is the community of people that make it possible. LBRY uses computers to move bits around, but it's people that tell them how. The foundation of LBRY is the community of people that make it possible. LBRY uses computers to move bits around, but it's people that tell them how.

9
content/glossary.md Normal file
View file

@ -0,0 +1,9 @@
## A
## B
### Blockchain
Blockchain is a continuously growing list of records, called blocks, which are linked and secured using cryptography.
## C

View file

@ -23,6 +23,7 @@
"express": "^4.16.3", "express": "^4.16.3",
"heroku-ssl-redirect": "0.0.4", "heroku-ssl-redirect": "0.0.4",
"highlight.js": "^9.12.0", "highlight.js": "^9.12.0",
"markdown-it-wikilinks": "^1.0.1",
"node-sass": "^4.9.0", "node-sass": "^4.9.0",
"redis": "^2.8.0", "redis": "^2.8.0",
"request": "^2.85.0", "request": "^2.85.0",

View file

@ -4362,6 +4362,10 @@ markdown-it-emoji@^1.4.0:
version "1.4.0" version "1.4.0"
resolved "https://registry.yarnpkg.com/markdown-it-emoji/-/markdown-it-emoji-1.4.0.tgz#9bee0e9a990a963ba96df6980c4fddb05dfb4dcc" resolved "https://registry.yarnpkg.com/markdown-it-emoji/-/markdown-it-emoji-1.4.0.tgz#9bee0e9a990a963ba96df6980c4fddb05dfb4dcc"
markdown-it-regexp@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/markdown-it-regexp/-/markdown-it-regexp-0.4.0.tgz#d64d713eecec55ce4cfdeb321750ecc099e2c2dc"
markdown-it-table-of-contents@^0.3.3: markdown-it-table-of-contents@^0.3.3:
version "0.3.3" version "0.3.3"
resolved "https://registry.yarnpkg.com/markdown-it-table-of-contents/-/markdown-it-table-of-contents-0.3.3.tgz#b62e943c32de2c4a27d3e7c83cd63acbc2a9c4a2" resolved "https://registry.yarnpkg.com/markdown-it-table-of-contents/-/markdown-it-table-of-contents-0.3.3.tgz#b62e943c32de2c4a27d3e7c83cd63acbc2a9c4a2"
@ -4369,6 +4373,14 @@ markdown-it-table-of-contents@^0.3.3:
lodash.assign "~4.2.0" lodash.assign "~4.2.0"
string "~3.3.3" string "~3.3.3"
markdown-it-wikilinks@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/markdown-it-wikilinks/-/markdown-it-wikilinks-1.0.1.tgz#fb5e0c0a217997b089b8c2dc22f5c572e64aad74"
dependencies:
extend "^3.0.0"
markdown-it-regexp "^0.4.0"
sanitize-filename "^1.6.1"
markdown-it@^8.4.1: markdown-it@^8.4.1:
version "8.4.1" version "8.4.1"
resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-8.4.1.tgz#206fe59b0e4e1b78a7c73250af9b34a4ad0aaf44" resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-8.4.1.tgz#206fe59b0e4e1b78a7c73250af9b34a4ad0aaf44"
@ -6152,6 +6164,12 @@ safe-regex@^1.1.0:
version "2.1.2" version "2.1.2"
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
sanitize-filename@^1.6.1:
version "1.6.1"
resolved "https://registry.yarnpkg.com/sanitize-filename/-/sanitize-filename-1.6.1.tgz#612da1c96473fa02dccda92dcd5b4ab164a6772a"
dependencies:
truncate-utf8-bytes "^1.0.0"
sass-graph@^2.2.4: sass-graph@^2.2.4:
version "2.2.4" version "2.2.4"
resolved "https://registry.yarnpkg.com/sass-graph/-/sass-graph-2.2.4.tgz#13fbd63cd1caf0908b9fd93476ad43a51d1e0b49" resolved "https://registry.yarnpkg.com/sass-graph/-/sass-graph-2.2.4.tgz#13fbd63cd1caf0908b9fd93476ad43a51d1e0b49"
@ -6832,6 +6850,12 @@ trim-right@^1.0.1:
dependencies: dependencies:
glob "^6.0.4" glob "^6.0.4"
truncate-utf8-bytes@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz#405923909592d56f78a5818434b0b78489ca5f2b"
dependencies:
utf8-byte-length "^1.0.1"
tslib@^1.9.0: tslib@^1.9.0:
version "1.9.2" version "1.9.2"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.2.tgz#8be0cc9a1f6dc7727c38deb16c2ebd1a2892988e" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.2.tgz#8be0cc9a1f6dc7727c38deb16c2ebd1a2892988e"
@ -7055,6 +7079,10 @@ use@^3.1.0:
dependencies: dependencies:
kind-of "^6.0.2" kind-of "^6.0.2"
utf8-byte-length@^1.0.1:
version "1.0.4"
resolved "https://registry.yarnpkg.com/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz#f45f150c4c66eee968186505ab93fcbb8ad6bf61"
util-deprecate@~1.0.1: util-deprecate@~1.0.1:
version "1.0.2" version "1.0.2"
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"