Skip to content

Commit

Permalink
Remove unboxed chapter from sidebar and add a redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
fhammerschmidt committed Dec 5, 2023
1 parent eced089 commit 9595ce4
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 20 deletions.
1 change: 0 additions & 1 deletion data/sidebar_manual_latest.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"module",
"import-export",
"attribute",
"unboxed",
"reserved-keywords"
],
"Advanced Features": [
Expand Down
47 changes: 28 additions & 19 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import fs from "fs";
import webpack from "webpack";
import rehypeSlug from 'rehype-slug';
import remarkGfm from 'remark-gfm';
import remarkComment from 'remark-comment';
import remarkFrontmatter from 'remark-frontmatter'
import rehypeSlug from "rehype-slug";
import remarkGfm from "remark-gfm";
import remarkComment from "remark-comment";
import remarkFrontmatter from "remark-frontmatter";
import remarkMdxFrontmatter from "remark-mdx-frontmatter";
import { createLoader } from 'simple-functional-loader'
import { createLoader } from "simple-functional-loader";

const bsconfig = JSON.parse(fs.readFileSync("./rescript.json"))
const bsconfig = JSON.parse(fs.readFileSync("./rescript.json"));

const { ProvidePlugin } = webpack;

Expand Down Expand Up @@ -46,10 +46,10 @@ const config = {
function mainMdxLoader(plugins) {
return [
createLoader(function(source) {
const result = `${source}\n\nMDXContent.frontmatter = frontmatter`
return result
const result = `${source}\n\nMDXContent.frontmatter = frontmatter`;
return result;
}),
]
];
}

config.module.rules.push({
Expand All @@ -61,18 +61,22 @@ const config = {
test: /\.mdx?$/,
use: [
{
loader: '@mdx-js/loader',
loader: "@mdx-js/loader",
/** @type {import('@mdx-js/loader').Options} */
options: {
remarkPlugins: [remarkComment, remarkGfm, remarkFrontmatter, remarkMdxFrontmatter],
providerImportSource: '@mdx-js/react',
rehypePlugins: [rehypeSlug]
}
}
]
remarkPlugins: [
remarkComment,
remarkGfm,
remarkFrontmatter,
remarkMdxFrontmatter,
],
providerImportSource: "@mdx-js/react",
rehypePlugins: [rehypeSlug],
},
},
],
});


config.plugins.push(new ProvidePlugin({ React: "react" }));
return config;
},
Expand All @@ -93,11 +97,16 @@ const config = {
destination: "/docs/manual/v10.0.0/migrate-from-bucklescript-reason",
permanent: true,
},
{
source: "/docs/manual/latest/unboxed",
destination: "/docs/manual/v10.0.0/unboxed",
permanent: true,
},
];
},
};

export default {
transpilePackages: transpileModules,
...config
}
...config,
};

0 comments on commit 9595ce4

Please sign in to comment.