The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
chore: add an RSS feed to the new blog
Jonathan Summers-Muir97f74e1eb9be
diff --git a/www/lib/rss.tsx b/www/lib/rss.tsxnew file mode 100644index 00000000000..4061ec57ef6--- /dev/null+++ b/www/lib/rss.tsx@@ -0,0 +1,25 @@+const generateRssItem = (post: any): string => `+<item>+ <guid>https://supabase.io/blog/${post.slug}</guid>+ <title>${post.title}</title>+ <link>https://supabase.io/blog/${post.slug}</link>+ <description>${post.description}</description>+ <pubDate>${new Date(post.date).toUTCString()}</pubDate>+</item>+`++export const generateRss = (posts: any[]): string => {+ return `+ <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">+ <channel>+ <title>Blog - Supabase</title>+ <link>https://supabase.io</link>+ <description>Latest news from Supabase</description>+ <language>en</language>+ <lastBuildDate>${new Date(posts[0].date).toUTCString()}</lastBuildDate>+ <atom:link href="https://supabase.io/blog/rss.xml" rel="self" type="application/rss+xml"/>+ ${posts.map(generateRssItem).join('')}+ </channel>+ </rss>+`+}diff --git a/www/pages/blog.tsx b/www/pages/blog.tsxindex 43590475663..1e76b31e77f 100644--- a/www/pages/blog.tsx+++ b/www/pages/blog.tsx@@ -1,17 +1,27 @@-import DefaultLayout from '~/components/Layouts/Default'-import Link from 'next/link'-import { Typography, Badge, Space, Button } from '@supabase/ui'-import authors from 'lib/authors.json'-import { getSortedPosts, getAllCategories } from '~/lib/posts'+import fs from 'fs'import { useEffect, useState } from 'react'+import { useRouter } from 'next/router'+import Head from 'next/head'+import Link from 'next/link'+import { NextSeo } from 'next-seo'+import { generateRss } from '~/lib/rss'+import { getSortedPosts, getAllCategories } from '~/lib/posts'+import authors from 'lib/authors.json'++import DefaultLayout from '~/components/Layouts/Default'+import { Typography, Badge, Space, Button } from '@supabase/ui'export async function getStaticProps() {const allPostsData = getSortedPosts()const categories = getAllCategories()+ const rss = generateRss(allPostsData)++ // create a rss feed in public directory+ // rss feed is added via <Head> component in render return+ fs.writeFileSync('./public/rss.xml', rss)- console.log(categories)return {props: {blogs: allPostsData,@@ -24,6 +34,8 @@ function Blog(props: any) {const [category, setCategory] = useState('')const [blogs, setBlogs] = useState(props.blogs)+ const { basePath } = useRouter()+useEffect(() => {// Update the document title using the browser APIsetBlogs(@@ -38,6 +50,14 @@ function Blog(props: any) {return (<>+ <Head>+ <link+ rel="alternate"+ type="application/rss+xml"+ title="RSS feed for blog posts"+ href={`${basePath}/rss.xml`}+ />+ </Head><NextSeo title="Blog" description="Latest news from the Supabase team." /><DefaultLayout><div className="bg-white dark:bg-dark-700 overflow-hidden py-12">diff --git a/www/public/rss.xml b/www/public/rss.xmlnew file mode 100644index 00000000000..cd2d540b45f--- /dev/null+++ b/www/public/rss.xml@@ -0,0 +1,220 @@++ <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">+ <channel>+ <title>Blog - Supabase</title>+ <link>https://supabase.io</link>+ <description>Latest news from Supabase</description>+ <language>en</language>+ <lastBuildDate>Sat, 20 Feb 2021 16:00:00 GMT</lastBuildDate>+ <atom:link href="https://supabase.io/blog/rss.xml" rel="self" type="application/rss+xml"/>++<item>+ <guid>https://supabase.io/blog/2021-02-21-toadli</guid>+ <title>Toadli.Co</title>+ <link>https://supabase.io/blog/2021-02-21-toadli</link>+ <description>Learn why Zach used Supabase as part of his serverless SAAS setup.</description>+ <pubDate>Sat, 20 Feb 2021 16:00:00 GMT</pubDate>+</item>++<item>+ <guid>https://supabase.io/blog/2021-02-09-case-study-roboflow</guid>+ <title>Roboflow.com choose Supabase to power Paint.wtf leaderboard</title>+ <link>https://supabase.io/blog/2021-02-09-case-study-roboflow</link>+ <description>Learn how Roboflow.com used Supabase to build their Paint.wtf leaderboard</description>+ <pubDate>Mon, 08 Feb 2021 16:00:00 GMT</pubDate>+</item>++<item>+ <guid>https://supabase.io/blog/2021-02-02-supabase-beta-january-2021</guid>+ <title>Supabase Beta January 2021</title>+ <link>https://supabase.io/blog/2021-02-02-supabase-beta-january-2021</link>+ <description>Eleven months of building.</description>+ <pubDate>Mon, 01 Feb 2021 16:00:00 GMT</pubDate>+</item>++<item>+ <guid>https://supabase.io/blog/2020-12-13-supabase-dashboard-performance</guid>+ <title>Making the Supabase Dashboard Supa-fast</title>+ <link>https://supabase.io/blog/2020-12-13-supabase-dashboard-performance</link>+ <description>Improving the performance of the Supabase dashboard</description>+ <pubDate>Sat, 12 Dec 2020 16:00:00 GMT</pubDate>+</item>++<item>+ <guid>https://supabase.io/blog/2020-12-02-supabase-striveschool</guid>+ <title>Supabase Partners With Strive School To Help Teach Open Source</title>+ <link>https://supabase.io/blog/2020-12-02-supabase-striveschool</link>+ <description>Supabase Partners With Strive School To Help Teach Open Source To The Next Generation Of Developers</description>+ <pubDate>Tue, 01 Dec 2020 16:00:00 GMT</pubDate>+</item>++<item>+ <guid>https://supabase.io/blog/2020-12-02-case-study-xendit</guid>+ <title>Xendit Built a Counter-Fraud Watchlist for the Fintech Industry</title>+ <link>https://supabase.io/blog/2020-12-02-case-study-xendit</link>+ <description>See how Xendit use Supabase to build a full-text search engine.</description>+ <pubDate>Tue, 01 Dec 2020 16:00:00 GMT</pubDate>+</item>++<item>+ <guid>https://supabase.io/blog/2020-12-02-case-study-tayfa</guid>+ <title>TAYFA Built a No-Code Website Builder in Seven Days</title>+ <link>https://supabase.io/blog/2020-12-02-case-study-tayfa</link>+ <description>See how Tayfa went from idea to paying customer in less than 30 days.</description>+ <pubDate>Tue, 01 Dec 2020 16:00:00 GMT</pubDate>+</item>++<item>+ <guid>https://supabase.io/blog/2020-12-02-case-study-monitoro</guid>+ <title>Monitoro Built a Web Crawler Handling Millions of API Requests</title>+ <link>https://supabase.io/blog/2020-12-02-case-study-monitoro</link>+ <description>See how Monitoro built an automated scraping platform using Supabase.</description>+ <pubDate>Tue, 01 Dec 2020 16:00:00 GMT</pubDate>+</item>++<item>+ <guid>https://supabase.io/blog/2020-12-01-supabase-alpha-november-2020</guid>+ <title>Supabase Alpha November 2020</title>+ <link>https://supabase.io/blog/2020-12-01-supabase-alpha-november-2020</link>+ <description>Nine months of building.</description>+ <pubDate>Mon, 30 Nov 2020 16:00:00 GMT</pubDate>+</item>++<item>+ <guid>https://supabase.io/blog/2020-11-18-postgresql-views</guid>+ <title>Postgres Views</title>+ <link>https://supabase.io/blog/2020-11-18-postgresql-views</link>+ <description>Creating and using a view in PostgreSQL.</description>+ <pubDate>Tue, 17 Nov 2020 16:00:00 GMT</pubDate>+</item>++<item>+ <guid>https://supabase.io/blog/2020-11-02-supabase-alpha-october-2020</guid>+ <title>Supabase Alpha October 2020</title>+ <link>https://supabase.io/blog/2020-11-02-supabase-alpha-october-2020</link>+ <description>Eight months of building.</description>+ <pubDate>Sun, 01 Nov 2020 16:00:00 GMT</pubDate>+</item>++<item>+ <guid>https://supabase.io/blog/2020-10-30-improved-dx</guid>+ <title>Supabase.js 1.0</title>+ <link>https://supabase.io/blog/2020-10-30-improved-dx</link>+ <description>We're releasing a new version of our Supabase client with some awesome new improvements.</description>+ <pubDate>Thu, 29 Oct 2020 16:00:00 GMT</pubDate>+</item>++<item>+ <guid>https://supabase.io/blog/2020-10-03-supabase-alpha-september-2020</guid>+ <title>Supabase Alpha September 2020</title>+ <link>https://supabase.io/blog/2020-10-03-supabase-alpha-september-2020</link>+ <description>Seven months of building.</description>+ <pubDate>Fri, 02 Oct 2020 16:00:00 GMT</pubDate>+</item>++<item>+ <guid>https://supabase.io/blog/2020-09-11-supabase-hacktoberfest-2020</guid>+ <title>Supabase Hacktoberfest 2020</title>+ <link>https://supabase.io/blog/2020-09-11-supabase-hacktoberfest-2020</link>+ <description>Join us for a celebration of open source software and learn how to contribute to Supabase.</description>+ <pubDate>Thu, 10 Sep 2020 16:00:00 GMT</pubDate>+</item>++<item>+ <guid>https://supabase.io/blog/2020-09-03-supabase-alpha-august-2020</guid>+ <title>Supabase Alpha August 2020</title>+ <link>https://supabase.io/blog/2020-09-03-supabase-alpha-august-2020</link>+ <description>Six months of building</description>+ <pubDate>Wed, 02 Sep 2020 16:00:00 GMT</pubDate>+</item>++<item>+ <guid>https://supabase.io/blog/2020-08-05-supabase-auth</guid>+ <title>Supabase Auth</title>+ <link>https://supabase.io/blog/2020-08-05-supabase-auth</link>+ <description>Authenticate and authorize your users with Supabase Auth</description>+ <pubDate>Tue, 04 Aug 2020 16:00:00 GMT</pubDate>+</item>++<item>+ <guid>https://supabase.io/blog/2020-08-02-supabase-alpha-july-2020</guid>+ <title>Supabase Alpha July 2020</title>+ <link>https://supabase.io/blog/2020-08-02-supabase-alpha-july-2020</link>+ <description>Five months of building</description>+ <pubDate>Sat, 01 Aug 2020 16:00:00 GMT</pubDate>+</item>++<item>+ <guid>https://supabase.io/blog/2020-08-02-continuous-postgresql-backup-walg</guid>+ <title>Continuous PostgreSQL Backups using WAL-G</title>+ <link>https://supabase.io/blog/2020-08-02-continuous-postgresql-backup-walg</link>+ <description>Have you ever wanted to restore your database's state to a particular moment in time? This post explains how, using WAL-G.</description>+ <pubDate>Sat, 01 Aug 2020 16:00:00 GMT</pubDate>+</item>++<item>+ <guid>https://supabase.io/blog/2020-07-10-alpha-launch-postmortem</guid>+ <title>Alpha Launch Postmortem</title>+ <link>https://supabase.io/blog/2020-07-10-alpha-launch-postmortem</link>+ <description>Everything that went wrong with Supabase's launch</description>+ <pubDate>Thu, 09 Jul 2020 16:00:00 GMT</pubDate>+</item>++<item>+ <guid>https://supabase.io/blog/2020-07-09-postgresql-templates</guid>+ <title>What are PostgreSQL Templates?</title>+ <link>https://supabase.io/blog/2020-07-09-postgresql-templates</link>+ <description>What are PostgreSQL templates and what are they used for?</description>+ <pubDate>Wed, 08 Jul 2020 16:00:00 GMT</pubDate>+</item>++<item>+ <guid>https://supabase.io/blog/2020-07-17-postgresql-physical-logical-backups</guid>+ <title>Physical vs Logical Backups in PostgreSQL</title>+ <link>https://supabase.io/blog/2020-07-17-postgresql-physical-logical-backups</link>+ <description>What are physical and logical backups in Postgres?</description>+ <pubDate>Mon, 06 Jul 2020 16:00:00 GMT</pubDate>+</item>++<item>+ <guid>https://supabase.io/blog/2020-07-01-supabase-alpha-june-2020</guid>+ <title>Supabase Alpha June 2020</title>+ <link>https://supabase.io/blog/2020-07-01-supabase-alpha-june-2020</link>+ <description>Four months of building</description>+ <pubDate>Tue, 30 Jun 2020 16:00:00 GMT</pubDate>+</item>++<item>+ <guid>https://supabase.io/blog/2020-06-15-supabase-steve-chavez</guid>+ <title>Steve Chavez has joined Supabase</title>+ <link>https://supabase.io/blog/2020-06-15-supabase-steve-chavez</link>+ <description>Steve joins Supabase to help build Auth.</description>+ <pubDate>Sun, 14 Jun 2020 16:00:00 GMT</pubDate>+</item>++<item>+ <guid>https://supabase.io/blog/2020-06-01-supabase-alpha-may-2020</guid>+ <title>Supabase Alpha May 2020</title>+ <link>https://supabase.io/blog/2020-06-01-supabase-alpha-may-2020</link>+ <description>Three months of building</description>+ <pubDate>Sun, 31 May 2020 16:00:00 GMT</pubDate>+</item>++<item>+ <guid>https://supabase.io/blog/2020-05-01-supabase-alpha-april-2020</guid>+ <title>Supabase Alpha April 2020</title>+ <link>https://supabase.io/blog/2020-05-01-supabase-alpha-april-2020</link>+ <description>Two months of building</description>+ <pubDate>Sun, 31 May 2020 16:00:00 GMT</pubDate>+</item>++<item>+ <guid>https://supabase.io/blog/2021-01-02-supabase-beta-december-2020</guid>+ <title>Supabase Beta December 2020</title>+ <link>https://supabase.io/blog/2021-01-02-supabase-beta-december-2020</link>+ <description>Ten months of building.</description>+ <pubDate>Wed, 01 Jan 2020 16:00:00 GMT</pubDate>+</item>++ </channel>+ </rss>