squiggle/packages/website/docusaurus.config.js

158 lines
4.7 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} */
({
2022-10-02 13:47:49 +00:00
// TODO - disabled until we fix algolia search
// algolia: {
// // The application ID provided by Algolia
// appId: "KBED3M1CMD",
2022-08-18 22:13:23 +00:00
2022-10-02 13:47:49 +00:00
// // Public API key: it is safe to commit it
// apiKey: "c61bc7603893cf287ed6971983af8bad",
2022-08-18 22:13:23 +00:00
2022-10-02 13:47:49 +00:00
// indexName: "squiggle_docs",
2022-08-18 22:13:23 +00:00
2022-10-02 13:47:49 +00:00
// // Optional: see doc section below
// contextualSearch: true,
2022-08-18 22:13:23 +00:00
2022-10-02 13:47:49 +00:00
// // Optional: Specify domains where the navigation should occur through window.location instead on history.push. Useful when our Algolia config crawls multiple documentation sites and we want to navigate with window.location.href to them.
// // externalUrlRegex: 'external\\.com|domain\\.com',
2022-08-18 22:13:23 +00:00
2022-10-02 13:47:49 +00:00
// // Optional: Algolia search parameters
// searchParameters: {},
2022-08-18 22:13:23 +00:00
2022-10-02 13:47:49 +00:00
// // Optional: path for search page that enabled by default (`false` to disable it)
// searchPagePath: "search",
2022-08-18 22:13:23 +00:00
2022-10-02 13:47:49 +00:00
// //... other Algolia params
// },
2022-10-05 15:36:48 +00:00
colorMode: {
// squiggle playground is not compatible with dark mode yet, see https://github.com/quantified-uncertainty/squiggle/issues/1192
disableSwitch: true,
},
2022-02-06 18:40:28 +00:00
navbar: {
2022-04-10 23:15:46 +00:00
title: "Squiggle",
2022-07-26 17:58:03 +00:00
hideOnScroll: true,
2022-02-06 18:40:28 +00:00
logo: {
2022-04-10 23:15:46 +00:00
alt: "Squiggle Logo",
2022-07-24 23:37:24 +00:00
src: "img/squiggle-logo.png",
2022-02-06 18:40:28 +00:00
},
items: [
{
2022-04-10 23:15:46 +00:00
type: "doc",
2022-07-27 23:54:25 +00:00
docId: "Overview",
2022-04-10 23:15:46 +00:00
position: "left",
label: "Documentation",
2022-02-06 18:40:28 +00:00
},
2022-06-06 03:02:17 +00:00
{
type: "doc",
2022-07-28 04:08:10 +00:00
docId: "Api/Dist",
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
},
2022-07-27 23:54:25 +00:00
{
href: "https://quantifieduncertainty.org/",
label: "QURI",
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;