mirror of
https://github.com/OpenCut-app/OpenCut.git
synced 2026-07-13 21:52:53 +02:00
fix: import site info from correct source
This commit is contained in:
@@ -1,16 +1,16 @@
|
|||||||
import { Feed } from 'feed';
|
import { Feed } from 'feed';
|
||||||
import { getPosts } from '@/lib/blog-query';
|
import { getPosts } from '@/lib/blog-query';
|
||||||
import { SITE_INFO } from '../metadata';
|
import { SITE_INFO, SITE_URL } from '@/constants/site';
|
||||||
|
|
||||||
export async function GET() {
|
export async function GET() {
|
||||||
try {
|
try {
|
||||||
const { posts } = await getPosts();
|
const { posts } = await getPosts();
|
||||||
|
|
||||||
const feed = new Feed({
|
const feed = new Feed({
|
||||||
title: 'OpenCut Blog',
|
title: `${SITE_INFO.title} Blog`,
|
||||||
description: SITE_INFO.description,
|
description: SITE_INFO.description,
|
||||||
id: `${SITE_INFO.url}`,
|
id: `${SITE_URL}`,
|
||||||
link: `${SITE_INFO.url}/blog/`,
|
link: `${SITE_URL}/blog/`,
|
||||||
language: 'en',
|
language: 'en',
|
||||||
image: `${SITE_INFO.openGraphImage}`,
|
image: `${SITE_INFO.openGraphImage}`,
|
||||||
favicon: `${SITE_INFO.favicon}`,
|
favicon: `${SITE_INFO.favicon}`,
|
||||||
@@ -22,8 +22,8 @@ export async function GET() {
|
|||||||
for (const post of posts) {
|
for (const post of posts) {
|
||||||
feed.addItem({
|
feed.addItem({
|
||||||
title: post.title,
|
title: post.title,
|
||||||
id: `${SITE_INFO.url}/blog/${post.slug}`,
|
id: `${SITE_URL}/blog/${post.slug}`,
|
||||||
link: `${SITE_INFO.url}/blog/${post.slug}`,
|
link: `${SITE_URL}/blog/${post.slug}`,
|
||||||
description: post.description,
|
description: post.description,
|
||||||
author: post.authors.map((author) => ({
|
author: post.authors.map((author) => ({
|
||||||
name: author.name,
|
name: author.name,
|
||||||
|
|||||||
Reference in New Issue
Block a user