Docs/fix sitesidebar template (#778)
* Fix: Do not commit `.env` files in any directory * Links that aren't current should have either *no* aria-current attribute or `aria-current="false"` for the same effect.
This commit is contained in:
parent
6915dc688b
commit
ec4e00a8c1
2 changed files with 4 additions and 1 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -9,3 +9,6 @@ package-lock.json
|
|||
|
||||
# .vscode files other than at top-level
|
||||
**/.vscode
|
||||
|
||||
# do not commit .env files or any files that end with `.env`
|
||||
*.env
|
||||
|
|
|
@ -11,7 +11,7 @@ const {currentPage} = Astro.props;
|
|||
<h2 class="nav-group-title">{category.text}</h2>
|
||||
<ul>
|
||||
{category.children.map(child => (
|
||||
<li class="nav-link"><a href={`${Astro.site.pathname}${child.link}`} aria-current={`${currentPage === child.link ? 'page' : ''}`}>{child.text}</a></li>
|
||||
<li class="nav-link"><a href={`${Astro.site.pathname}${child.link}`} aria-current={`${currentPage === child.link ? 'page' : 'false'}`}>{child.text}</a></li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue