mirror of
https://github.com/rr-/szurubooru.git
synced 2025-07-17 08:26:24 +00:00
client/js/router.js: Reads <base> href tag
This commit is contained in:
committed by
Marcin Kurczewski
parent
defada45ab
commit
565027269c
@ -65,7 +65,10 @@ function bundleHtml() {
|
||||
const underscore = require('underscore');
|
||||
const babelify = require('babelify');
|
||||
const baseHtml = readTextFile('./html/index.htm', 'utf-8');
|
||||
writeFile('./public/index.htm', minifyHtml(baseHtml));
|
||||
const baseUrl = process.env.BASE_URL ? process.env.BASE_URL : '/';
|
||||
const finalHtml = baseHtml.replace(
|
||||
'<!-- Base HTML Placeholder -->', `<base href="${baseUrl}"/>`);
|
||||
writeFile('./public/index.htm', minifyHtml(finalHtml));
|
||||
|
||||
glob('./html/**/*.tpl', {}, (er, files) => {
|
||||
let compiledTemplateJs = '\'use strict\'\n';
|
||||
|
Reference in New Issue
Block a user