feat: populate blogroll from authors table
This commit is contained in:
parent
80d222cdbc
commit
5c54e8d409
4 changed files with 27 additions and 43 deletions
|
@ -1,36 +1,20 @@
|
|||
export default async function () {
|
||||
return [
|
||||
{ "name": "Adam Newbold", "url": "https://notes.neatnik.net", "feed": "https://notes.neatnik.net" },
|
||||
{ "name": "Adrianna Tan", "url": "https://popagandhi.com", "feed": "https://popagandhi.com/feed.xml", "newsletter": "https://buttondown.email/skinnylatte" },
|
||||
{ "name": "Ashur Cabrera", "url": "https://multiline.co/mment", "feed": "https://multiline.co/mment/feed.xml" },
|
||||
{ "name": "BinaryDigit", "url": "https://binarydigit.cafe", "feed": "https://binarydigit.cafe/feed.xml" },
|
||||
{ "name": "Chris Burnell", "url": "https://chrisburnell.com", "feed": "https://chrisburnell.com/feed.xml" },
|
||||
{ "name": "Chris Coyier", "url": "https://chriscoyier.net", "feed": "https://chriscoyier.net/feed/" },
|
||||
{ "name": "Chris Ferdinandi", "url": "https://gomakethings.com", "feed": "https://gomakethings.com/feed/index.xml", "newsletter": "https://gomakethings.com" },
|
||||
{ "name": "Chris McLeod", "url": "https://chrismcleod.dev", "feed": "https://chrismcleod.dev/feed.xml" },
|
||||
{ "name": "Dave Rupert", "url": "https://daverupert.com", "feed": "https://daverupert.com/atom.xml" },
|
||||
{ "name": "Ethan Marcotte", "url": "https://ethanmarcotte.com/wrote/", "feed": "https://ethanmarcotte.com/wrote/feed.xml" },
|
||||
{ "name": "fLaMEd", "url": "https://flamedfury.com", "feed": "https://flamedfury.com/feed.xml" },
|
||||
{ "name": "Jim Nielsen", "url": "https://blog.jim-nielsen.com", "feed": "https://blog.jim-nielsen.com/feed.xml", "json": "https://blog.jim-nielsen.com/feed.json" },
|
||||
{ "name": "Joe Steel", "url": "https://joe-steel.com", "feed": "https://joe-steel.com/feed.xml" },
|
||||
{ "name": "Joan Westenberg", "url": "https://joanwestenberg.com", "feed": "https://joanwestenberg.com/blog?format=rss", "newsletter": "https://joanwestenberg.com/subscribe" },
|
||||
{ "name": "Juha-Matti Santala", "url": "https://hamatti.org", "feed": "https://hamatti.org/feed/feed.xml", "newsletter":"https://www.syntaxerror.tech" },
|
||||
{ "name": "Keenan", "url": "https://gkeenan.co/avgb", "feed": "https://gkeenan.co/avglb?format=rss" },
|
||||
{ "name": "Kev Quirk", "url": "https://kevq.uk", "feed": "https://kevq.uk/feed.xml", "newsletter": "https://kevquirk.com/subscribe" },
|
||||
{ "name": "Łukasz Wójcik", "url": "https://lukaszwojcik.net", "feed": "https://blog.lukaszwojcik.net/full.xml" },
|
||||
{ "name": "Matt Birchler", "url": "https://birchtree.me", "feed": "https://birchtree.me/rss/" },
|
||||
{ "name": "Mike Haynes", "url": "https://crashthearcade.com", "feed": "https://crashthearcade.com/feed/rss" },
|
||||
{ "name": "Nick Heer", "url": "https://pxlnv.com", "feed": "https://feedpress.me/pxlnv", "json": "https://pxlnv.com/feed/json" },
|
||||
{ "name": "Paris Marx", "url": "https://disconnect.blog", "feed": "https://disconnect.blog/rss/", "newsletter": "https://disconnect.blog/#/portal/signup" },
|
||||
{ "name": "Paul Anthony Webb", "url": "https://webb.page" },
|
||||
{ "name": "Raymond Camden", "url": "https://raymondcamden.com", "feed": "https://www.raymondcamden.com/feed.xml", "newsletter": "https://www.raymondcamden.com/subscribe/" },
|
||||
{ "name": "Robb Knight", "url": "https://rknight.me", "feed": "https://rknight.me/subscribe/posts/rss.xml", "json": "https://rknight.me/subscribe/posts/feed.json" },
|
||||
{ "name": "Robin Rendle", "url": "https://robinrendle.com", "feed": "https://robinrendle.com/feed.xml", "newsletter": "https://robinrendle.com/the-cascade" },
|
||||
{ "name": "Ryan Broderick", "url": "https://www.garbageday.email", "feed": "https://rss.beehiiv.com/feeds/99VTTjt0N1.xml", "newsletter": "https://www.garbageday.email/subscribe" },
|
||||
{ "name": "Sara Joy", "url": "https://sarajoy.dev", "feed": "https://sarajoy.dev/rss.xml" },
|
||||
{ "name": "Sia Karamalegos", "url": "https://sia.codes", "feed": "https://sia.codes/feed/feed.xml", "newsletter": "https://sia.codes#inform" },
|
||||
{ "name": "Sophie Koonin", "url": "https://localghost.dev", "feed": "https://localghost.dev/rss" },
|
||||
{ "name": "Stephanie Eckles", "url": "https://thinkdobecreate.com", "feed": "https://thinkdobecreate.com/feed" },
|
||||
{ "name": "Zach Leatherman", "url": "https://www.zachleat.com", "feed": "https://www.zachleat.com/web/feed/" }
|
||||
]
|
||||
import { createClient } from '@supabase/supabase-js'
|
||||
|
||||
const SUPABASE_URL = process.env.SUPABASE_URL
|
||||
const SUPABASE_KEY = process.env.SUPABASE_KEY
|
||||
const supabase = createClient(SUPABASE_URL, SUPABASE_KEY)
|
||||
|
||||
export default async function fetchGenresWithArtists() {
|
||||
const { data, error } = await supabase
|
||||
.from('authors')
|
||||
.select('*')
|
||||
.eq('blogroll', true)
|
||||
.order('name', { ascending: true })
|
||||
|
||||
if (error) {
|
||||
console.error('Error fetching authors with for the blogroll:', error)
|
||||
return []
|
||||
}
|
||||
|
||||
return data
|
||||
}
|
Reference in a new issue