Skip to content

Commit

Permalink
馃悰 atom title with CDATA
Browse files Browse the repository at this point in the history
fix #3
  • Loading branch information
kwaa committed Dec 31, 2021
1 parent 66ca234 commit b5520f9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/routes/atom.xml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import { genPosts } from '$lib/utils/posts'

const render = async (): Promise<string> => `<?xml version='1.0' encoding='utf-8'?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>${site.title}</title>
${site.subtitle ? `<subtitle>${site.subtitle}</subtitle>` : ''}
<title><![CDATA[${site.title}]]></title>
${site.subtitle ? `<subtitle><![CDATA[${site.subtitle}]]></subtitle>` : ''}
<link href="${site.url}" />
<link href="${site.url}/atom.xml" rel="self" />
<updated>${new Date().toJSON()}</updated>
<author>
<name>${site.author.name}</name>
<name><![CDATA[${site.author.name}]]></name>
</author>
<id>${site.url}/</id>
${Object.entries(await genPosts())
Expand Down

0 comments on commit b5520f9

Please sign in to comment.