Skip to content

Commit

Permalink
docs: double demo
Browse files Browse the repository at this point in the history
  • Loading branch information
bennypowers committed Oct 9, 2024
1 parent 46af12a commit 931a6cf
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions docs/_plugins/rhds.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -405,11 +405,13 @@ module.exports = function(eleventyConfig, { tagsToAlphabetize }) {
.sort()
// todo: avoid calling getProps twice, it's expensive
.map(x => getProps(x)));
tabs.splice(-1, 0, {
...props,
pageTitle: 'Demos',
href: demosUrl,
});
if (!tabs.some(x => x.pageTitle === 'Demos')) {
tabs.splice(-1, 0, {
...props,
pageTitle: 'Demos',
href: demosUrl,
});
}
return { docsPage, tabs, ...props };
}));
elementDocs.sort(alphabeticallyBySlug);
Expand Down

0 comments on commit 931a6cf

Please sign in to comment.