Skip to content

Commit

Permalink
fix(rss): fullText instead of excerpt, close #471
Browse files Browse the repository at this point in the history
  • Loading branch information
YunYouJun committed Oct 30, 2024
1 parent 1536e57 commit e42ab32
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions packages/valaxy-theme-yun/components/YunLinkItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,13 @@ useMotion(itemRef, {
}"
>
<a
class="yun-link-url" p="x-4 y-2" :href="link.url" :title="link.name"
class="yun-link-url" p="x-4 y-2"
:href="link.url" :title="link.name"
alt="portrait" rel="friend" target="_blank"
>
<div class="yun-link-left">
<img
class="yun-link-avatar" width="64" height="64" w="16" h="16"
class="yun-link-avatar w-16 h-16 aspect-ratio-1" width="64" height="64"
loading="lazy"
:src="link.avatar" :alt="link.name"
@error="onError"
Expand Down
4 changes: 2 additions & 2 deletions packages/valaxy/node/modules/rss.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ export async function build(options: ResolvedValaxyOptions) {
// render excerpt
// default excerpt content length: 100
const fullText = options.config.modules.rss.fullText
const defaultContent = fullText ? content : content.slice(0, 100)
const html = markdown.render(excerpt || defaultContent)
const rssContent = fullText ? content : (excerpt || content.slice(0, 100))
const html = markdown.render(rssContent)
.replace('src="/', `src="${DOMAIN}/`)

if (data.image?.startsWith('/'))
Expand Down

0 comments on commit e42ab32

Please # to comment.