mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig.space.git
synced 2025-12-13 16:26:50 +00:00
Add canonical info
This commit is contained in:
@@ -31,6 +31,7 @@ block head
|
||||
link(rel="mask-icon" href=assetPath("/img/favicon/safari-pinned-tab.svg") color=themeColor)
|
||||
link(rel="stylesheet" href=assetPath("/css/main.css"))
|
||||
link(rel="alternate" type="application/rss+xml" title="Podcast Feed" href=site.meta.publicFeedUrl)
|
||||
link(rel="canonical" href=assetUrl(pagePath))
|
||||
script(src=assetPath("/js/player.js") defer)
|
||||
script(src=assetPath("/js/main.js"))
|
||||
title= pageTitle
|
||||
|
||||
@@ -31,10 +31,11 @@ const renderPage = (template, out, data = {}) => {
|
||||
const needsRender = !changedFile || changedFile === templateFile || changedFile.startsWith('src/includes') || changedFile.endsWith('.js') || changedFile.endsWith('.json')
|
||||
if (!needsRender) return
|
||||
|
||||
const file = resolve(__dirname, '..', templateFile)
|
||||
const options = Object.assign({}, config, { site }, data)
|
||||
const rendered = pug.renderFile(file, options)
|
||||
const dest = out === 'index' ? 'index.html' : `${out}/index.html`
|
||||
const pagePath = out === 'index' ? '/' : `/${out}/`
|
||||
const file = resolve(__dirname, '..', templateFile)
|
||||
const options = Object.assign({}, config, { site }, data, { pagePath })
|
||||
const rendered = pug.renderFile(file, options)
|
||||
const dst = resolve(__dirname, '..', 'dist', dest)
|
||||
const dir = dirname(dst)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user