mirror of
https://github.com/andatoshiki/toshiki-notebook.git
synced 2026-06-06 03:11:22 +00:00
chore: manually add custom metadata to rss feed infos and remove unused dep
This commit is contained in:
parent
592e22faae
commit
2589ee819a
@ -2,24 +2,22 @@ const fs = require('fs')
|
|||||||
const path = require('path')
|
const path = require('path')
|
||||||
const { Feed } = require('feed')
|
const { Feed } = require('feed')
|
||||||
const { load } = require('./posts.data')
|
const { load } = require('./posts.data')
|
||||||
const { resolveSiteData } = require('vitepress')
|
|
||||||
const url = `https://note.toshiki.dev`
|
const url = `https://note.toshiki.dev`
|
||||||
|
|
||||||
genFeed()
|
genFeed()
|
||||||
|
|
||||||
async function genFeed() {
|
async function genFeed() {
|
||||||
const siteData = await resolveSiteData('.')
|
|
||||||
const posts = await load(true)
|
const posts = await load(true)
|
||||||
const cwd = process.cwd()
|
const cwd = process.cwd()
|
||||||
const feed = new Feed({
|
const feed = new Feed({
|
||||||
title: siteData.title,
|
title: "Toshiki's Notebook",
|
||||||
description: siteData.description,
|
description: "Toshiki's web notebook served via Vitepress!",
|
||||||
id: url,
|
id: url,
|
||||||
link: url,
|
link: url,
|
||||||
language: siteData.lang,
|
language: 'en-US',
|
||||||
image: `${url}/logos/logo-308px.png`,
|
image: `${url}/logos/logo-308px.png`,
|
||||||
favicon: `${url}/favicon.ico`,
|
favicon: `${url}/favicon.ico`,
|
||||||
copyright: siteData.themeConfig.name || '-'
|
copyright: 'Copyright © 2023-2023 Anda Toshiki, LoliLab and Toshiki Dev present'
|
||||||
})
|
})
|
||||||
|
|
||||||
posts.forEach(post => {
|
posts.forEach(post => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user