Skip to content

Commit a5779b3

Browse files
authored
Merge pull request rescript-lang#167 from reason-association/change-layout-architecture
Change layout architecture
2 parents 5e6a95a + 3f4e7e4 commit a5779b3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+624
-1464
lines changed

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ public/blog/feed.xml
1010
node_modules/
1111
.next/
1212
index_data/*.json
13-
!index_data/blog_authors.json
14-
!index_data/blog_posts.json
15-
!index_data/build-schema.json
1613

1714
yarn-error.log
1815

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ build specific pages (file `index_data/x.json` not found).
5555

5656
## Project Structure Overview
5757

58+
- `data`: Contains hand-curated data, such as sidebar ordering, blog data, etc
59+
- `index_data`: Contains generated data, usually generated by scripts like `scripts/extract-tocs.js`
60+
- `compilers`: Contains a subdirectory with independently installed ReScript compilers, to be able to compile / test examples with different ReScript versions
5861
- `pages`: All Next pages. Those are written in JS / MDX, some pages are re-exporting ReScript based pages from `src/MyPage.res`
5962
- `styles`: Contains all extra CSS that cannot be expressed with Tailwind
6063
- `src`: Contains all ReScript related code for the UI
@@ -145,7 +148,7 @@ posts](https://rescript-lang.org/blogpost-guide).
145148
**Quick-takeaways:**
146149

147150
- Blogposts are located in `_blogposts`
148-
- Author metadata is located in `index_data/blog_authors.json`
151+
- Author metadata is located in `data/blog_authors.json`
149152
- Make sure to follow the file naming rules
150153

151154
### Contributing
File renamed without changes.
File renamed without changes.
File renamed without changes.

data/sidebar_community.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"Resources": [
3+
"overview",
4+
"code-of-conduct"
5+
]
6+
}

data/sidebar_gentype_latest.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"Overview": [
3+
"introduction",
4+
"getting-started",
5+
"usage"
6+
],
7+
"Advanced": [
8+
"supported-types"
9+
]
10+
}

data/sidebar_manual_latest.json

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"Overview": [
3+
"introduction",
4+
"installation",
5+
"editor-plugins",
6+
"migrate-from-bucklescript-reason",
7+
"try"
8+
],
9+
"Language Features": [
10+
"overview",
11+
"let-binding",
12+
"type",
13+
"primitive-types",
14+
"tuple",
15+
"record",
16+
"object",
17+
"variant",
18+
"null-undefined-option",
19+
"array-and-list",
20+
"function",
21+
"control-flow",
22+
"pipe",
23+
"pattern-matching-destructuring",
24+
"mutation",
25+
"jsx",
26+
"exception",
27+
"lazy-values",
28+
"promise",
29+
"module",
30+
"import-export",
31+
"attribute",
32+
"unboxed",
33+
"reserved-keywords"
34+
],
35+
"JavaScript Interop": [
36+
"embed-raw-javascript",
37+
"shared-data-types",
38+
"external",
39+
"bind-to-js-object",
40+
"bind-to-js-function",
41+
"import-from-export-to-js",
42+
"bind-to-global-js-values",
43+
"json",
44+
"inlining-constants",
45+
"use-illegal-identifier-names",
46+
"generate-converters-accessors",
47+
"browser-support-polyfills",
48+
"interop-cheatsheet"
49+
],
50+
"Build System": [
51+
"build-overview",
52+
"build-configuration",
53+
"build-configuration-schema",
54+
"interop-with-js-build-systems",
55+
"build-performance"
56+
],
57+
"Guides": [
58+
"converting-from-js",
59+
"libraries"
60+
],
61+
"Extra": [
62+
"newcomer-examples",
63+
"project-structure",
64+
"faq"
65+
]
66+
}

data/sidebar_manual_v800.json

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"Overview": [
3+
"introduction",
4+
"installation",
5+
"editor-plugins",
6+
"migrate-from-bucklescript-reason",
7+
"try"
8+
],
9+
"Language Features": [
10+
"overview",
11+
"let-binding",
12+
"type",
13+
"primitive-types",
14+
"tuple",
15+
"record",
16+
"object",
17+
"variant",
18+
"null-undefined-option",
19+
"array-and-list",
20+
"function",
21+
"control-flow",
22+
"pipe",
23+
"pattern-matching-destructuring",
24+
"mutation",
25+
"jsx",
26+
"exception",
27+
"lazy-values",
28+
"promise",
29+
"module",
30+
"import-export",
31+
"reserved-keywords"
32+
],
33+
"JavaScript Interop": [
34+
"embed-raw-javascript",
35+
"shared-data-types",
36+
"external",
37+
"bind-to-js-object",
38+
"bind-to-js-function",
39+
"import-from-export-to-js",
40+
"bind-to-global-js-values",
41+
"json",
42+
"use-illegal-identifier-names",
43+
"generate-converters-accessors",
44+
"browser-support-polyfills",
45+
"interop-cheatsheet"
46+
],
47+
"Build System": [
48+
"build-overview",
49+
"build-configuration",
50+
"interop-with-js-build-systems",
51+
"build-performance"
52+
],
53+
"Guides": [
54+
"converting-from-js",
55+
"libraries"
56+
],
57+
"Extra": [
58+
"newcomer-examples",
59+
"project-structure",
60+
"faq"
61+
]
62+
}

next.config.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,16 @@ const config = {
2828
}
2929
}
3030
return config
31-
}
31+
},
32+
async redirects() {
33+
return [
34+
{
35+
source: '/community',
36+
destination: '/community/overview',
37+
permanent: true,
38+
},
39+
]
40+
},
3241
};
3342

3443
module.exports = withMdx(withTM(withCSS(config)));

0 commit comments

Comments
 (0)