Fix URLs fully with relative path helper
This commit is contained in:
committed by
Justin Fagnani
parent
817f502dfa
commit
5ced993566
@@ -1,4 +1,5 @@
|
||||
const page = require('./page.11ty.cjs');
|
||||
const relative = require('./relative-path.cjs');
|
||||
|
||||
/**
|
||||
* This template extends the page template and adds an examples list.
|
||||
@@ -21,7 +22,7 @@ const renderExample = ({name, content, collections, page}) => {
|
||||
? ''
|
||||
: collections.example.map((post) => `
|
||||
<li class=${post.url === page.url ? 'selected' : ''}>
|
||||
<a href="${post.url}">${ post.data.description.replace('<', '<') }</a>
|
||||
<a href="${relative(page.url, post.url)}">${post.data.description.replace('<', '<')}</a>
|
||||
</li>
|
||||
`).join('')}
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user