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

@@ -5,12 +5,20 @@
"url": "https://afilmory.innei.in/",
"accentColor": "#007bff",
"author": {
"name": "Photo Gallery",
"name": "Innei",
"url": "https://innei.in/",
"avatar": "https://cdn.jsdelivr.net/gh/Innei/static@master/avatar.png"
},
"social": {
"twitter": "@__oQuery",
"github": "Innei"
},
"feed": {
"folo": {
"challenge": {
"feedId": "155982289762921472",
"userId": "41312624216137728"
}
}
}
}

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>

View File

@@ -2,7 +2,7 @@ import { merge } from 'es-toolkit/compat'
import userConfig from './config.json'
interface SiteConfig {
export interface SiteConfig {
name: string
title: string
description: string
@@ -10,6 +10,16 @@ interface SiteConfig {
accentColor: string
author: Author
social?: Social
feed?: Feed
}
interface Feed {
folo?: {
challenge?: {
feedId: string
userId: string
}
}
}
interface Author {
name: string
@@ -22,16 +32,16 @@ interface Social {
}
const defaultConfig: SiteConfig = {
name: "Innei's Photo Gallery",
title: "Innei's Photo Gallery",
name: "Innei's Afilmory",
title: "Innei's Afilmory",
description:
'Capturing beautiful moments in life, documenting daily warmth and emotions through my lens.',
url: 'https://gallery.innei.in',
url: 'https://afilmory.innei.in',
accentColor: '#007bff',
author: {
name: 'Photo Gallery',
name: 'Innei',
url: 'https://innei.in/',
avatar: '//cdn.jsdelivr.net/gh/Innei/static@master/avatar.png',
avatar: 'https://cdn.jsdelivr.net/gh/Innei/static@master/avatar.png',
},
social: {
twitter: '@__oQuery',