Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Updates

Terry Suttond8c02d80f913
diff --git a/apps/www/lib/rss.tsx b/apps/www/lib/rss.tsx
index 36fb38f5825..c0409f8393d 100644
--- a/apps/www/lib/rss.tsx
+++ b/apps/www/lib/rss.tsx
@@ -1,3 +1,4 @@
+import authors from 'lib/authors.json'
const dayjs = require('dayjs')
var utc = require('dayjs/plugin/utc')
var advancedFormat = require('dayjs/plugin/advancedFormat')
@@ -17,8 +18,29 @@ const generateRssItem = (post: any): string => {
`
}
-export const generateRss = (posts: any[]): string => {
- return `
+// we generate a main rss.xml flie as well as individual files for
+// authors who publish under the `planetpg` tag
+export const generateRss = (posts: any[], authorID?: string): string => {
+ const authorInfo = authors.find((item) => item.author_id === authorID)
+
+ if (authorID) {
+ return `
+ <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
+ <channel>
+ <title>'Postgres | Supabase Blog</title>
+ <link>https://supabase.com/blog</link>
+ <description>Latest Postgres news from ${authorInfo?.author} at Supabase</description>
+ <language>en</language>
+ <lastBuildDate>${dayjs(posts[0].date)
+ .utc()
+ .format('ddd, DD MMM YYYY HH:hh:mm ZZ')}</lastBuildDate>
+ <atom:link href="https://supabase.com/planetpg-${authorID}-rss.xml" rel="self" type="application/rss+xml"/>
+ ${posts.map(generateRssItem).join('')}
+ </channel>
+ </rss>
+`
+ } else {
+ return `
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Blog - Supabase</title>
@@ -33,4 +55,5 @@ export const generateRss = (posts: any[]): string => {
</channel>
</rss>
`
+ }
}
diff --git a/apps/www/pages/blog.tsx b/apps/www/pages/blog.tsx
index 8e2a55c3c44..a14bbd8feef 100644
--- a/apps/www/pages/blog.tsx
+++ b/apps/www/pages/blog.tsx
@@ -26,24 +26,13 @@ export async function getStaticProps() {
// generate a series of rss feeds for each author (for PlanetPG)
const planetPgPosts = allPostsData.filter((post: any) => post.tags.includes('planetpg'))
+ const planetPgAuthors = planetPgPosts.map((post: any) => post.author.split(','))
+ const uniquePlanetPgAuthors = new Set([].concat(...planetPgAuthors))
- const authors = [
- 'alexander',
- 'michel',
- 'pavel',
- 'steve_chavez',
- 'angelico_de_los_reyes',
- 'oli_rice',
- 'burggraf',
- 'victor',
- 'paul_copplestone',
- 'ant_wilson',
- ]
-
- authors.forEach((author) => {
+ uniquePlanetPgAuthors.forEach((author) => {
const authorPosts = planetPgPosts.filter((post: any) => post.author.includes(author))
if (authorPosts.length > 0) {
- const authorRss = generateRss(authorPosts)
+ const authorRss = generateRss(authorPosts, author)
fs.writeFileSync(`./public/planetpg-${author}-rss.xml`, authorRss)
}
})
diff --git a/apps/www/public/planetpg-angelico_de_los_reyes-rss.xml b/apps/www/public/planetpg-angelico_de_los_reyes-rss.xml
index 280497b278e..84fe8fab257 100644
--- a/apps/www/public/planetpg-angelico_de_los_reyes-rss.xml
+++ b/apps/www/public/planetpg-angelico_de_los_reyes-rss.xml
@@ -1,12 +1,12 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
- <title>Blog - Supabase</title>
- <link>https://supabase.com</link>
- <description>Latest news from Supabase</description>
+ <title>'Postgres | Supabase Blog</title>
+ <link>https://supabase.com/blog</link>
+ <description>Latest Postgres news from Angelico de los Reyes at Supabase</description>
<language>en</language>
<lastBuildDate>Thu, 15 Dec 2022 03:03:30 +0000</lastBuildDate>
- <atom:link href="https://supabase.com/rss.xml" rel="self" type="application/rss+xml"/>
+ <atom:link href="https://supabase.com/planetpg-angelico_de_los_reyes-rss.xml" rel="self" type="application/rss+xml"/>
<item>
<guid>https://supabase.com/blog/postgres-point-in-time-recovery</guid>
<title>Point in Time Recovery is now available for Pro projects</title>
diff --git a/apps/www/public/planetpg-ant_wilson-rss.xml b/apps/www/public/planetpg-ant_wilson-rss.xml
index b0afb8913f2..07cfe4056b8 100644
--- a/apps/www/public/planetpg-ant_wilson-rss.xml
+++ b/apps/www/public/planetpg-ant_wilson-rss.xml
@@ -1,12 +1,12 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
- <title>Blog - Supabase</title>
- <link>https://supabase.com</link>
- <description>Latest news from Supabase</description>
+ <title>'Postgres | Supabase Blog</title>
+ <link>https://supabase.com/blog</link>
+ <description>Latest Postgres news from Ant Wilson at Supabase</description>
<language>en</language>
<lastBuildDate>Sat, 27 Feb 2021 03:03:30 +0000</lastBuildDate>
- <atom:link href="https://supabase.com/rss.xml" rel="self" type="application/rss+xml"/>
+ <atom:link href="https://supabase.com/planetpg-ant_wilson-rss.xml" rel="self" type="application/rss+xml"/>
<item>
<guid>https://supabase.com/blog/cracking-postgres-interview</guid>
<title>Cracking PostgreSQL Interview Questions</title>
diff --git a/apps/www/public/planetpg-burggraf-rss.xml b/apps/www/public/planetpg-burggraf-rss.xml
index 3f3db745b40..26233a86f1e 100644
--- a/apps/www/public/planetpg-burggraf-rss.xml
+++ b/apps/www/public/planetpg-burggraf-rss.xml
@@ -1,12 +1,12 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
- <title>Blog - Supabase</title>
- <link>https://supabase.com</link>
- <description>Latest news from Supabase</description>
+ <title>'Postgres | Supabase Blog</title>
+ <link>https://supabase.com/blog</link>
+ <description>Latest Postgres news from Mark Burggraf at Supabase</description>
<language>en</language>
<lastBuildDate>Wed, 23 Nov 2022 03:03:30 +0000</lastBuildDate>
- <atom:link href="https://supabase.com/rss.xml" rel="self" type="application/rss+xml"/>
+ <atom:link href="https://supabase.com/planetpg-burggraf-rss.xml" rel="self" type="application/rss+xml"/>
<item>
<guid>https://supabase.com/blog/sql-or-nosql-both-with-postgresql</guid>
<title>SQL or NoSQL? Why not use both (with PostgreSQL)?</title>
diff --git a/apps/www/public/planetpg-michel-rss.xml b/apps/www/public/planetpg-michel-rss.xml
index 8df9cc5a91c..3bcd14a76b8 100644
--- a/apps/www/public/planetpg-michel-rss.xml
+++ b/apps/www/public/planetpg-michel-rss.xml
@@ -1,12 +1,12 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
- <title>Blog - Supabase</title>
- <link>https://supabase.com</link>
- <description>Latest news from Supabase</description>
+ <title>'Postgres | Supabase Blog</title>
+ <link>https://supabase.com/blog</link>
+ <description>Latest Postgres news from Michel Pelletier at Supabase</description>
<language>en</language>
<lastBuildDate>Thu, 15 Dec 2022 03:03:30 +0000</lastBuildDate>
- <atom:link href="https://supabase.com/rss.xml" rel="self" type="application/rss+xml"/>
+ <atom:link href="https://supabase.com/planetpg-michel-rss.xml" rel="self" type="application/rss+xml"/>
<item>
<guid>https://supabase.com/blog/vault-now-in-beta</guid>
<title>Supabase Vault is now in Beta</title>
diff --git a/apps/www/public/planetpg-oli_rice-rss.xml b/apps/www/public/planetpg-oli_rice-rss.xml
index da3f0ad119b..77f01e50bdf 100644
--- a/apps/www/public/planetpg-oli_rice-rss.xml
+++ b/apps/www/public/planetpg-oli_rice-rss.xml
@@ -1,12 +1,12 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
- <title>Blog - Supabase</title>
- <link>https://supabase.com</link>
- <description>Latest news from Supabase</description>
+ <title>'Postgres | Supabase Blog</title>
+ <link>https://supabase.com/blog</link>
+ <description>Latest Postgres news from Oliver Rice at Supabase</description>
<language>en</language>
<lastBuildDate>Thu, 15 Dec 2022 03:03:30 +0000</lastBuildDate>
- <atom:link href="https://supabase.com/rss.xml" rel="self" type="application/rss+xml"/>
+ <atom:link href="https://supabase.com/planetpg-oli_rice-rss.xml" rel="self" type="application/rss+xml"/>
<item>
<guid>https://supabase.com/blog/pg-graphql-v1</guid>
<title>pg_graphql v1.0</title>
diff --git a/apps/www/public/planetpg-paul_copplestone-rss.xml b/apps/www/public/planetpg-paul_copplestone-rss.xml
index 784975b7a6f..bc3d31ea3d3 100644
--- a/apps/www/public/planetpg-paul_copplestone-rss.xml
+++ b/apps/www/public/planetpg-paul_copplestone-rss.xml
@@ -1,12 +1,12 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
- <title>Blog - Supabase</title>
- <link>https://supabase.com</link>
- <description>Latest news from Supabase</description>
+ <title>'Postgres | Supabase Blog</title>
+ <link>https://supabase.com/blog</link>
+ <description>Latest Postgres news from Paul Copplestone at Supabase</description>
<language>en</language>
<lastBuildDate>Mon, 27 Jun 2022 02:02:30 +0000</lastBuildDate>
- <atom:link href="https://supabase.com/rss.xml" rel="self" type="application/rss+xml"/>
+ <atom:link href="https://supabase.com/planetpg-paul_copplestone-rss.xml" rel="self" type="application/rss+xml"/>
<item>
<guid>https://supabase.com/blog/partial-postgresql-data-dumps-with-rls</guid>
<title>Partial data dumps using Postgres Row Level Security</title>
diff --git a/apps/www/public/planetpg-pavel-rss.xml b/apps/www/public/planetpg-pavel-rss.xml
index 22153485707..e6dbbb4c1fe 100644
--- a/apps/www/public/planetpg-pavel-rss.xml
+++ b/apps/www/public/planetpg-pavel-rss.xml
@@ -1,12 +1,12 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
- <title>Blog - Supabase</title>
- <link>https://supabase.com</link>
- <description>Latest news from Supabase</description>
+ <title>'Postgres | Supabase Blog</title>
+ <link>https://supabase.com/blog</link>
+ <description>Latest Postgres news from Pavel Borisov at Supabase</description>
<language>en</language>
<lastBuildDate>Thu, 15 Dec 2022 03:03:30 +0000</lastBuildDate>
- <atom:link href="https://supabase.com/rss.xml" rel="self" type="application/rss+xml"/>
+ <atom:link href="https://supabase.com/planetpg-pavel-rss.xml" rel="self" type="application/rss+xml"/>
<item>
<guid>https://supabase.com/blog/new-in-postgres-15</guid>
<title>What's new in Postgres 15?</title>
diff --git a/apps/www/public/planetpg-steve_chavez-rss.xml b/apps/www/public/planetpg-steve_chavez-rss.xml
index 0b47a94b124..575cafb6b06 100644
--- a/apps/www/public/planetpg-steve_chavez-rss.xml
+++ b/apps/www/public/planetpg-steve_chavez-rss.xml
@@ -1,12 +1,12 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
- <title>Blog - Supabase</title>
- <link>https://supabase.com</link>
- <description>Latest news from Supabase</description>
+ <title>'Postgres | Supabase Blog</title>
+ <link>https://supabase.com/blog</link>
+ <description>Latest Postgres news from Steve Chavez at Supabase</description>
<language>en</language>
<lastBuildDate>Thu, 15 Dec 2022 03:03:30 +0000</lastBuildDate>
- <atom:link href="https://supabase.com/rss.xml" rel="self" type="application/rss+xml"/>
+ <atom:link href="https://supabase.com/planetpg-steve_chavez-rss.xml" rel="self" type="application/rss+xml"/>
<item>
<guid>https://supabase.com/blog/postgrest-11-prerelease</guid>
<title>PostgREST 11 pre-release</title>
diff --git a/apps/www/public/planetpg-victor-rss.xml b/apps/www/public/planetpg-victor-rss.xml
index f3fbdfd181f..e742fb6eec8 100644
--- a/apps/www/public/planetpg-victor-rss.xml
+++ b/apps/www/public/planetpg-victor-rss.xml
@@ -1,12 +1,12 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
- <title>Blog - Supabase</title>
- <link>https://supabase.com</link>
- <description>Latest news from Supabase</description>
+ <title>'Postgres | Supabase Blog</title>
+ <link>https://supabase.com/blog</link>
+ <description>Latest Postgres news from Victor at Supabase</description>
<language>en</language>
<lastBuildDate>Thu, 13 Oct 2022 02:02:30 +0000</lastBuildDate>
- <atom:link href="https://supabase.com/rss.xml" rel="self" type="application/rss+xml"/>
+ <atom:link href="https://supabase.com/planetpg-victor-rss.xml" rel="self" type="application/rss+xml"/>
<item>
<guid>https://supabase.com/blog/postgres-full-text-search-vs-the-rest</guid>
<title>Postgres Full Text Search vs the rest</title>