Skip to content

Commit 7f8ca6f

Browse files
hide uncategorized and make deno namespace the langing page for api/deno (#1482)
1 parent 17a412b commit 7f8ca6f

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

_components/SecondaryNav.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
padding: 0;
88
margin: 0 0 0.5rem;
99
list-style: none;
10+
min-width: 250px;
1011
}
1112

1213
.sub-nav-heading-link {

_components/SecondaryNav.tsx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ export default function (data: Lume.Data) {
22
const sectionData = data.sectionData;
33
const currentUrl = data.currentUrl;
44
const isReference = currentUrl.startsWith("/api/");
5+
const isDenoAPI = currentUrl.startsWith("/api/deno/");
56

67
// Reference page nav has no heirarchy and a different data names
78
if (isReference) {
@@ -12,13 +13,15 @@ export default function (data: Lume.Data) {
1213
<ul className="sub-nav">
1314
{nav.items?.map((item: any) => (
1415
<li key={item.href}>
15-
<a
16-
href={item.href}
17-
className="sub-nav-link blocklink"
18-
data-active={item.active}
19-
>
20-
{item.name}
21-
</a>
16+
{(isDenoAPI && item.name === "Uncategorized") ? <></> : (
17+
<a
18+
href={item.href}
19+
className="sub-nav-link blocklink"
20+
data-active={item.active}
21+
>
22+
{item.name}
23+
</a>
24+
)}
2225
</li>
2326
))}
2427
</ul>

oldurls.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,6 @@
7474
"/examples/watching-files": "/examples/watching_files",
7575
"/examples/web-workers": "/examples/web_workers",
7676
"/examples/writing-files": "/examples/writing_files",
77-
"/examples/writing-tests": "/examples/writing_tests"
77+
"/examples/writing-tests": "/examples/writing_tests",
78+
"/api/deno/": "/api/deno/~/Deno"
7879
}

0 commit comments

Comments
 (0)