1
0
Fork 0
mirror of https://github.com/mat-1/matdoesdev.git synced 2025-08-02 14:46:04 +00:00

atom is silly

This commit is contained in:
mat 2024-01-15 00:54:55 -06:00
parent 7682f27c40
commit 220cf92e20

View file

@ -7,10 +7,6 @@ export const prerender = true
export const GET: RequestHandler = async ({ fetch }) => {
const posts = await getPostsUntrimmed()
function item(post: BlogPost) {
const escapedPostHtml = post.html
.replace(/&/g, '&')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
return `
<entry>
<title>${post.title}</title>
@ -18,7 +14,7 @@ export const GET: RequestHandler = async ({ fetch }) => {
<id>https://matdoes.dev/${post.slug}</id>
<published>${post.published}</published>
<updated>${post.published}</updated>
<content type="xhtml">${escapedPostHtml}</content>
<content type="xhtml">${post.html}</content>
</entry>
`
}