diff --git a/community/brand.mdx b/community/brand.mdx new file mode 100644 index 000000000..ee082570b --- /dev/null +++ b/community/brand.mdx @@ -0,0 +1,33 @@ +--- +title: "Brand Assets" +description: "ReScript Logo" +canonical: "/community/brand" +--- + +# Brand Assets + +## Logo + + + +
+ +[svg](/static/brand/rescript-brandmark.svg) | [png](/static/brand/rescript-brandmark.png) + +
+ +## Brandmark + + +
+
+ +
+ +
+ +
+ +[white.svg](/static/brand/rescript-logo-white.svg) | [white.png](/static/brand/rescript-logo-white.png) | [red.svg](/static/brand/rescript-logo.svg) | [red.png](/static/brand/rescript-logo.png) + +
diff --git a/data/sidebar_community.json b/data/sidebar_community.json index 9f40e27f2..ba4e374a8 100644 --- a/data/sidebar_community.json +++ b/data/sidebar_community.json @@ -3,6 +3,7 @@ "overview", "roadmap", "code-of-conduct", - "translations" + "translations", + "brand" ] } diff --git a/docs/manual/latest/build-configuration-schema.mdx b/docs/manual/latest/build-configuration-schema.mdx new file mode 100644 index 000000000..7de16dc6d --- /dev/null +++ b/docs/manual/latest/build-configuration-schema.mdx @@ -0,0 +1,6 @@ +--- +title: "Configuration Schema" +metaTitle: "Build System Configuration Schema" +description: "Schema exploration widget for the ReScript configuration file" +canonical: "/docs/manual/latest/build-configuration-schema" +--- diff --git a/docs/manual/latest/warning-numbers.mdx b/docs/manual/latest/warning-numbers.mdx new file mode 100644 index 000000000..a99301198 --- /dev/null +++ b/docs/manual/latest/warning-numbers.mdx @@ -0,0 +1,11 @@ +--- +title: "Warning Numbers" +description: "Available compiler warning numbers in ReScript" +canonical: "/docs/manual/latest/warning-numbers" +--- + +# Warning Numbers + +You can configure which warnings the ReScript compiler generates +[in the build configuration](/docs/manual/latest/build-configuration#warnings) or +using the [`@warning()`](/syntax-lookup#expression-warning-decorator) or the [`@@warning()`](/syntax-lookup#module-warning-decorator) decorator. diff --git a/docs/manual/v9.0.0/build-configuration-schema.mdx b/docs/manual/v9.0.0/build-configuration-schema.mdx new file mode 100644 index 000000000..7de16dc6d --- /dev/null +++ b/docs/manual/v9.0.0/build-configuration-schema.mdx @@ -0,0 +1,6 @@ +--- +title: "Configuration Schema" +metaTitle: "Build System Configuration Schema" +description: "Schema exploration widget for the ReScript configuration file" +canonical: "/docs/manual/latest/build-configuration-schema" +--- diff --git a/scripts/extract-tocs.mjs b/scripts/extract-tocs.mjs index 309d3e0a8..b05ae81ce 100644 --- a/scripts/extract-tocs.mjs +++ b/scripts/extract-tocs.mjs @@ -141,7 +141,7 @@ const createLatestManualToc = () => { const FILE_ORDER = Object.values(sidebarJson).reduce((acc, items) => { return acc.concat(items) - }, []).filter(section => section !== "build-configuration-schema" && section !== "warning-numbers"); + }, []) const files = glob.sync(`${MD_DIR}/*.?(js|md?(x))`); const ordered = orderFiles(files, FILE_ORDER); @@ -172,7 +172,7 @@ const createV900ManualToc = () => { const FILE_ORDER = Object.values(sidebarJson).reduce((acc, items) => { return acc.concat(items) - }, []).filter(section => section !== "build-configuration-schema" && section !== "warning-numbers"); + }, []) const files = glob.sync(`${MD_DIR}/*.?(js|md?(x))`); const ordered = orderFiles(files, FILE_ORDER); @@ -192,7 +192,7 @@ const createV800ManualToc = () => { const FILE_ORDER = Object.values(sidebarJson).reduce((acc, items) => { return acc.concat(items) - }, []).filter(section => section !== "build-configuration-schema" && section !== "warning-numbers"); + }, []) const files = glob.sync(`${MD_DIR}/*.?(js|md?(x))`); const ordered = orderFiles(files, FILE_ORDER); diff --git a/src/Docs.res b/src/Docs.res index ced33361e..3ab398e9f 100644 --- a/src/Docs.res +++ b/src/Docs.res @@ -1,13 +1,32 @@ type params = {slug: array} -type props = {mdxSource: Mdx.Remote.output} +type props = {mdxSource: Mdx.Remote.output, slug: array} let default = (props: props) => { - let {mdxSource} = props - + let {mdxSource, slug} = props let frontmatter = mdxSource.frontmatter - let content = MdxUtils.createElement(mdxSource) + let otherElement = switch slug->Belt.List.fromArray { + | list{"manual", version, rest} => + switch rest { + | "warning-numbers" => + | "build-configuration-schema" => + switch version { + | "latest" => + | "v9.0.0" => + | _ => React.null + } + | _ => React.null + } + | _ => React.null + } + + let content = + <> + {MdxUtils.createElement(mdxSource)} + otherElement + + let router = Next.Router.useRouter() let url = router.asPath->Url.parse @@ -88,7 +107,8 @@ let getStaticProps: Next.GetStaticProps.t = async ctx => { let mdxSource = await MdxUtils.serialize(source) let props = { - mdxSource: mdxSource, + mdxSource, + slug: params.slug, } {"props": props}