squiggle/packages/website/docusaurus.config.js

130 lines
3.5 KiB
JavaScript
Raw Normal View History

2022-02-06 18:40:28 +00:00
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const math = require("remark-math");
const katex = require("rehype-katex");
2022-02-06 18:40:28 +00:00
2022-04-10 23:15:46 +00:00
const lightCodeTheme = require("prism-react-renderer/themes/github");
const darkCodeTheme = require("prism-react-renderer/themes/dracula");
const path = require("path");
2022-02-06 18:40:28 +00:00
/** @type {import('@docusaurus/types').Config} */
const config = {
title: "Squiggle",
tagline: "An estimation language for forecasters",
2022-04-10 23:15:46 +00:00
url: "https://squiggle-language.com",
baseUrl: "/",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
favicon: "img/favicon.ico",
organizationName: "quantified-uncertainty", // Usually your GitHub org/user name.
2022-04-10 23:15:46 +00:00
projectName: "squiggle", // Usually your repo name.
2022-03-25 02:08:46 +00:00
plugins: [
() => ({
configureWebpack(config, isServer, utils, content) {
return {
2022-04-10 23:15:46 +00:00
resolve: {
alias: {
"@quri/squiggle-components": path.resolve(
__dirname,
"../components/src"
),
"@quri/squiggle-lang": path.resolve(
__dirname,
"../squiggle-lang/src/js"
),
},
},
2022-03-25 02:08:46 +00:00
};
2022-04-10 23:15:46 +00:00
},
}),
2022-03-25 02:08:46 +00:00
],
2022-02-06 18:40:28 +00:00
presets: [
[
2022-04-10 23:15:46 +00:00
"classic",
2022-02-06 18:40:28 +00:00
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
2022-04-10 23:15:46 +00:00
sidebarPath: require.resolve("./sidebars.js"),
2022-02-06 18:40:28 +00:00
// Please change this to your repo.
2022-04-10 23:15:46 +00:00
editUrl:
"https://github.com/quantified-uncertainty/squiggle/tree/develop/packages/website/",
remarkPlugins: [math],
rehypePlugins: [katex],
2022-02-06 18:40:28 +00:00
},
blog: {
showReadingTime: true,
// Please change this to your repo.
editUrl:
"https://github.com/quantified-uncertainty/squiggle/tree/develop/packages/website/",
2022-02-06 18:40:28 +00:00
},
theme: {
2022-04-10 23:15:46 +00:00
customCss: require.resolve("./src/css/custom.css"),
2022-02-06 18:40:28 +00:00
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
navbar: {
2022-04-10 23:15:46 +00:00
title: "Squiggle",
2022-02-06 18:40:28 +00:00
logo: {
2022-04-10 23:15:46 +00:00
alt: "Squiggle Logo",
src: "img/quri-logo.png",
2022-02-06 18:40:28 +00:00
},
items: [
{
2022-04-10 23:15:46 +00:00
type: "doc",
docId: "Introduction",
position: "left",
label: "Documentation",
2022-02-06 18:40:28 +00:00
},
2022-04-10 23:15:46 +00:00
{ to: "/blog", label: "Blog", position: "left" },
2022-04-11 01:48:17 +00:00
{ to: "/playground", label: "Playground", position: "left" },
2022-02-06 18:40:28 +00:00
{
href: "https://github.com/quantified-uncertainty/squiggle",
2022-04-10 23:15:46 +00:00
label: "GitHub",
position: "right",
2022-02-06 18:40:28 +00:00
},
],
},
footer: {
2022-04-10 23:15:46 +00:00
style: "dark",
2022-02-06 18:40:28 +00:00
links: [
{
2022-04-10 23:15:46 +00:00
title: "More",
2022-02-06 18:40:28 +00:00
items: [
{
2022-04-10 23:15:46 +00:00
label: "Blog",
to: "/blog",
2022-02-06 18:40:28 +00:00
},
{
2022-04-10 23:15:46 +00:00
label: "GitHub",
href: "https://github.com/quantified-uncertainty/squiggle",
2022-02-06 18:40:28 +00:00
},
],
},
],
copyright: `CC0. Built with Docusaurus.`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
}),
stylesheets: [
{
href: "https://cdn.jsdelivr.net/npm/katex@0.13.24/dist/katex.min.css",
type: "text/css",
integrity:
"sha384-odtC+0UGzzFL/6PNoE8rX/SPcQDXBJ+uRepguP4QkPCm2LBxH3FA3y+fKSiJ+AmM",
crossorigin: "anonymous",
},
],
2022-02-06 18:40:28 +00:00
};
module.exports = config;