mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Enable custom links tags on eleventy layout
This commit is contained in:
parent
c631ba1c9a
commit
5cfcd5a7aa
1 changed files with 7 additions and 3 deletions
|
|
@ -190,11 +190,15 @@ class DefaultLayout {
|
|||
return `<script type="application/ld+json">${ structuredDataJson }</script>`
|
||||
}
|
||||
|
||||
generateLinkTags = ( pageLinkTags = [] ) => {
|
||||
generateLinkTags = ( renderData ) => {
|
||||
|
||||
const {
|
||||
headLinkTags = []
|
||||
} = renderData
|
||||
|
||||
const linkTags = {
|
||||
...defaultLinkTags,
|
||||
...Object.fromEntries(pageLinkTags.map( mapLinkTag ))
|
||||
...Object.fromEntries( headLinkTags.map( mapLinkTag ) )
|
||||
}
|
||||
|
||||
return Object.values( linkTags ).join('')
|
||||
|
|
@ -223,7 +227,7 @@ class DefaultLayout {
|
|||
|
||||
// Set link tags
|
||||
// this.generateLinkTags()
|
||||
workingLayoutString = workingLayoutString.replace( templateVar('link-tags'), this.generateLinkTags() )
|
||||
workingLayoutString = workingLayoutString.replace( templateVar('link-tags'), this.generateLinkTags( data ) )
|
||||
|
||||
// Add meta tags after title node
|
||||
// this.generateMetaTags( data )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue