squiggle/packages/website/docusaurus.config.js

131 lines
3.3 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
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 = {
2022-04-10 23:15:46 +00:00
title: "Squiggle (alpha)",
2022-03-25 02:08:46 +00:00
tagline: "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: "QURIResearch", // Usually your GitHub org/user name.
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/foretold-app/squiggle/tree/main/packages/website/",
2022-02-06 18:40:28 +00:00
},
blog: {
showReadingTime: true,
// Please change this to your repo.
editUrl:
2022-04-10 23:15:46 +00:00
"https://github.com/foretold-app/squiggle/tree/main/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/logo.svg",
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-02-18 22:14:45 +00:00
{
2022-04-10 23:15:46 +00:00
type: "doc",
docId: "Playground",
label: "Playground",
position: "left",
2022-02-18 22:14:45 +00:00
},
2022-02-06 18:40:28 +00:00
{
2022-04-10 23:15:46 +00:00
href: "https://github.com/QURIresearch/squiggle",
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: "Blog",
2022-02-06 18:40:28 +00:00
items: [
{
2022-04-10 23:15:46 +00:00
label: "Overview",
to: "/docs/Language",
2022-02-06 18:40:28 +00:00
},
],
},
{
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/QURIresearch/squiggle",
2022-02-06 18:40:28 +00:00
},
],
},
],
copyright: `CC0. Built with Docusaurus.`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
}),
};
module.exports = config;