2023-04-12 13:18:12 +03:00
|
|
|
const lightCodeTheme = require("prism-react-renderer/themes/github");
|
2021-07-23 15:45:27 +03:00
|
|
|
|
2023-06-26 15:11:05 +03:00
|
|
|
const autoImportTabs = require("./src/remark/auto-import-tabs");
|
|
|
|
const fileExtSwitcher = require("./src/remark/file-ext-switcher");
|
|
|
|
|
2021-07-23 15:45:27 +03:00
|
|
|
/** @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.",
|
2021-10-04 15:45:15 +03:00
|
|
|
// 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.
|
2021-10-04 15:45:15 +03:00
|
|
|
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
|
|
|
],
|
2021-07-23 15:45:27 +03:00
|
|
|
themeConfig: {
|
2022-12-20 18:03:25 +03:00
|
|
|
/*
|
2022-11-06 19:49:06 +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',
|
2022-11-06 19:49:06 +03:00
|
|
|
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
|
|
|
},
|
2021-07-23 15:45:27 +03:00
|
|
|
navbar: {
|
2023-04-12 13:18:12 +03:00
|
|
|
title: ".wasp (beta)",
|
2021-07-23 15:45:27 +03:00
|
|
|
logo: {
|
2023-04-12 13:18:12 +03:00
|
|
|
alt: "Wasp logo",
|
|
|
|
src: "img/wasp-logo-eqpar-circle.png",
|
2021-07-23 15:45:27 +03:00
|
|
|
},
|
|
|
|
items: [
|
|
|
|
{
|
2023-04-12 13:18:12 +03:00
|
|
|
to: "docs/",
|
|
|
|
activeBasePath: "docs",
|
|
|
|
label: "Docs",
|
|
|
|
position: "left",
|
|
|
|
className: "navbar-item-docs navbar-item-outside",
|
2021-07-23 15:45:27 +03:00
|
|
|
},
|
|
|
|
{
|
2023-04-12 13:18:12 +03:00
|
|
|
to: "blog",
|
|
|
|
label: "Blog",
|
|
|
|
position: "left",
|
2021-07-23 15:45:27 +03:00
|
|
|
},
|
|
|
|
{
|
2023-04-12 13:18:12 +03:00
|
|
|
href: "https://github.com/wasp-lang/wasp",
|
|
|
|
className: "navbar-item-github",
|
|
|
|
position: "right",
|
2021-07-23 15:45:27 +03:00
|
|
|
},
|
|
|
|
{
|
2023-04-12 13:18:12 +03:00
|
|
|
href: "https://twitter.com/WaspLang",
|
|
|
|
className: "navbar-item-twitter",
|
|
|
|
position: "right",
|
2021-07-23 15:45:27 +03:00
|
|
|
},
|
|
|
|
{
|
2023-04-12 13:18:12 +03:00
|
|
|
href: "https://discord.gg/rzdnErX",
|
|
|
|
className: "navbar-item-discord",
|
|
|
|
position: "right",
|
2021-07-23 15:45:27 +03:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
prism: {
|
2023-04-12 13:18:12 +03:00
|
|
|
additionalLanguages: ["shell-session", "haskell"],
|
2023-05-23 15:29:54 +03:00
|
|
|
theme: lightCodeTheme,
|
2021-07-23 15:45:27 +03:00
|
|
|
},
|
|
|
|
footer: {
|
2023-04-12 13:18:12 +03:00
|
|
|
style: "dark",
|
2021-07-23 15:45:27 +03:00
|
|
|
links: [
|
|
|
|
{
|
2023-04-12 13:18:12 +03:00
|
|
|
title: "Docs",
|
2021-07-23 15:45:27 +03:00
|
|
|
items: [
|
|
|
|
{
|
2023-04-12 13:18:12 +03:00
|
|
|
label: "Getting started",
|
|
|
|
to: "docs",
|
2021-07-23 15:45:27 +03:00
|
|
|
},
|
|
|
|
{
|
2023-04-12 13:18:12 +03:00
|
|
|
label: "Todo app tutorial",
|
2023-08-11 17:47:49 +03:00
|
|
|
to: "docs/tutorial/create",
|
2021-07-23 15:45:27 +03:00
|
|
|
},
|
|
|
|
{
|
2023-04-12 13:18:12 +03:00
|
|
|
label: "Reference",
|
|
|
|
to: "docs/language/features",
|
|
|
|
},
|
|
|
|
],
|
2021-07-23 15:45:27 +03:00
|
|
|
},
|
|
|
|
{
|
2023-04-12 13:18:12 +03:00
|
|
|
title: "Community",
|
2021-07-23 15:45:27 +03:00
|
|
|
items: [
|
|
|
|
{
|
2023-04-12 13:18:12 +03:00
|
|
|
label: "Discord",
|
|
|
|
href: "https://discord.gg/rzdnErX",
|
|
|
|
},
|
|
|
|
],
|
2021-07-23 15:45:27 +03:00
|
|
|
},
|
|
|
|
{
|
2023-04-12 13:18:12 +03:00
|
|
|
title: "More",
|
2021-07-23 15:45:27 +03:00
|
|
|
items: [
|
|
|
|
{
|
2023-04-12 13:18:12 +03:00
|
|
|
label: "GitHub",
|
|
|
|
href: "https://github.com/wasp-lang/wasp",
|
2021-07-23 15:45:27 +03:00
|
|
|
},
|
|
|
|
{
|
2023-04-12 13:18:12 +03:00
|
|
|
label: "Contact",
|
|
|
|
to: "docs/contact",
|
|
|
|
},
|
2021-07-23 15:45:27 +03:00
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
copyright: `Copyright © ${new Date().getFullYear()} Wasp.`,
|
|
|
|
},
|
|
|
|
algolia: {
|
2023-04-12 13:18:12 +03:00
|
|
|
appId: "RG0JSZOWH4",
|
|
|
|
apiKey: "feaa2a25dc596d40418c82cd040e2cbe",
|
|
|
|
indexName: "wasp-lang",
|
2021-07-23 15:45:27 +03:00
|
|
|
// 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" }],
|
2021-07-23 15:45:27 +03:00
|
|
|
},
|
|
|
|
presets: [
|
|
|
|
[
|
2023-04-12 13:18:12 +03:00
|
|
|
"@docusaurus/preset-classic",
|
2021-07-23 15:45:27 +03:00
|
|
|
{
|
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,
|
|
|
|
},
|
2021-07-23 15:45:27 +03:00
|
|
|
docs: {
|
2023-04-12 13:18:12 +03:00
|
|
|
sidebarPath: require.resolve("./sidebars.js"),
|
2021-10-04 12:43:23 +03:00
|
|
|
sidebarCollapsible: true,
|
2021-07-23 15:45:27 +03:00
|
|
|
// Please change this to your repo.
|
2023-07-21 14:50:26 +03:00
|
|
|
editUrl: "https://github.com/wasp-lang/wasp/edit/release/web",
|
2023-06-26 15:11:05 +03:00
|
|
|
remarkPlugins: [autoImportTabs, fileExtSwitcher],
|
2021-07-23 15:45:27 +03:00
|
|
|
},
|
|
|
|
blog: {
|
|
|
|
showReadingTime: true,
|
|
|
|
// Please change this to your repo.
|
2023-04-12 13:18:12 +03:00
|
|
|
blogSidebarCount: "ALL",
|
|
|
|
blogSidebarTitle: "All our posts",
|
2023-05-23 15:29:54 +03:00
|
|
|
postsPerPage: "ALL",
|
2023-07-21 14:50:26 +03:00
|
|
|
editUrl: "https://github.com/wasp-lang/wasp/edit/release/web",
|
2021-07-23 15:45:27 +03:00
|
|
|
},
|
|
|
|
theme: {
|
2023-04-12 13:18:12 +03:00
|
|
|
customCss: [require.resolve("./src/css/custom.css")],
|
2021-07-23 15:45:27 +03:00
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
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;
|
|
|
|
},
|
|
|
|
};
|
|
|
|
},
|
2023-08-11 17:47:49 +03:00
|
|
|
[
|
|
|
|
'@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',
|
2023-08-31 11:26:41 +03:00
|
|
|
to: '/docs/tutorial/create',
|
2023-08-31 10:32:20 +03:00
|
|
|
},
|
2023-08-11 17:47:49 +03:00
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
2022-10-24 11:43:21 +03:00
|
|
|
],
|
2021-07-23 15:45:27 +03:00
|
|
|
};
|