deno.land / x / lume@v2.1.4 / tests / feed.test.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { assertSiteSnapshot, build, getSite } from "./utils.ts";import feed from "../plugins/feed.ts";
Deno.test("RSS plugin", async (t) => { const site = getSite({ src: "normal", location: new URL("https://example.com/"), });
site.use( feed({ output: ["feed.json", "feed.rss"], info: { published: new Date("2020-01-01"), generator: "https://lume.land", }, items: { title: (data) => data.title?.toUpperCase(), updated: "=date", }, }), ); site.ignore("static.yml");
// build page await build(site);
// compare to snapshot await assertSiteSnapshot(t, site);});
lume

Version Info

Tagged at
a month ago