diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-01-13 19:33:35 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-01-13 19:37:50 +0900 |
| commit | b36def683cb0bfe251c623c826ec7918b69a96b2 (patch) | |
| tree | 267c73086d7445f92ab45f407272c227ae83e4cb /vhosts/blog/nuldoc-src/pages/AtomPage.tsx | |
| parent | b14dd149e1b5f75bc494623181b19970ef830dec (diff) | |
| download | nsfisis.dev-b36def683cb0bfe251c623c826ec7918b69a96b2.tar.gz nsfisis.dev-b36def683cb0bfe251c623c826ec7918b69a96b2.tar.zst nsfisis.dev-b36def683cb0bfe251c623c826ec7918b69a96b2.zip | |
refactor(blog/nuldoc): use JSX notation to generate Atom pages
Diffstat (limited to 'vhosts/blog/nuldoc-src/pages/AtomPage.tsx')
| -rw-r--r-- | vhosts/blog/nuldoc-src/pages/AtomPage.tsx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/vhosts/blog/nuldoc-src/pages/AtomPage.tsx b/vhosts/blog/nuldoc-src/pages/AtomPage.tsx new file mode 100644 index 00000000..21c3bfaf --- /dev/null +++ b/vhosts/blog/nuldoc-src/pages/AtomPage.tsx @@ -0,0 +1,26 @@ +import { Feed } from "../generators/atom.ts"; + +export default function AtomPage({ feed }: { feed: Feed }) { + return ( + <feed xmlns="http://www.w3.org/2005/Atom"> + <id>{feed.id}</id> + <title>{feed.title}</title> + <link rel="alternate" href={feed.linkToAlternate} /> + <link rel="self" href={feed.linkToSelf} /> + <author> + <name>{feed.author}</name> + </author> + <updated>{feed.updated}</updated> + {feed.entries.map((entry) => ( + <entry> + <id>{entry.id}</id> + <link rel="alternate" href={entry.linkToAlternate} /> + <title>{entry.title}</title> + <summary>{entry.summary}</summary> + <published>{entry.published}</published> + <updated>{entry.updated}</updated> + </entry> + ))} + </feed> + ); +} |
