mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-17 12:01:33 +02:00
refactor: separate rss and atom generation, optimize back button logic (#22)
* refactor: separate rss and atom generation, optimize back button logic, remove redundant whitespace in component styles * fix: add missing <published> tag in atom feed
This commit is contained in:
parent
4b05ba9caf
commit
fc1cc050bc
14 changed files with 576 additions and 418 deletions
|
@ -2,7 +2,7 @@ import type { CollectionEntry } from 'astro:content'
|
|||
import { defaultLocale } from '@/config'
|
||||
import MarkdownIt from 'markdown-it'
|
||||
|
||||
type ExcerptScene = 'list' | 'meta' | 'og' | 'rss'
|
||||
type ExcerptScene = 'list' | 'meta' | 'og' | 'feed'
|
||||
|
||||
const parser = new MarkdownIt()
|
||||
const isCJKLang = (lang: string) => ['zh', 'zh-tw', 'ja'].includes(lang)
|
||||
|
@ -24,7 +24,7 @@ const EXCERPT_LENGTHS: Record<ExcerptScene, {
|
|||
cjk: 70,
|
||||
other: 140,
|
||||
},
|
||||
rss: {
|
||||
feed: {
|
||||
cjk: 70,
|
||||
other: 140,
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue