Skip to content

Commit

Permalink
docs: disambiguate variable names in TOC template
Browse files Browse the repository at this point in the history
  • Loading branch information
bennypowers committed Sep 19, 2024
1 parent bb107aa commit 54cfbf2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/_includes/layouts/pages/basic.njk
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ layout: layouts/base.njk
{% include 'partials/component/sidenav.njk' %}

{%- if hasToc -%}
{%- set tags = tocTags or ['h2'] -%}
{%- set table = content | toc(tags=tocTags) -%}
{%- set tagsForThisPageToc = tocTags or ['h2'] -%}
{%- set table = content | toc(tags=tagsForThisPageToc) -%}
{%- endif -%}

<rh-surface id="main"
Expand Down
3 changes: 0 additions & 3 deletions docs/tokens/tokens.11ty.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ module.exports = class TokensPage {
|| `${capitalize(tokenCategory.title || tokenCategory.slug)} tokens`,
},
hasToc: true,
tocTags: [
'h2',
],
pagination: {
size: 1,
alias: 'tokenCategory',
Expand Down

0 comments on commit 54cfbf2

Please sign in to comment.