From 92425d58cf4e8ad6ac08383bb9c0c95b3547d74c Mon Sep 17 00:00:00 2001 From: Janik von Rotz Date: Mon, 16 Nov 2020 19:49:00 +0100 Subject: [PATCH] update build --- build.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/build.js b/build.js index 8f5c5a73..9e2b45cb 100644 --- a/build.js +++ b/build.js @@ -3,7 +3,7 @@ const fs = require('fs') // settings const ignoreFiles = ['_navbar.md', '_sidbar.md'] const basePath = '/' -const basePathAssets = '/assets/img/' +const basePathAssets = '/assets/' const uriSuffix = '.html' function sanitizeFilename(file) { @@ -14,7 +14,7 @@ function convert(content,file) { // convert wiki image links // ![[image.png]] -> - const wikiImage = /!\[\[([^\]]*\.png|jpg|jpeg)\]\]/g + const wikiImage = /!\[\[([^\]]*\.png|jpg|jpeg|svg|gif)\]\]/g content = content.replace(wikiImage, ``) // convert embeded content links @@ -87,4 +87,6 @@ fs.readdirSync(__dirname).filter(file => (file.slice(-3) === '.md') && (ignoreFi // write content to new file fs.writeFileSync(newfile, content, 'utf8') -}) \ No newline at end of file +}) + +fs.moveSync( __dirname + '/assets', __dirname + '.vuepress/dist/assets') \ No newline at end of file