Use absolute URLs in Atom feed

This commit is contained in:
2024-10-21 21:18:16 +02:00
parent 74f7b89c15
commit ffd709d2f9
4 changed files with 10 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
import { render as renderMarkdown } from "@deno/gfm";
import { nip19 } from "@nostr/tools";
import { NEvent } from "../nostr.ts";
import { render as renderMarkdown } from "@deno/gfm";
import config from "../config.ts";
export default class Article {
event: NEvent;
@@ -14,6 +15,10 @@ export default class Article {
return tag ? tag[1] : "";
}
get url(): string {
return `${config.base_url}/${this.naddr}`
}
get title(): string {
const tag = this.event.tags.find((t) => t[0] === "title");
return tag ? tag[1] : "Untitled";