This commit is contained in:
2024-10-28 15:01:17 +01:00
parent cea96e170d
commit 1e081c83e5
9 changed files with 101 additions and 5 deletions

View File

@@ -39,6 +39,13 @@ export default class Article {
return tag ? tag[1] : "";
}
get tags(): string[] {
return this.event.tags
.filter((t) => t[0] === "t")
.filter((t) => t[1] !== "")
.map((t) => t[1]);
}
get publishedAt(): number {
const tag = this.event.tags.find((t) => t[0] === "published_at");
return tag ? parseInt(tag[1]) : this.event.created_at;