0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-30 17:32:38 +00:00

Move fix to template.js

This commit is contained in:
G.Ambatte
2022-11-14 08:20:46 +13:00
parent 3e626d91f0
commit 3e3610a204
2 changed files with 3 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
const template = async function(name, title='', props = {}){
const ogTags = [];
Object.entries(props.ogMeta).forEach(([key, value])=>{
const ogMeta = props.ogMeta ?? {};
Object.entries(ogMeta).forEach(([key, value])=>{
if(!value) return;
const tag = `<meta property="og:${key}" content="${value}">`;
ogTags.push(tag);