Skip to content

Commit f8dc09b

Browse files
committed
getting close
1 parent 9fe79d8 commit f8dc09b

28 files changed

+277
-453
lines changed

app/routes/BlogRoute.res

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ let loader: ReactRouter.Loader.t<loaderData> = async ({request}) => {
88
let posts: array<BlogApi.post> = (await posts())->Array.filter(post => {
99
post.archived == showArchived
1010
})
11-
let data = {posts, category: All}
11+
let data = {posts, category: showArchived ? Archived : All}
12+
1213
data
1314
}
1415

app/routes/MdxRoute.res

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ type loaderData = {
66
categories: array<SidebarLayout.Sidebar.Category.t>,
77
entries: array<TableOfContents.entry>,
88
blogPost?: BlogApi.post,
9-
resources?: array<CommunityContent.link>,
109
}
1110

1211
/**
@@ -121,15 +120,14 @@ let communityTableOfContents = async () => {
121120
->groupBySection
122121
->Dict.mapValues(values => values->sortSection->convertToNavItems("/community"))
123122

123+
Console.log(groups)
124+
124125
// these are the categories that appear in the sidebar
125126
let categories: array<SidebarLayout.Sidebar.Category.t> = getAllGroups(groups, ["Resources"])
126127

127128
categories
128129
}
129130

130-
@module("../../data/resources.json")
131-
external resources: array<CommunityContent.link> = "default"
132-
133131
let loader: Loader.t<loaderData> = async ({request}) => {
134132
let {pathname} = WebAPI.URL.make(~url=request.url)
135133

@@ -193,7 +191,6 @@ let loader: Loader.t<loaderData> = async ({request}) => {
193191
attributes: mdx.attributes,
194192
entries,
195193
categories,
196-
resources,
197194
}
198195

199196
res
@@ -224,15 +221,13 @@ let default = () => {
224221
(pathname :> string)->String.includes("docs/react")
225222
) {
226223
<DocsLayout metaTitleCategory categories activeToc={title: "Introduction", entries}>
227-
<div className="markdown-body"> {component()} </div>
224+
<di1v className="markdown-body"> {component()} </di1v>
228225
</DocsLayout>
229226
} else if (pathname :> string)->String.includes("community") {
230-
let resources = loaderData.resources->Option.getOr([])
231227
<div>
232-
<SidebarLayout.Sidebar
233-
categories={categories} isOpen={true} route={pathname} toggle={() => ()}
234-
/>
235-
<div className="markdown-body"> {component()} </div>
228+
<CommunityLayout categories entries>
229+
<div className="markdown-body"> {component()} </div>
230+
</CommunityLayout>
236231
</div>
237232
} else {
238233
switch loaderData.blogPost {

app/routes/MdxRoute.resi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ type loaderData = {
33
categories: array<SidebarLayout.Sidebar.Category.t>,
44
entries: array<TableOfContents.entry>,
55
blogPost?: BlogApi.post,
6-
resources?: array<CommunityContent.link>,
76
}
87

98
let loader: ReactRouter.Loader.t<loaderData>

community/code-of-conduct.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: "Code of Conduct"
33
description: "Our working codex for the ReScript community"
44
canonical: "/community/code-of-conduct"
55
section: "Resources"
6+
order: 4
67
---
78

89
# Code of Conduct

community/content.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ title: "Content"
33
description: "Community Content"
44
canonical: "/community/content"
55
section: "Resources"
6+
order: 2
67
---
78

8-
import CommunityContent from "src/CommunityContent.mjs";
9-
109
<CommunityContent />

community/overview.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: "Overview"
33
description: "Community Resources Overview"
44
canonical: "/community/overview"
55
section: "Resources"
6+
order: 1
67
---
78

89
# Community Overview

community/roadmap.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: "Roadmap"
33
description: "Goals & Future Releases"
44
canonical: "/community/roadmap"
55
section: "Resources"
6+
order: 3
67
---
78

89
# Roadmap

community/translations.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: "Translations"
33
description: "Translation Sites"
44
canonical: "/community/translation"
55
section: "Resources"
6+
order: 5
67
---
78

89
# Translations

data/resources.json

Lines changed: 0 additions & 116 deletions
This file was deleted.

scripts/bsb-benchmark-test.js

Lines changed: 0 additions & 122 deletions
This file was deleted.

0 commit comments

Comments
 (0)