diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2020-05-17 15:41:56 +0000 |
|---|---|---|
| committer | s-ol <s+removethis@s-ol.nu> | 2025-03-02 14:24:49 +0000 |
| commit | 406da94f13f47a9c7aef6b9c11cfe057772630cf (patch) | |
| tree | dd98e12eddd421e2883c90239cb10225bb75b07e /docs/gen/md | |
| parent | builtin/trae: print literals literally (diff) | |
| download | alive-406da94f13f47a9c7aef6b9c11cfe057772630cf.tar.gz alive-406da94f13f47a9c7aef6b9c11cfe057772630cf.zip | |
split guide into multiple pages
Diffstat (limited to 'docs/gen/md')
| -rwxr-xr-x | docs/gen/md | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/docs/gen/md b/docs/gen/md index 32d4fdd..f22268c 100755 --- a/docs/gen/md +++ b/docs/gen/md @@ -1,5 +1,5 @@ #!/usr/bin/env moon -import layout, autoref from require 'docs.gen.layout' +import layout, subnav, autoref from require 'docs.gen.layout' import compile from require 'discount' export OUT, ESCAPE @@ -18,6 +18,8 @@ ESCAPE = (str) -> (str\gsub '([*`])', '\\%1') { OUT, file } = arg - -contents = slurp file -spit OUT, layout compile (autoref contents), 'githubtags', 'fencedcode' +content = compile (autoref slurp file), 'githubtags', 'fencedcode' +if #arg > 2 + sub = subnav [a for a in *arg[3,]] + content.body = table.concat { sub, content.body }, '\n\n' +spit OUT, layout content |
