diff --git a/www/lib/rss.tsx b/www/lib/rss.tsx
new file mode 100644
index 00000000000..4061ec57ef6
--- /dev/null
+++ b/www/lib/rss.tsx
@@ -0,0 +1,25 @@
+const generateRssItem = (post: any): string => `
+
+ https://supabase.io/blog/${post.slug}
+ ${post.title}
+ https://supabase.io/blog/${post.slug}
+ ${post.description}
+ ${new Date(post.date).toUTCString()}
+
+`
+
+export const generateRss = (posts: any[]): string => {
+ return `
+
+
+ Blog - Supabase
+ https://supabase.io
+ Latest news from Supabase
+ en
+ ${new Date(posts[0].date).toUTCString()}
+
+ ${posts.map(generateRssItem).join('')}
+
+
+`
+}
diff --git a/www/pages/blog.tsx b/www/pages/blog.tsx
index 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
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 API
setBlogs(
@@ -38,6 +50,14 @@ function Blog(props: any) {
return (
<>
+
+
+
diff --git a/www/public/rss.xml b/www/public/rss.xml
new file mode 100644
index 00000000000..cd2d540b45f
--- /dev/null
+++ b/www/public/rss.xml
@@ -0,0 +1,220 @@
+
+
+
+ Blog - Supabase
+ https://supabase.io
+ Latest news from Supabase
+ en
+ Sat, 20 Feb 2021 16:00:00 GMT
+
+
+
+ https://supabase.io/blog/2021-02-21-toadli
+ Toadli.Co
+ https://supabase.io/blog/2021-02-21-toadli
+ Learn why Zach used Supabase as part of his serverless SAAS setup.
+ Sat, 20 Feb 2021 16:00:00 GMT
+
+
+
+ https://supabase.io/blog/2021-02-09-case-study-roboflow
+ Roboflow.com choose Supabase to power Paint.wtf leaderboard
+ https://supabase.io/blog/2021-02-09-case-study-roboflow
+ Learn how Roboflow.com used Supabase to build their Paint.wtf leaderboard
+ Mon, 08 Feb 2021 16:00:00 GMT
+
+
+
+ https://supabase.io/blog/2021-02-02-supabase-beta-january-2021
+ Supabase Beta January 2021
+ https://supabase.io/blog/2021-02-02-supabase-beta-january-2021
+ Eleven months of building.
+ Mon, 01 Feb 2021 16:00:00 GMT
+
+
+
+ https://supabase.io/blog/2020-12-13-supabase-dashboard-performance
+ Making the Supabase Dashboard Supa-fast
+ https://supabase.io/blog/2020-12-13-supabase-dashboard-performance
+ Improving the performance of the Supabase dashboard
+ Sat, 12 Dec 2020 16:00:00 GMT
+
+
+
+ https://supabase.io/blog/2020-12-02-supabase-striveschool
+ Supabase Partners With Strive School To Help Teach Open Source
+ https://supabase.io/blog/2020-12-02-supabase-striveschool
+ Supabase Partners With Strive School To Help Teach Open Source To The Next Generation Of Developers
+ Tue, 01 Dec 2020 16:00:00 GMT
+
+
+
+ https://supabase.io/blog/2020-12-02-case-study-xendit
+ Xendit Built a Counter-Fraud Watchlist for the Fintech Industry
+ https://supabase.io/blog/2020-12-02-case-study-xendit
+ See how Xendit use Supabase to build a full-text search engine.
+ Tue, 01 Dec 2020 16:00:00 GMT
+
+
+
+ https://supabase.io/blog/2020-12-02-case-study-tayfa
+ TAYFA Built a No-Code Website Builder in Seven Days
+ https://supabase.io/blog/2020-12-02-case-study-tayfa
+ See how Tayfa went from idea to paying customer in less than 30 days.
+ Tue, 01 Dec 2020 16:00:00 GMT
+
+
+
+ https://supabase.io/blog/2020-12-02-case-study-monitoro
+ Monitoro Built a Web Crawler Handling Millions of API Requests
+ https://supabase.io/blog/2020-12-02-case-study-monitoro
+ See how Monitoro built an automated scraping platform using Supabase.
+ Tue, 01 Dec 2020 16:00:00 GMT
+
+
+
+ https://supabase.io/blog/2020-12-01-supabase-alpha-november-2020
+ Supabase Alpha November 2020
+ https://supabase.io/blog/2020-12-01-supabase-alpha-november-2020
+ Nine months of building.
+ Mon, 30 Nov 2020 16:00:00 GMT
+
+
+
+ https://supabase.io/blog/2020-11-18-postgresql-views
+ Postgres Views
+ https://supabase.io/blog/2020-11-18-postgresql-views
+ Creating and using a view in PostgreSQL.
+ Tue, 17 Nov 2020 16:00:00 GMT
+
+
+
+ https://supabase.io/blog/2020-11-02-supabase-alpha-october-2020
+ Supabase Alpha October 2020
+ https://supabase.io/blog/2020-11-02-supabase-alpha-october-2020
+ Eight months of building.
+ Sun, 01 Nov 2020 16:00:00 GMT
+
+
+
+ https://supabase.io/blog/2020-10-30-improved-dx
+ Supabase.js 1.0
+ https://supabase.io/blog/2020-10-30-improved-dx
+ We're releasing a new version of our Supabase client with some awesome new improvements.
+ Thu, 29 Oct 2020 16:00:00 GMT
+
+
+
+ https://supabase.io/blog/2020-10-03-supabase-alpha-september-2020
+ Supabase Alpha September 2020
+ https://supabase.io/blog/2020-10-03-supabase-alpha-september-2020
+ Seven months of building.
+ Fri, 02 Oct 2020 16:00:00 GMT
+
+
+
+ https://supabase.io/blog/2020-09-11-supabase-hacktoberfest-2020
+ Supabase Hacktoberfest 2020
+ https://supabase.io/blog/2020-09-11-supabase-hacktoberfest-2020
+ Join us for a celebration of open source software and learn how to contribute to Supabase.
+ Thu, 10 Sep 2020 16:00:00 GMT
+
+
+
+ https://supabase.io/blog/2020-09-03-supabase-alpha-august-2020
+ Supabase Alpha August 2020
+ https://supabase.io/blog/2020-09-03-supabase-alpha-august-2020
+ Six months of building
+ Wed, 02 Sep 2020 16:00:00 GMT
+
+
+
+ https://supabase.io/blog/2020-08-05-supabase-auth
+ Supabase Auth
+ https://supabase.io/blog/2020-08-05-supabase-auth
+ Authenticate and authorize your users with Supabase Auth
+ Tue, 04 Aug 2020 16:00:00 GMT
+
+
+
+ https://supabase.io/blog/2020-08-02-supabase-alpha-july-2020
+ Supabase Alpha July 2020
+ https://supabase.io/blog/2020-08-02-supabase-alpha-july-2020
+ Five months of building
+ Sat, 01 Aug 2020 16:00:00 GMT
+
+
+
+ https://supabase.io/blog/2020-08-02-continuous-postgresql-backup-walg
+ Continuous PostgreSQL Backups using WAL-G
+ https://supabase.io/blog/2020-08-02-continuous-postgresql-backup-walg
+ Have you ever wanted to restore your database's state to a particular moment in time? This post explains how, using WAL-G.
+ Sat, 01 Aug 2020 16:00:00 GMT
+
+
+
+ https://supabase.io/blog/2020-07-10-alpha-launch-postmortem
+ Alpha Launch Postmortem
+ https://supabase.io/blog/2020-07-10-alpha-launch-postmortem
+ Everything that went wrong with Supabase's launch
+ Thu, 09 Jul 2020 16:00:00 GMT
+
+
+
+ https://supabase.io/blog/2020-07-09-postgresql-templates
+ What are PostgreSQL Templates?
+ https://supabase.io/blog/2020-07-09-postgresql-templates
+ What are PostgreSQL templates and what are they used for?
+ Wed, 08 Jul 2020 16:00:00 GMT
+
+
+
+ https://supabase.io/blog/2020-07-17-postgresql-physical-logical-backups
+ Physical vs Logical Backups in PostgreSQL
+ https://supabase.io/blog/2020-07-17-postgresql-physical-logical-backups
+ What are physical and logical backups in Postgres?
+ Mon, 06 Jul 2020 16:00:00 GMT
+
+
+
+ https://supabase.io/blog/2020-07-01-supabase-alpha-june-2020
+ Supabase Alpha June 2020
+ https://supabase.io/blog/2020-07-01-supabase-alpha-june-2020
+ Four months of building
+ Tue, 30 Jun 2020 16:00:00 GMT
+
+
+
+ https://supabase.io/blog/2020-06-15-supabase-steve-chavez
+ Steve Chavez has joined Supabase
+ https://supabase.io/blog/2020-06-15-supabase-steve-chavez
+ Steve joins Supabase to help build Auth.
+ Sun, 14 Jun 2020 16:00:00 GMT
+
+
+
+ https://supabase.io/blog/2020-06-01-supabase-alpha-may-2020
+ Supabase Alpha May 2020
+ https://supabase.io/blog/2020-06-01-supabase-alpha-may-2020
+ Three months of building
+ Sun, 31 May 2020 16:00:00 GMT
+
+
+
+ https://supabase.io/blog/2020-05-01-supabase-alpha-april-2020
+ Supabase Alpha April 2020
+ https://supabase.io/blog/2020-05-01-supabase-alpha-april-2020
+ Two months of building
+ Sun, 31 May 2020 16:00:00 GMT
+
+
+
+ https://supabase.io/blog/2021-01-02-supabase-beta-december-2020
+ Supabase Beta December 2020
+ https://supabase.io/blog/2021-01-02-supabase-beta-december-2020
+ Ten months of building.
+ Wed, 01 Jan 2020 16:00:00 GMT
+
+
+
+