squiggle/packages/website/docusaurus.config.js

124 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",
2022-07-23 18:41:12 +00:00
tagline:
"A simple programming language for intuitive probabilistic estimation",
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-06-06 04:24:38 +00:00
plugins: [],
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-06-06 04:24:38 +00:00
customCss: [
require.resolve("./src/css/custom.css"),
require.resolve("@quri/squiggle-components/dist/main.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-06-06 03:02:17 +00:00
{
type: "doc",
2022-06-13 04:19:28 +00:00
docId: "Api/DistGeneric",
2022-06-06 03:02:17 +00:00
position: "left",
label: "API",
},
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" },
{
href: "https://github.com/quantified-uncertainty/squiggle/discussions",
label: "Issues & Discussion",
position: "right",
},
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;