From ac679297c38b0a822cf25c37cbcc1d3c97fdf293 Mon Sep 17 00:00:00 2001 From: Cristiano Carvalheiro Date: Thu, 26 Dec 2019 15:53:22 +0000 Subject: [PATCH] Use Docsify router when fetching terms from the _glossary.md file --- src/glossary.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/glossary.js b/src/glossary.js index f2ba31a..f6d8032 100644 --- a/src/glossary.js +++ b/src/glossary.js @@ -18,8 +18,9 @@ export function install (hook, vm) { } if(!window.$docsify.terms){ - fetch('_glossary.md').then(function(data){ - data.text().then(function(text){ + Docsify + .get(vm.router.getFile("/_glossary"), false, vm.config.requestHeaders) + .then(text => { window.$docsify.terms = {}; let lines = text.split('\n'); @@ -34,7 +35,6 @@ export function install (hook, vm) { }); addLinks(content,next,window.$docsify.terms); - }) }) } else{ addLinks(content,next,window.$docsify.terms);