diff --git a/web/babel.config.js b/web/babel.config.js index e00595dae..675264818 100644 --- a/web/babel.config.js +++ b/web/babel.config.js @@ -1,3 +1,3 @@ module.exports = { presets: [require.resolve('@docusaurus/core/lib/babel/preset')], -}; +} diff --git a/web/blog/components/DiscordLink.js b/web/blog/components/DiscordLink.js index 0e4061276..fde8a633e 100644 --- a/web/blog/components/DiscordLink.js +++ b/web/blog/components/DiscordLink.js @@ -1,11 +1,11 @@ -import React from "react"; +import React from 'react' const DiscordLink = (props) => { return ( - Discord + Discord - ); -}; + ) +} -export default DiscordLink; \ No newline at end of file +export default DiscordLink diff --git a/web/blog/components/ImgWithCaption.js b/web/blog/components/ImgWithCaption.js index 5e9472b58..7cbf553f8 100644 --- a/web/blog/components/ImgWithCaption.js +++ b/web/blog/components/ImgWithCaption.js @@ -1,19 +1,26 @@ -import React from "react"; -import useBaseUrl from "@docusaurus/useBaseUrl"; +import React from 'react' +import useBaseUrl from '@docusaurus/useBaseUrl' const ImgWithCaption = (props) => { return (
+
-
- We are in Beta (try it out)!
-
-
+
+ We are in Beta (try it out)!
+
+
{description}
- ); -} \ No newline at end of file + ) +} diff --git a/web/docs/auth/Pills.css b/web/docs/auth/Pills.css index 6568744fb..f165d6f98 100644 --- a/web/docs/auth/Pills.css +++ b/web/docs/auth/Pills.css @@ -6,10 +6,10 @@ --auth-pills-username-and-pass: #fce7f3; } -:root[data-theme="dark"] { +:root[data-theme='dark'] { --auth-pills-color: #fff; --auth-pills-email: #0c4a6e; --auth-pills-github: #334155; --auth-pills-google: #365314; --auth-pills-username-and-pass: #831843; -} \ No newline at end of file +} diff --git a/web/docs/auth/Pills.jsx b/web/docs/auth/Pills.jsx index ef148337a..3d93c5f19 100644 --- a/web/docs/auth/Pills.jsx +++ b/web/docs/auth/Pills.jsx @@ -1,18 +1,23 @@ -import React from "react"; -import './Pills.css'; -import Link from '@docusaurus/Link'; +import React from 'react' +import './Pills.css' +import Link from '@docusaurus/Link' export function Pill({ children, linkToPage, style = {} }) { - return {children}; + return ( + + {children} + + ) } /* @@ -24,25 +29,53 @@ export function Pill({ children, linkToPage, style = {} }) { } */ export function EmailPill() { - return{description}
- ); + ) } diff --git a/web/docusaurus.config.js b/web/docusaurus.config.js index f61c38759..17a447925 100644 --- a/web/docusaurus.config.js +++ b/web/docusaurus.config.js @@ -1,25 +1,25 @@ -const lightCodeTheme = require("prism-react-renderer/themes/github"); +const lightCodeTheme = require('prism-react-renderer/themes/github') -const autoImportTabs = require("./src/remark/auto-import-tabs"); -const fileExtSwitcher = require("./src/remark/file-ext-switcher"); +const autoImportTabs = require('./src/remark/auto-import-tabs') +const fileExtSwitcher = require('./src/remark/file-ext-switcher') /** @type {import('@docusaurus/types').DocusaurusConfig} */ module.exports = { - title: "Wasp", + title: 'Wasp', tagline: - "A simple language for developing full-stack web apps with less code.", + '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 . - 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. + 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, - onBrokenLinks: "throw", - onBrokenMarkdownLinks: "warn", - favicon: "img/favicon.ico", + onBrokenLinks: 'throw', + onBrokenMarkdownLinks: 'warn', + favicon: 'img/favicon.ico', stylesheets: [ - "https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap", + 'https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap', ], themeConfig: { /* @@ -47,86 +47,86 @@ module.exports = { }, }, navbar: { - title: ".wasp (beta)", + title: '.wasp (beta)', logo: { - alt: "Wasp logo", - src: "img/wasp-logo-eqpar-circle.png", - href: "https://wasp-lang.dev/", - target: "_self" + alt: 'Wasp logo', + src: 'img/wasp-logo-eqpar-circle.png', + href: 'https://wasp-lang.dev/', + target: '_self' }, items: [ { - to: "docs/", - activeBasePath: "docs", - label: "Docs", - position: "left", - className: "navbar-item-docs navbar-item-outside", + to: 'docs/', + activeBasePath: 'docs', + label: 'Docs', + position: 'left', + className: 'navbar-item-docs navbar-item-outside', }, { - to: "blog", - label: "Blog", - position: "left", + to: 'blog', + label: 'Blog', + position: 'left', }, { - href: "https://github.com/wasp-lang/wasp", - className: "navbar-item-github", - position: "right", + href: 'https://github.com/wasp-lang/wasp', + className: 'navbar-item-github', + position: 'right', }, { - href: "https://twitter.com/WaspLang", - className: "navbar-item-twitter", - position: "right", + href: 'https://twitter.com/WaspLang', + className: 'navbar-item-twitter', + position: 'right', }, { - href: "https://discord.gg/rzdnErX", - className: "navbar-item-discord", - position: "right", + href: 'https://discord.gg/rzdnErX', + className: 'navbar-item-discord', + position: 'right', }, ], }, prism: { - additionalLanguages: ["shell-session", "haskell"], + additionalLanguages: ['shell-session', 'haskell'], theme: lightCodeTheme, }, footer: { - style: "dark", + style: 'dark', links: [ { - title: "Docs", + title: 'Docs', items: [ { - label: "Getting started", - to: "docs", + label: 'Getting started', + to: 'docs', }, { - label: "Todo app tutorial", - to: "docs/tutorial/create", + label: 'Todo app tutorial', + to: 'docs/tutorial/create', }, { - label: "Reference", - to: "docs/language/features", + label: 'Reference', + to: 'docs/language/features', }, ], }, { - title: "Community", + title: 'Community', items: [ { - label: "Discord", - href: "https://discord.gg/rzdnErX", + label: 'Discord', + href: 'https://discord.gg/rzdnErX', }, ], }, { - title: "More", + title: 'More', items: [ { - label: "GitHub", - href: "https://github.com/wasp-lang/wasp", + label: 'GitHub', + href: 'https://github.com/wasp-lang/wasp', }, { - label: "Contact", - to: "docs/contact", + label: 'Contact', + to: 'docs/contact', }, ], }, @@ -134,59 +134,59 @@ module.exports = { copyright: `Copyright © ${new Date().getFullYear()} Wasp.`, }, algolia: { - appId: "RG0JSZOWH4", - apiKey: "feaa2a25dc596d40418c82cd040e2cbe", - indexName: "wasp-lang", + 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 }, - image: "img/wasp_twitter_cover.png", - metadata: [{ name: "twitter:card", content: "summary_large_image" }], + image: 'img/wasp_twitter_cover.png', + metadata: [{ name: 'twitter:card', content: 'summary_large_image' }], }, presets: [ [ - "@docusaurus/preset-classic", + '@docusaurus/preset-classic', { gtag: { - trackingID: "GTM-PQ4JFCK", + trackingID: 'GTM-PQ4JFCK', anonymizeIP: true, }, docs: { - sidebarPath: require.resolve("./sidebars.js"), + sidebarPath: require.resolve('./sidebars.js'), sidebarCollapsible: true, // Please change this to your repo. - editUrl: "https://github.com/wasp-lang/wasp/edit/release/web", + editUrl: 'https://github.com/wasp-lang/wasp/edit/release/web', remarkPlugins: [autoImportTabs, fileExtSwitcher], }, blog: { showReadingTime: true, // Please change this to your repo. - blogSidebarCount: "ALL", - blogSidebarTitle: "All our posts", - postsPerPage: "ALL", - editUrl: "https://github.com/wasp-lang/wasp/edit/release/web", + blogSidebarCount: 'ALL', + blogSidebarTitle: 'All our posts', + postsPerPage: 'ALL', + editUrl: 'https://github.com/wasp-lang/wasp/edit/release/web', }, theme: { - customCss: [require.resolve("./src/css/custom.css")], + customCss: [require.resolve('./src/css/custom.css')], }, }, ], ], - scripts: ["/scripts/posthog.js", "/js/fix-multiple-trailing-slashes.js"], + scripts: ['/scripts/posthog.js', '/js/fix-multiple-trailing-slashes.js'], plugins: [ - "plugin-image-zoom", + 'plugin-image-zoom', async function myPlugin(context, options) { return { - name: "docusaurus-tailwindcss", + name: 'docusaurus-tailwindcss', configurePostCss(postcssOptions) { // Appends TailwindCSS and AutoPrefixer. - postcssOptions.plugins.push(require("tailwindcss")); - postcssOptions.plugins.push(require("autoprefixer")); - return postcssOptions; + postcssOptions.plugins.push(require('tailwindcss')) + postcssOptions.plugins.push(require('autoprefixer')) + return postcssOptions }, - }; + } }, [ '@docusaurus/plugin-client-redirects', @@ -218,7 +218,7 @@ module.exports = { }, { from: '/docs/guides/email-auth', - to: '/docs/auth/email' + to: '/docs/auth/email', }, { from: '/docs/guides/crud', @@ -244,4 +244,4 @@ module.exports = { }, ], ], -}; +} diff --git a/web/src/components/AuthMethodsGrid.css b/web/src/components/AuthMethodsGrid.css index 6dc179a0c..d06a3034e 100644 --- a/web/src/components/AuthMethodsGrid.css +++ b/web/src/components/AuthMethodsGrid.css @@ -26,4 +26,4 @@ } .auth-methods-info { color: var(--ifm-color-secondary-contrast-foreground); -} \ No newline at end of file +} diff --git a/web/src/components/AuthMethodsGrid.tsx b/web/src/components/AuthMethodsGrid.tsx index c85c91e6b..8cfad14ee 100644 --- a/web/src/components/AuthMethodsGrid.tsx +++ b/web/src/components/AuthMethodsGrid.tsx @@ -1,29 +1,29 @@ -import React from "react"; -import "./AuthMethodsGrid.css"; +import React from 'react' +import './AuthMethodsGrid.css' export function AuthMethodsGrid() { const authMethods = [ { - title: "Email", - description: "Email verification, password reset, etc.", - linkToDocs: "/docs/auth/email", + title: 'Email', + description: 'Email verification, password reset, etc.', + linkToDocs: '/docs/auth/email', }, { - title: "Username & Password", - description: "The simplest way to get started", - linkToDocs: "/docs/auth/username-and-pass", + title: 'Username & Password', + description: 'The simplest way to get started', + linkToDocs: '/docs/auth/username-and-pass', }, { - title: "Google", - description: "Users sign in with their Google account", - linkToDocs: "/docs/auth/social-auth/google", + title: 'Google', + description: 'Users sign in with their Google account', + linkToDocs: '/docs/auth/social-auth/google', }, { - title: "Github", - description: "Users sign in with their Github account", - linkToDocs: "/docs/auth/social-auth/github", + title: 'Github', + description: 'Users sign in with their Github account', + linkToDocs: '/docs/auth/social-auth/github', }, - ]; + ] return ( <>{description}
- ); + ) } diff --git a/web/src/components/Benefits.js b/web/src/components/Benefits.js index 3a24dc6df..e0e2d2ea3 100644 --- a/web/src/components/Benefits.js +++ b/web/src/components/Benefits.js @@ -8,52 +8,47 @@ import styles from '../pages/styles.module.css' const Lang = () => ( <> - - language - + language > ) const Benefit = ({ Icon, title, description }) => ( -- { description } -
+{description}
- Wasp provides all the best practices out-of-the-box and lets you focus on your code. +
+ Wasp provides all the best practices out-of-the-box and lets you + focus on your code.
{source || children}
- );
+ )
}
diff --git a/web/src/components/Collapse.tsx b/web/src/components/Collapse.tsx
index 857330d73..2ab5d213d 100644
--- a/web/src/components/Collapse.tsx
+++ b/web/src/components/Collapse.tsx
@@ -1,12 +1,15 @@
import React from 'react'
import Details from '@theme/MDXComponents/Details'
-export default function Collapse(props: { children: React.ReactNode; title: string }) {
- const { children, title } = props;
- return (
-