The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
testing loading new site in separate path
Inian Parameshwaran7556ed1d7128
diff --git a/web/vercel.json b/web/vercel.jsonnew file mode 100644index 00000000000..64ffb92cf13--- /dev/null+++ b/web/vercel.json@@ -0,0 +1,7 @@+{+ "rewrites": [+ { "source": "/new/:match*", "destination": "https://www-alpha.vercel.app/new/:match*" },+ { "source": "/", "destination": "https://www-alpha.vercel.app/new" },+ { "source": "/beta", "destination": "https://www-alpha.vercel.app/new/beta" }+ ]+}diff --git a/www/components/AdminAccess/index.tsx b/www/components/AdminAccess/index.tsxindex f7523e8f7bb..3afc1c8ab81 100644--- a/www/components/AdminAccess/index.tsx+++ b/www/components/AdminAccess/index.tsx@@ -1,8 +1,10 @@import React, { useState } from 'react'import Tabs from 'components/AdminAccess/tabs'import SectionHeader from 'components/UI/SectionHeader'+import { useRouter } from 'next/router'const AdminAccess = () => {+ const { basePath } = useRouter()const [tabId, setTabId] = useState('tabTableEditor')return (@@ -27,7 +29,7 @@ const AdminAccess = () => {{/* Joshen: Preload all videos to prevent the flickering of video when changing tabs */}<videoclassName={`rounded-b-md ${tabId === 'tabTableEditor' ? 'block' : 'hidden'}`}- src={`videos/tabTableEditor.mp4`}+ src={`${basePath}/videos/tabTableEditor.mp4`}autoPlayloopmuted@@ -36,7 +38,7 @@ const AdminAccess = () => {</video><videoclassName={`rounded-b-md ${tabId === 'tabSqlEditor' ? 'block' : 'hidden'}`}- src={`videos/tabSqlEditor.mp4`}+ src={`${basePath}/videos/tabSqlEditor.mp4`}autoPlayloopmuted@@ -45,7 +47,7 @@ const AdminAccess = () => {</video><videoclassName={`rounded-b-md ${tabId === 'tabAuthRules' ? 'block' : 'hidden'}`}- src={`videos/tabAuthRules.mp4`}+ src={`${basePath}/videos/tabAuthRules.mp4`}autoPlayloopmuteddiff --git a/www/components/BuiltWithSupabase/index.tsx b/www/components/BuiltWithSupabase/index.tsxindex 4e4d1a244ce..1a9b04e1190 100644--- a/www/components/BuiltWithSupabase/index.tsx+++ b/www/components/BuiltWithSupabase/index.tsx@@ -1,8 +1,10 @@import Card from 'components/Card'import SectionHeader from 'components/UI/SectionHeader'import ProjectExamples from 'data/ProjectExamples.json'+import { useRouter } from 'next/router'const BuiltExamples = () => {+ const { basePath } = useRouter()return (<div className="relative bg-gray-50 dark:bg-dark-600 pt-12 pb-16"><div className="absolute inset-0">@@ -30,7 +32,7 @@ const BuiltExamples = () => {title={example.title}type="Project Example"description={example.description}- imgUrl={example.imgUrl}+ imgUrl={`${basePath}/${example.imgUrl}`}url={example.url}icons={example.icons}/>diff --git a/www/components/CaseStudies/benchmark.tsx b/www/components/CaseStudies/benchmark.tsxindex a857ee19554..c188b3232ce 100644--- a/www/components/CaseStudies/benchmark.tsx+++ b/www/components/CaseStudies/benchmark.tsx@@ -1,17 +1,19 @@import Button from 'components/Button'+import { useRouter } from 'next/router'const Benchmark = () => {+ const { basePath } = useRouter()return (<div className="mt-6 lg:mt-16 max-w-lg mx-auto lg:max-w-none lg:mx-0"><div className="grid gap-4 items-center rounded-md grid-cols-1 lg:grid-cols-12 overflow-auto bg-dark-800 shadow-lg"><div className="col-span-1 lg:col-span-10 flex items-center flex-col lg:flex-row"><imgclassName="mb-10 w-full lg:w-auto lg:mb-0 lg:h-44 lg:mr-14 hidden lg:block"- src="images/benchmark.svg"+ src={`${basePath}/images/benchmark.svg`}/><imgclassName="mb-10 w-full lg:w-auto lg:mb-0 lg:h-44 lg:mr-14 lg:hidden"- src="images/benchmark--mobile.svg"+ src={`${basePath}/images/benchmark--mobile.svg`}/><div className="px-12 py-5 lg:px-0 lg:py-0"><p className="text-xl text-white">Record breaking speed and reliability</p>diff --git a/www/components/CaseStudies/index.tsx b/www/components/CaseStudies/index.tsxindex 7e0305335c9..b96c36f67ef 100644--- a/www/components/CaseStudies/index.tsx+++ b/www/components/CaseStudies/index.tsx@@ -2,8 +2,11 @@ import Card from 'components/Card'import Benchmark from 'components/CaseStudies/benchmark'import SectionHeader from 'components/UI/SectionHeader'import CaseStudiesData from 'data/CaseStudies.json'+import { useRouter } from 'next/router'const CaseStudies = () => {+ const { basePath } = useRouter()+return (<div className="relative bg-gray-50 dark:bg-dark-600 pb-20"><div className="absolute inset-0">@@ -28,7 +31,7 @@ const CaseStudies = () => {title={caseStudy.title}type={caseStudy.type}description={caseStudy.description}- imgUrl={caseStudy.imgUrl}+ imgUrl={`${basePath}/${caseStudy.imgUrl}`}url={caseStudy.url}logoUrl={caseStudy.logoUrl}// postMeta={caseStudy.postMeta}diff --git a/www/components/Footer/index.tsx b/www/components/Footer/index.tsxindex 12663885bfe..3abffa2eb9a 100644--- a/www/components/Footer/index.tsx+++ b/www/components/Footer/index.tsx@@ -1,5 +1,6 @@import { useState, useEffect } from 'react'import FooterLinks from 'data/Footer.json'+import { useRouter } from 'next/router'type Props = {darkMode: boolean@@ -7,6 +8,7 @@ type Props = {}const Footer = (props: Props) => {+ const { basePath } = useRouter()const { darkMode, updateTheme } = propsconst toggleDarkMode = () => {@@ -64,7 +66,7 @@ const Footer = (props: Props) => {<div className="space-y-8 xl:col-span-1"><imgclassName="h-10 w-auto"- src={darkMode ? 'images/logo-dark.png' : 'images/logo-light.png'}+ src={darkMode ? `${basePath}/images/logo-dark.png` : `${basePath}images/logo-light.png`}alt="Supabase"/><div className="flex space-x-6">diff --git a/www/components/Hero.tsx b/www/components/Hero.tsxindex efd69e79a78..4413ce1e630 100644--- a/www/components/Hero.tsx+++ b/www/components/Hero.tsx@@ -1,7 +1,10 @@import Link from 'next/link'import Button from 'components/Button'+import { useRouter } from 'next/router'const Hero = () => {+ const { basePath } = useRouter()+return (<div className="relative bg-dark-800 overflow-hidden"><div className="container mx-auto px-8 sm:px-16 xl:px-20">@@ -56,17 +59,17 @@ const Hero = () => {<div className="flex flex-wrap items-center lg:justify-start"><imgclassName="h-8 sm:h-10 pr-10"- src="images/logos/yc--grey.png"+ src={`${basePath}/images/logos/yc--grey.png`}alt="Y Combinator"/><imgclassName="relative -top-1 h-5 sm:h-7 pr-10"- src="images/logos/mozilla--grey.png"+ src={`${basePath}/images/logos/mozilla--grey.png`}alt="Mozilla"/><imgclassName="h-3 sm:h-5 pr-10"- src="images/logos/coatue.png"+ src={`${basePath}/images/logos/coatue.png`}alt="Coatue"/></div>diff --git a/www/components/Meta.tsx b/www/components/Meta.tsxindex 6321f8b487a..73a445e1850 100644--- a/www/components/Meta.tsx+++ b/www/components/Meta.tsx@@ -1,19 +1,21 @@import Head from 'next/head'import { DESCRIPTION, HOME_OG_IMAGE_URL } from '../lib/constants'+import { useRouter } from 'next/router'const Meta = () => {+ const { basePath } = useRouter()return (<Head>- <link rel="apple-touch-icon" sizes="180x180" href="/favicon/apple-touch-icon.png" />- <link rel="icon" type="image/png" sizes="32x32" href="/favicon/favicon-32x32.png" />- <link rel="icon" type="image/png" sizes="16x16" href="/favicon/favicon-16x16.png" />- <link rel="manifest" href="/favicon/site.webmanifest" />- <link rel="mask-icon" href="/favicon/safari-pinned-tab.svg" color="#000000" />- <link rel="shortcut icon" href="/favicon/favicon.ico" />+ <link rel="apple-touch-icon" sizes="180x180" href={`${basePath}/favicon/apple-touch-icon.png`} />+ <link rel="icon" type="image/png" sizes="32x32" href={`${basePath}/favicon/favicon-32x32.png`} />+ <link rel="icon" type="image/png" sizes="16x16" href={`${basePath}/favicon/favicon-16x16.png`} />+ <link rel="manifest" href={`${basePath}/favicon/site.webmanifest`} />+ <link rel="mask-icon" href={`${basePath}/favicon/safari-pinned-tab.svg`} color="#000000" />+ <link rel="shortcut icon" href={`${basePath}/favicon/favicon.ico`} /><meta name="msapplication-TileColor" content="#1E1E1E" />- <meta name="msapplication-config" content="/favicon/browserconfig.xml" />+ <meta name="msapplication-config" content={`${basePath}/favicon/browserconfig.xml`} /><meta name="theme-color" content="#1E1E1E" />- <link rel="alternate" type="application/rss+xml" href="/feed.xml" />+ <link rel="alternate" type="application/rss+xml" href={`${basePath}/feed.xml`} /><meta name="description" content={DESCRIPTION} /><meta property="og:image" content={HOME_OG_IMAGE_URL} /></Head>diff --git a/www/components/Nav/index.tsx b/www/components/Nav/index.tsxindex e1db27b483c..eefd7dd8fcc 100644--- a/www/components/Nav/index.tsx+++ b/www/components/Nav/index.tsx@@ -1,5 +1,6 @@import React, { useState } from 'react'import Link from 'next/link'+import { useRouter } from 'next/router'import Badge from 'components/Badge'import FlyOut from 'components/Nav/FlyOut'@@ -11,6 +12,7 @@ type Props = {}const Nav = (props: Props) => {+ const { basePath } = useRouter()const { darkMode } = propsconst [open, setOpen] = useState(false)@@ -137,12 +139,12 @@ const Nav = (props: Props) => {<div className="flex-shrink-0 flex items-center"><imgclassName="block lg:hidden h-6 w-auto"- src={darkMode ? 'images/logo-dark.png' : 'images/logo-light.png'}+ src={darkMode ? `${basePath}/images/logo-dark.png` : `${basePath}/images/logo-light.png`}alt="Logo"/><imgclassName="hidden lg:block h-6 w-auto"- src={darkMode ? 'images/logo-dark.png' : 'images/logo-light.png'}+ src={darkMode ? `${basePath}/images/logo-dark.png` : `${basePath}/images/logo-light.png`}alt="Logo"/></div>diff --git a/www/data/ProjectExamples.json b/www/data/ProjectExamples.jsonindex 46bd1339fde..3310e1c1012 100644--- a/www/data/ProjectExamples.json+++ b/www/data/ProjectExamples.json@@ -3,8 +3,8 @@"imgUrl": "images/stripe.jpg","title": "Stripe SaaS starter","url": "https://github.com/supabase/supabase/tree/master/examples",- "description":"Build a SaaS business with Stripe subscriptions and Supabase.",- "icons" : [+ "description": "Build a SaaS business with Stripe subscriptions and Supabase.",+ "icons": [{"imgUrl": "https://avatars3.githubusercontent.com/u/54469796?s=480&v=4","imgAlt": "supabase icon"@@ -18,14 +18,14 @@"imgAlt": "stripe icon"}],- "ctaText" : "View project"+ "ctaText": "View project"},{"imgUrl": "images/slack-clone.jpg","title": "Chat app with Next.js","url": "https://github.com/supabase/supabase/tree/master/examples/nextjs-slack-clone",- "description":"Build a full-stack Slack clone using Next.js and Supabase.",- "icons" : [+ "description": "Build a full-stack Slack clone using Next.js and Supabase.",+ "icons": [{"imgUrl": "https://avatars3.githubusercontent.com/u/54469796?s=480&v=4","imgAlt": "supabase icon"@@ -35,14 +35,14 @@"imgAlt": "vercel icon"}],- "ctaText" : "View project"+ "ctaText": "View project"},{"imgUrl": "images/to-do-app.jpg","title": "Todo list with Vue.js","url": "https://github.com/supabase/supabase/tree/master/examples/vue3-ts-todo-list",- "description":"Build a simple todo list with Vue and Supabase.",- "icons" : [+ "description": "Build a simple todo list with Vue and Supabase.",+ "icons": [{"imgUrl": "https://avatars3.githubusercontent.com/u/54469796?s=480&v=4","imgAlt": "supabase icon"@@ -52,6 +52,6 @@"imgAlt": "vercel icon"}],- "ctaText" : "View project"+ "ctaText": "View project"}]diff --git a/www/next.config.js b/www/next.config.jsnew file mode 100644index 00000000000..fea23554d87--- /dev/null+++ b/www/next.config.js@@ -0,0 +1,3 @@+module.exports = {+ basePath: '/new',+}