squiggle/packages/website/docusaurus.config.js

124 lines
3.2 KiB
JavaScript
Raw Permalink Normal View History

2022-02-06 18:40:28 +00:00
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
2022-03-25 02:08:46 +00:00
const path = require('path');
2022-02-06 18:40:28 +00:00
/** @type {import('@docusaurus/types').Config} */
const config = {
2022-02-09 15:22:51 +00:00
title: 'Squiggle (alpha)',
2022-03-25 02:08:46 +00:00
tagline: "Estimation language for forecasters",
url: 'https://squiggle-language.com',
2022-02-06 18:40:28 +00:00
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.ico',
2022-03-25 02:08:46 +00:00
organizationName: 'QURIResearch', // Usually your GitHub org/user name.
projectName: 'squiggle', // Usually your repo name.
plugins: [
() => ({
configureWebpack(config, isServer, utils, content) {
return {
resolve: {
alias : {
"@quri/squiggle-components": path.resolve(__dirname, "../components/src"),
"@quri/squiggle-lang": path.resolve(__dirname, "../squiggle-lang/src/js")
}
}
};
}
})
],
2022-02-06 18:40:28 +00:00
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve('./sidebars.js'),
// Please change this to your repo.
2022-02-09 15:03:07 +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-02-09 15:03:07 +00:00
'https://github.com/foretold-app/squiggle/tree/main/packages/website/',
2022-02-06 18:40:28 +00:00
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
navbar: {
title: 'Squiggle',
logo: {
alt: 'Squiggle Logo',
src: 'img/logo.svg',
},
items: [
{
type: 'doc',
2022-03-25 02:08:46 +00:00
docId: 'Introduction',
2022-02-06 18:40:28 +00:00
position: 'left',
2022-02-18 22:14:45 +00:00
label: 'Documentation',
2022-02-06 18:40:28 +00:00
},
{to: '/blog', label: 'Blog', position: 'left'},
2022-02-18 22:14:45 +00:00
{
href: 'https://playground.squiggle-language.com/dist-builder',
label: 'Playground',
position: 'left',
},
2022-02-06 18:40:28 +00:00
{
2022-02-09 15:03:07 +00:00
href: 'https://github.com/QURIresearch/squiggle',
2022-02-06 18:40:28 +00:00
label: 'GitHub',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
2022-02-09 15:03:07 +00:00
title: 'Blog',
2022-02-06 18:40:28 +00:00
items: [
{
2022-02-09 15:03:07 +00:00
label: 'Overview',
to: '/docs/Language',
2022-02-06 18:40:28 +00:00
},
],
},
{
title: 'More',
items: [
{
label: 'Blog',
to: '/blog',
},
{
label: 'GitHub',
2022-02-09 15:03:07 +00:00
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;