WIP Tags
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user