diff --git a/blocks/page-server/page-server.css b/blocks/page-server/page-server.css index e69de29b..e2010647 100644 --- a/blocks/page-server/page-server.css +++ b/blocks/page-server/page-server.css @@ -0,0 +1,3 @@ +.page-server { + display: none; +} diff --git a/blocks/page-server/page-server.js b/blocks/page-server/page-server.js index 18da1fc1..a02e2461 100644 --- a/blocks/page-server/page-server.js +++ b/blocks/page-server/page-server.js @@ -38,17 +38,7 @@ async function autoUpdatePage(main) { await Promise.all(Array.from(metaTags).map((meta) => sanitizeMeta(meta))); - main.innerHTML = main.innerHTML.replaceAll(regex, (_match, p1) => { - // todo: besides of using metadata, try using event metadata fetched from Event Service Layer - const { pathname } = window.location; - - if (p1 === 'event-name') { - const pathArray = pathname.split('/'); - return titleCase(pathArray[pathArray.length - 1]); - } - - return getMetadata(p1); - }); + main.innerHTML = main.innerHTML.replaceAll(regex, (_match, p1) => getMetadata(p1)); // handle link replacement main.querySelectorAll('a[href*="#"]').forEach((a) => {