wasp/web/docusaurus.config.js

246 lines
7.0 KiB
JavaScript
Raw Normal View History

2023-04-12 13:18:12 +03:00
const lightCodeTheme = require("prism-react-renderer/themes/github");
const autoImportTabs = require("./src/remark/auto-import-tabs");
const fileExtSwitcher = require("./src/remark/file-ext-switcher");
/** @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"],
theme: lightCodeTheme,
},
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/tutorial/create",
},
{
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
},
2023-09-04 14:43:19 +03:00
image: "img/wasp_twitter_cover.png",
metadata: [{ name: "twitter:card", content: "summary_large_image" }],
},
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.
editUrl: "https://github.com/wasp-lang/wasp/edit/release/web",
remarkPlugins: [autoImportTabs, fileExtSwitcher],
},
blog: {
showReadingTime: true,
// Please change this to your repo.
2023-04-12 13:18:12 +03:00
blogSidebarCount: "ALL",
blogSidebarTitle: "All our posts",
postsPerPage: "ALL",
editUrl: "https://github.com/wasp-lang/wasp/edit/release/web",
},
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;
},
};
},
[
'@docusaurus/plugin-client-redirects',
{
redirects: [
{
from: '/docs/guides/auth-ui',
to: '/docs/auth/ui',
},
{
from: '/docs/deploying',
to: '/docs/advanced/deployment/overview',
},
{
from: '/docs/guides/username-password',
to: '/docs/auth/username-and-pass',
},
{
from: '/docs/guides/websockets',
to: '/docs/advanced/web-sockets',
},
{
from: '/docs/guides/testing',
to: '/docs/project/testing',
},
{
from: '/docs/guides/middleware-customization',
to: '/docs/advanced/middleware-config',
},
{
from: '/docs/guides/email-auth',
to: '/docs/auth/email'
},
{
from: '/docs/guides/crud',
to: '/docs/data-model/crud',
},
{
from: '/docs/integrations/google',
to: '/docs/auth/social-auth/google',
},
{
from: '/docs/integrations/github',
to: '/docs/auth/social-auth/github',
},
{
from: '/docs/integrations/css-frameworks',
to: '/docs/project/css-frameworks',
2023-08-31 10:32:20 +03:00
},
{
from: '/docs/tutorials/todo-app',
to: '/docs/tutorial/create',
2023-08-31 10:32:20 +03:00
},
],
},
],
2022-10-24 11:43:21 +03:00
],
};