0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-26 11:42:39 +00:00

Add public URL in template.js

This commit is contained in:
G.Ambatte
2021-10-31 00:07:25 +13:00
parent 68341bf6a5
commit bd5f3c74e7

View File

@@ -1,4 +1,5 @@
module.exports = async(name, title = '', props = {})=>{
const HOMEBREWERY_PUBLIC_URL='https://homebrewery.naturalcrit.com';
return `
<!DOCTYPE html>
<html>
@@ -8,8 +9,8 @@ module.exports = async(name, title = '', props = {})=>{
<link href=${`/${name}/bundle.css`} rel='stylesheet' />
<link rel="icon" href="/assets/homebrew/favicon.ico" type="image/x-icon" />
<meta property="og:title" content="${props.brew?.title ? props.brew.title : 'Homebrewery - Untitled Brew'}">
<meta property="og:url" content="${process.env.PUBLIC_URL}/${props.brew?.shareId ? `share/${props.brew.shareId}` : ''}">
<meta property="og:image" content="${props.brew?.thumbnail ? props.brew.thumbnail : `${process.env.PUBLIC_URL}/thumbnail.png`}">
<meta property="og:url" content="${HOMEBREWERY_PUBLIC_URL}/${props.brew?.shareId ? `share/${props.brew.shareId}` : ''}">
<meta property="og:image" content="${props.brew?.thumbnail ? props.brew.thumbnail : `${HOMEBREWERY_PUBLIC_URL}/thumbnail.png`}">
<meta property="og:description" content="${props.brew?.description ? props.brew.description : 'No description.'}">
<meta property="og:site_name" content="The Homebrewery - Make your Homebrew content look legit!">
<meta property="og:type" content="website">