summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2021-01-09 19:51:56 +0000
committergumiko <git@gumi.ca>2021-01-09 19:51:56 +0000
commit90fd3155ad57efc06c763f45a89ac4668e9be1e3 (patch)
treee0d292c62d902cb934d314d8aea35141696f54d7
parent9aa990e10ccb04c5d6908fe18d53dd82d581b178 (diff)
downloadpolicies-90fd3155ad57efc06c763f45a89ac4668e9be1e3.tar.gz
policies-90fd3155ad57efc06c763f45a89ac4668e9be1e3.tar.bz2
policies-90fd3155ad57efc06c763f45a89ac4668e9be1e3.tar.xz
policies-90fd3155ad57efc06c763f45a89ac4668e9be1e3.zip
[ci skip] update the YFM type definition
-rw-r--r--src/build.ts17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/build.ts b/src/build.ts
index fb90814..772570f 100644
--- a/src/build.ts
+++ b/src/build.ts
@@ -1,18 +1,21 @@
import { Marked } from "https://deno.land/x/markdown/mod.ts"
-// the structure of the front matter
+/** references a forum post */
+type ForumEntry = {
+ forum?: number;
+ topic?: number;
+ post: number;
+} | number;
+
+/** the structure of the front matter */
interface PolicyYFM {
name: string;
description: string;
aliases?: string[];
ignore?: boolean;
autoupdate?: {
- forums?: {
- forum?: number;
- topic?: number;
- post: number;
- };
- wiki?: string;
+ forums?: ForumEntry | ForumEntry[];
+ wiki?: string | string[];
};
}