From 78f23079827fd23b0f3d1bdc3e57c110df517f5d Mon Sep 17 00:00:00 2001 From: Anthony Date: Wed, 2 Jun 2021 23:03:09 +0200 Subject: [PATCH] bugfix renaming of function --- web/src/html.js | 6 +++--- web/src/routes.js | 1 + web/webpack.config.js | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/web/src/html.js b/web/src/html.js index f24da20cb..f4cea9aac 100644 --- a/web/src/html.js +++ b/web/src/html.js @@ -88,7 +88,7 @@ function conditionallyAddPWA() { return head; } -function buildBasicOgMetadataAndPWA() { +function buildHead() { const head = '' + conditionallyAddPWA() + buildOgMetadata() + ''; return head; } @@ -312,8 +312,8 @@ async function getHtml(ctx) { } } - const ogMetadata = buildBasicOgMetadata(); + const ogMetadata = buildHead(); return insertToHead(html, ogMetadata); } -module.exports = { insertToHead, buildBasicOgMetadataAndPWA, getHtml }; +module.exports = { insertToHead, buildHead, getHtml }; diff --git a/web/src/routes.js b/web/src/routes.js index 5652473b1..c20b45d82 100644 --- a/web/src/routes.js +++ b/web/src/routes.js @@ -31,4 +31,5 @@ router.get('*', async ctx => { ctx.body = html; }); + module.exports = router; diff --git a/web/webpack.config.js b/web/webpack.config.js index 0fe07e390..5321eabff 100644 --- a/web/webpack.config.js +++ b/web/webpack.config.js @@ -8,7 +8,7 @@ const WriteFilePlugin = require('write-file-webpack-plugin'); const { DefinePlugin, ProvidePlugin } = require('webpack'); const SentryWebpackPlugin = require('@sentry/webpack-plugin'); const { getJsBundleId } = require('./bundle-id.js'); -const { insertToHead, buildBasicOgMetadataAndPWA } = require('./src/html'); +const { insertToHead, buildHead } = require('./src/html'); const { insertVariableXml, getOpenSearchXml } = require('./src/xml'); const CUSTOM_ROOT = path.resolve(__dirname, '../custom/'); @@ -27,7 +27,7 @@ const copyWebpackCommands = [ to: `${DIST_ROOT}/index.html`, // add javascript script to index.html, generate/insert metatags transform(content, path) { - return insertToHead(content.toString(), buildBasicOgMetadataAndPWA()); + return insertToHead(content.toString(), buildHead()); }, force: true, },