From 449e19dd3992174fe397044345a8d7ba6089a51a Mon Sep 17 00:00:00 2001 From: Kristian Polso Date: Fri, 15 Jun 2018 09:37:39 +0300 Subject: [PATCH] Add markdown-it-wikilinks support --- content/.vuepress/config.js | 15 ++++++++++++++- content/community/index.md | 2 +- content/glossary.md | 9 +++++++++ package.json | 1 + yarn.lock | 28 ++++++++++++++++++++++++++++ 5 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 content/glossary.md diff --git a/content/.vuepress/config.js b/content/.vuepress/config.js index 8d9ec46..2aec224 100644 --- a/content/.vuepress/config.js +++ b/content/.vuepress/config.js @@ -11,5 +11,18 @@ module.exports = { docsBranch: 'master', 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); + } + } } diff --git a/content/community/index.md b/content/community/index.md index c955caf..6a7c17f 100644 --- a/content/community/index.md +++ b/content/community/index.md @@ -23,7 +23,7 @@ featureLinks: 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. diff --git a/content/glossary.md b/content/glossary.md new file mode 100644 index 0000000..987a88c --- /dev/null +++ b/content/glossary.md @@ -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 \ No newline at end of file diff --git a/package.json b/package.json index c45e910..24cfc2f 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "express": "^4.16.3", "heroku-ssl-redirect": "0.0.4", "highlight.js": "^9.12.0", + "markdown-it-wikilinks": "^1.0.1", "node-sass": "^4.9.0", "redis": "^2.8.0", "request": "^2.85.0", diff --git a/yarn.lock b/yarn.lock index d747cd8..d45d23a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4362,6 +4362,10 @@ markdown-it-emoji@^1.4.0: version "1.4.0" 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: version "0.3.3" 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" 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: version "8.4.1" 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" 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: version "2.2.4" resolved "https://registry.yarnpkg.com/sass-graph/-/sass-graph-2.2.4.tgz#13fbd63cd1caf0908b9fd93476ad43a51d1e0b49" @@ -6832,6 +6850,12 @@ trim-right@^1.0.1: dependencies: 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: version "1.9.2" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.2.tgz#8be0cc9a1f6dc7727c38deb16c2ebd1a2892988e" @@ -7055,6 +7079,10 @@ use@^3.1.0: dependencies: 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: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"