Skip to content

Commit

Permalink
fix: update text tooltip, close #419
Browse files Browse the repository at this point in the history
  • Loading branch information
YunYouJun committed Jul 28, 2024
1 parent 58cf2ed commit 4cdd79e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/valaxy/node/modules/rss.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ export async function build(options: ResolvedValaxyOptions) {

// render excerpt
// default excerpt content length: 100
const html = markdown.render(excerpt || options.config.modules.rss.fullText ? content : content.slice(0, 100))
const fullText = options.config.modules.rss.fullText
const html = markdown.render(excerpt || fullText ? content : content.slice(0, 100))
.replace('src="/', `src="${DOMAIN}/`)

if (data.image?.startsWith('/'))
Expand All @@ -114,8 +115,8 @@ export async function build(options: ResolvedValaxyOptions) {
const link = DOMAIN + i.replace(`${options.userRoot}/pages`, '').replace(/\.md$/, '')
const tip = `<br/><p>${
lang === 'zh-CN'
? `访问 <a href="${link}" target="_blank">${link}</a> 阅读全文。`
: `Visit <a href="${link}" target="_blank">${link}</a> to read more.`
? `访问 <a href="${link}" target="_blank">${link}</a> ${fullText ? '查看原文' : '阅读全文'}。`
: `Visit <a href="${link}" target="_blank">${link}</a> to ${fullText ? 'view original article' : 'read more'}.`
}</p>`

posts.push({
Expand Down

1 comment on commit 4cdd79e

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 Published on https://yun.valaxy.site as production
🚀 Deployed on https://66a68dee6617976e4f242d2f--valaxy.netlify.app

Please sign in to comment.