feat: update site configuration and enhance feed structure

- Changed project name and title in the site configuration to "Innei's Afilmory".
- Updated author name in the configuration to "Innei" and adjusted the URL accordingly.
- Added a new feed structure in the configuration to include follow challenge details.
- Enhanced the feed sitemap generation to incorporate the new feed data.

Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
Innei
2025-06-12 21:42:04 +08:00
parent 30d2a14e43
commit bc43458b2f
3 changed files with 38 additions and 19 deletions

View File

@@ -4,6 +4,8 @@ import { fileURLToPath } from 'node:url'
import type { Plugin } from 'vite'
import type { SiteConfig } from '../../site.config'
interface PhotoData {
id: string
title: string
@@ -24,18 +26,6 @@ interface PhotoData {
isLivePhoto: boolean
}
interface SiteConfig {
name: string
title: string
description: string
url: string
author: {
name: string
url: string
avatar?: string
}
}
const __dirname = fileURLToPath(new URL('.', import.meta.url))
export function createFeedSitemapPlugin(siteConfig: SiteConfig): Plugin {
@@ -135,6 +125,17 @@ ${exifTags}
<lastBuildDate>${lastBuildDate}</lastBuildDate>
<pubDate>${now}</pubDate>
<ttl>60</ttl>
<copyright>Copyright ${config.author.name}</copyright>
${
config.feed?.folo?.challenge
? `
<follow_challenge>
<feedId>${config.feed?.folo?.challenge.feedId}</feedId>
<userId>${config.feed?.folo?.challenge.userId}</userId>
</follow_challenge>
`
: ''
}
<atom:link href="${config.url}/feed.xml" rel="self" type="application/rss+xml" />
<managingEditor>${config.author.name}</managingEditor>
<webMaster>${config.author.name}</webMaster>