mirror of
https://github.com/digitalocean/nginxconfig.io.git
synced 2025-08-29 07:16:34 +08:00
Update template generation (#224)
* Bump do-vue & do-bulma * Tweak how we generate the template * Remove the document.write monkeypatch, we'll fix this in prod
This commit is contained in:
committed by
GitHub
parent
4a786d2bfd
commit
4cfdcdb8d1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2020 DigitalOcean
|
||||
Copyright 2021 DigitalOcean
|
||||
|
||||
This code is licensed under the MIT License.
|
||||
You may obtain a copy of the License at
|
||||
@@ -32,8 +32,14 @@ const main = () => {
|
||||
const buildDir = path.join(__dirname, '..', '..', '..', 'build');
|
||||
let template = fs.readFileSync(path.join(buildDir, 'base.html'), 'utf8');
|
||||
|
||||
template = template.replace('<block name="title"></block>', 'NGINXConfig | ');
|
||||
// Inject our title now
|
||||
template = template.replace('<block name="title"><title>DigitalOcean</title></block>', '<title>NGINXConfig | DigitalOcean</title>');
|
||||
|
||||
// We don't need the head/script blocks, vue-cli-service handles those
|
||||
template = template.replace('<block name="head"></block>', '');
|
||||
template = template.replace('<block name="script"></block>', '');
|
||||
|
||||
// Inject our app mounting point
|
||||
template = template.replace('<block name="content"></block>', '<div id="app"></div>');
|
||||
|
||||
fs.writeFileSync(path.join(buildDir, 'index.html'), template);
|
||||
|
Reference in New Issue
Block a user