diff options
-rw-r--r-- | README.md | 17 | ||||
-rw-r--r-- | src/build.ts | 12 |
2 files changed, 21 insertions, 8 deletions
@@ -9,19 +9,24 @@ Currently, only Markdown is supported for policy files. The Front Matter is a YAML document that defines the properties of the policy. #### Required properties -- name: the full name of the policy -- description: a short summary of the policy +- `name`: the full name of the policy +- `description`: a short summary of the policy #### Optional properties -- aliases: an array of path aliases (redirects) -- ignore: prevents the policy file from being built +- `aliases`: an array of path aliases (redirects) +- `ignore`: prevents the policy file from being processed +- `autoupdate`: bindings for [Policybot](https://gitlab.com/evol/policybot) ### Example ```md --- name: Policy Name -description: A short sumary +description: A short summary aliases: [foo, bar] + +autoupdate: + forums: {forum: 1, topic: 69, post: 420} + wiki: Protected_Wiki_Page --- # title @@ -35,7 +40,7 @@ content ## Generating the static site ### Dependencies -- GNU Make (pre-installed in most linux distros) +- GNU Make (available in the repos of most linux distros) - [Deno](https://deno.land) 1.x (can be installed with `make deno`) ```sh diff --git a/src/build.ts b/src/build.ts index 94022dc..19c6141 100644 --- a/src/build.ts +++ b/src/build.ts @@ -3,10 +3,18 @@ import * as yaml from "https://deno.land/x/js_yaml_port/js-yaml.js" // the structure of the front matter interface PolicyYFM { - name: string + name: string; description: string; aliases?: string[]; - ignore?: boolean; + ignore?: boolean; + autoupdate?: { + forums?: { + forum?: number; + topic?: number; + post: number; + }; + wiki?: string; + }; } const decoder = new TextDecoder("utf-8"); |