My personal site. theclashfruit.me
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: top loader (why not?)

+36 -4
+4
app/layout.tsx
··· 3 3 import Script from 'next/script'; 4 4 import localFont from 'next/font/local'; 5 5 6 + import NextTopLoader from 'nextjs-toploader'; 7 + 6 8 import '@wooorm/starry-night/style/both'; 7 9 import '@/styles/globals.scss'; 8 10 ··· 50 52 return ( 51 53 <html lang="en"> 52 54 <body className={`${cantarell.variable} ${monaspaceRadon.variable}`}> 55 + <NextTopLoader color="var(--primary)" /> 56 + 53 57 {children} 54 58 55 59 <Script
+8 -4
app/rss.xml/route.ts
··· 5 5 6 6 import { evaluate } from 'next-mdx-remote-client/rsc'; 7 7 import options from '@/lib/mdx-remote-options'; 8 - import { components } from '@/mdx-components'; 8 + import { desc, not } from 'drizzle-orm'; 9 9 10 10 export async function GET(req: Request) { 11 11 const { renderToStaticMarkup } = await import('react-dom/server'); 12 - 13 - const posts = await db.select().from(postsTable); 12 + 13 + const posts = await db 14 + .select() 15 + .from(postsTable) 16 + .where(not(postsTable.draft)) 17 + .orderBy(desc(postsTable.publishedAt)); 14 18 15 19 const feed = new Feed({ 16 20 title: 'TheClashFruit', ··· 28 32 const { content } = await evaluate({ 29 33 source: p.content, 30 34 options, 31 - components 35 + components: {} 32 36 }); 33 37 34 38 feed.addItem({
+1
package.json
··· 27 27 "next": "16.1.6", 28 28 "next-mdx-remote-client": "^2.1.9", 29 29 "next-request-ip": "^1.0.7", 30 + "nextjs-toploader": "^3.9.17", 30 31 "pg": "^8.20.0", 31 32 "react": "19.2.3", 32 33 "react-dom": "19.2.3",
+23
pnpm-lock.yaml
··· 62 62 next-request-ip: 63 63 specifier: ^1.0.7 64 64 version: 1.0.7 65 + nextjs-toploader: 66 + specifier: ^3.9.17 67 + version: 3.9.17(next@16.1.6(@babel/core@7.29.0)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(sass@1.98.0))(react-dom@19.2.3(react@19.2.3))(react@19.2.3) 65 68 pg: 66 69 specifier: ^8.20.0 67 70 version: 8.20.0 ··· 3227 3230 sass: 3228 3231 optional: true 3229 3232 3233 + nextjs-toploader@3.9.17: 3234 + resolution: {integrity: sha512-9OF0KSSLtoSAuNg2LZ3aTl4hR9mBDj5L9s9DZiFCbMlXehyICGjkIz5dVGzuATU2bheJZoBdFgq9w07AKSuQQw==} 3235 + peerDependencies: 3236 + next: '>= 6.0.0' 3237 + react: '>= 16.0.0' 3238 + react-dom: '>= 16.0.0' 3239 + 3230 3240 no-case@3.0.4: 3231 3241 resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} 3232 3242 ··· 3255 3265 non-error@0.1.0: 3256 3266 resolution: {integrity: sha512-TMB1uHiGsHRGv1uYclfhivcnf0/PdFp2pNqRxXjncaAsjYMoisaQJI+SSZCqRq+VliwRTC8tsMQfmrWjDMhkPQ==} 3257 3267 engines: {node: '>=20'} 3268 + 3269 + nprogress@0.2.0: 3270 + resolution: {integrity: sha512-I19aIingLgR1fmhftnbWWO3dXc0hSxqHQHQb3H8m+K3TnEn/iSeTZZOyvKXWqQESMwuUVnatlCnZdLBZZt2VSA==} 3258 3271 3259 3272 nth-check@2.1.1: 3260 3273 resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} ··· 7395 7408 - '@babel/core' 7396 7409 - babel-plugin-macros 7397 7410 7411 + nextjs-toploader@3.9.17(next@16.1.6(@babel/core@7.29.0)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(sass@1.98.0))(react-dom@19.2.3(react@19.2.3))(react@19.2.3): 7412 + dependencies: 7413 + next: 16.1.6(@babel/core@7.29.0)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(sass@1.98.0) 7414 + nprogress: 0.2.0 7415 + prop-types: 15.8.1 7416 + react: 19.2.3 7417 + react-dom: 19.2.3(react@19.2.3) 7418 + 7398 7419 no-case@3.0.4: 7399 7420 dependencies: 7400 7421 lower-case: 2.0.2 ··· 7424 7445 node-releases@2.0.36: {} 7425 7446 7426 7447 non-error@0.1.0: {} 7448 + 7449 + nprogress@0.2.0: {} 7427 7450 7428 7451 nth-check@2.1.1: 7429 7452 dependencies: