wasp/web/docusaurus.config.js

184 lines
5.3 KiB
JavaScript
Raw Normal View History

2023-04-12 13:18:12 +03:00
const lightCodeTheme = require("prism-react-renderer/themes/github");
const darkCodeTheme = require("prism-react-renderer/themes/dracula");
/** @type {import('@docusaurus/types').DocusaurusConfig} */
module.exports = {
2023-04-12 13:18:12 +03:00
title: "Wasp",
tagline:
"A simple language for developing full-stack web apps with less code.",
// url, baseUrl, organizationName, projectName and trailingSlash are set according to the
// instructions in https://docusaurus.io/docs/deployment#deploying-to-github-pages .
2023-04-12 13:18:12 +03:00
url: "https://wasp-lang.dev",
baseUrl: "/", // Should be name of repo if hosted on Github Pages, but can be just '/' if custom domain is used.
organizationName: "wasp-lang", // Should be GitHub org/user name if hosted on Github Pages.
projectName: "wasp", // Should be repo name if hosted on Github Pages.
trailingSlash: false,
2023-04-12 13:18:12 +03:00
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
favicon: "img/favicon.ico",
2022-10-24 11:43:21 +03:00
stylesheets: [
2023-04-12 13:18:12 +03:00
"https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap",
2022-10-24 11:43:21 +03:00
],
themeConfig: {
2022-12-20 18:03:25 +03:00
/*
announcementBar: {
2022-11-27 15:59:40 +03:00
id: 'Beta_is_here',
2022-12-08 20:43:25 +03:00
content: 'Wasp Hackathon #1 is underway! 🚀 <a href="https://betathon.wasp-lang.dev/">Join now</a>',
2022-11-29 18:32:08 +03:00
backgroundColor: '#eab307',
2022-11-27 15:59:40 +03:00
textColor: '#fff',
isCloseable: false,
},
2022-12-20 18:03:25 +03:00
*/
2023-01-31 14:09:08 +03:00
imageZoom: {
// CSS selector to apply the plugin to, defaults to '.markdown img'
//selector: '.markdown img',
// Optional medium-zoom options
// see: https://www.npmjs.com/package/medium-zoom#options
options: {
/*
margin: 24,
background: '#BADA55',
scrollOffset: 0,
container: '#zoom-container',
template: '#zoom-template',
*/
2023-04-12 13:18:12 +03:00
},
2023-01-31 14:09:08 +03:00
},
navbar: {
2023-04-12 13:18:12 +03:00
title: ".wasp (beta)",
logo: {
2023-04-12 13:18:12 +03:00
alt: "Wasp logo",
src: "img/wasp-logo-eqpar-circle.png",
},
items: [
{
2023-04-12 13:18:12 +03:00
to: "docs/",
activeBasePath: "docs",
label: "Docs",
position: "left",
className: "navbar-item-docs navbar-item-outside",
},
{
2023-04-12 13:18:12 +03:00
to: "blog",
label: "Blog",
position: "left",
},
{
2023-04-12 13:18:12 +03:00
href: "https://github.com/wasp-lang/wasp",
className: "navbar-item-github",
position: "right",
},
{
2023-04-12 13:18:12 +03:00
href: "https://twitter.com/WaspLang",
className: "navbar-item-twitter",
position: "right",
},
{
2023-04-12 13:18:12 +03:00
href: "https://discord.gg/rzdnErX",
className: "navbar-item-discord",
position: "right",
},
],
},
prism: {
2023-04-12 13:18:12 +03:00
additionalLanguages: ["shell-session", "haskell"],
},
footer: {
2023-04-12 13:18:12 +03:00
style: "dark",
links: [
{
2023-04-12 13:18:12 +03:00
title: "Docs",
items: [
{
2023-04-12 13:18:12 +03:00
label: "Getting started",
to: "docs",
},
{
2023-04-12 13:18:12 +03:00
label: "Todo app tutorial",
to: "docs/tutorials/todo-app",
},
{
2023-04-12 13:18:12 +03:00
label: "Reference",
to: "docs/language/features",
},
],
},
{
2023-04-12 13:18:12 +03:00
title: "Community",
items: [
{
2023-04-12 13:18:12 +03:00
label: "Discord",
href: "https://discord.gg/rzdnErX",
},
],
},
{
2023-04-12 13:18:12 +03:00
title: "More",
items: [
{
2023-04-12 13:18:12 +03:00
label: "GitHub",
href: "https://github.com/wasp-lang/wasp",
},
{
2023-04-12 13:18:12 +03:00
label: "Contact",
to: "docs/contact",
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Wasp.`,
},
algolia: {
2023-04-12 13:18:12 +03:00
appId: "RG0JSZOWH4",
apiKey: "feaa2a25dc596d40418c82cd040e2cbe",
indexName: "wasp-lang",
// TODO: contextualSearch is useful when you are doing versioning,
// it searches only in v1 docs if you are searching from v1 docs.
// We should enable it if we start doing versioning.
// contextualSearch: true
2023-04-12 13:18:12 +03:00
},
},
presets: [
[
2023-04-12 13:18:12 +03:00
"@docusaurus/preset-classic",
{
2022-06-29 17:31:28 +03:00
gtag: {
2023-04-12 13:18:12 +03:00
trackingID: "GTM-PQ4JFCK",
2022-06-29 17:31:28 +03:00
anonymizeIP: true,
},
docs: {
2023-04-12 13:18:12 +03:00
sidebarPath: require.resolve("./sidebars.js"),
2021-10-04 12:43:23 +03:00
sidebarCollapsible: true,
// Please change this to your repo.
2023-04-12 13:18:12 +03:00
editUrl: "https://github.com/wasp-lang/wasp/edit/main/web",
},
blog: {
showReadingTime: true,
// Please change this to your repo.
2023-04-12 13:18:12 +03:00
blogSidebarCount: "ALL",
blogSidebarTitle: "All our posts",
editUrl: "https://github.com/wasp-lang/wasp/edit/main/web/blog",
},
theme: {
2023-04-12 13:18:12 +03:00
customCss: [require.resolve("./src/css/custom.css")],
},
},
],
],
2023-04-12 13:18:12 +03:00
scripts: ["/scripts/posthog.js", "/js/fix-multiple-trailing-slashes.js"],
2022-10-24 11:43:21 +03:00
plugins: [
2023-04-12 13:18:12 +03:00
"plugin-image-zoom",
2022-10-24 11:43:21 +03:00
async function myPlugin(context, options) {
return {
name: "docusaurus-tailwindcss",
configurePostCss(postcssOptions) {
// Appends TailwindCSS and AutoPrefixer.
postcssOptions.plugins.push(require("tailwindcss"));
postcssOptions.plugins.push(require("autoprefixer"));
return postcssOptions;
},
};
},
],
};