summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Caleb Jasik <calebjasik@jasik.xyz> 2021-07-20 15:56:45 -0500
committerGravatar GitHub <noreply@github.com> 2021-07-20 15:56:45 -0500
commitec4e00a8c180ec1736c88245fa7c92469b0254b7 (patch)
treec3b208e11223b5841c512fa6b90264828a4de577
parent6915dc688bdd3bb5b9230c710516509ebec7ee78 (diff)
downloadastro-ec4e00a8c180ec1736c88245fa7c92469b0254b7.tar.gz
astro-ec4e00a8c180ec1736c88245fa7c92469b0254b7.tar.zst
astro-ec4e00a8c180ec1736c88245fa7c92469b0254b7.zip
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.
-rw-r--r--.gitignore3
-rw-r--r--docs/src/components/SiteSidebar.astro2
2 files changed, 4 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 919cc45da..b892b290d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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
diff --git a/docs/src/components/SiteSidebar.astro b/docs/src/components/SiteSidebar.astro
index 02a17d99d..ebdf918f5 100644
--- a/docs/src/components/SiteSidebar.astro
+++ b/docs/src/components/SiteSidebar.astro
@@ -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>