diff options
| author | s-ol <s+removethis@s-ol.nu> | 2022-10-20 14:44:30 +0000 |
|---|---|---|
| committer | s-ol <s+removethis@s-ol.nu> | 2025-03-02 14:24:49 +0000 |
| commit | 4522e3257875a5ba8911a1ebbbaa73e99a8010bb (patch) | |
| tree | a20e838348c3ca5274e2bb8380731e659c0d5460 /docs | |
| parent | update flake (diff) | |
| download | alive-4522e3257875a5ba8911a1ebbbaa73e99a8010bb.tar.gz alive-4522e3257875a5ba8911a1ebbbaa73e99a8010bb.zip | |
docs: don't repeat aliased entries
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/gen/layout.moon | 6 | ||||
| -rwxr-xr-x | docs/gen/module | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/docs/gen/layout.moon b/docs/gen/layout.moon index 4c75749..895baaa 100644 --- a/docs/gen/layout.moon +++ b/docs/gen/layout.moon @@ -20,11 +20,15 @@ render_meta = (meta) -> render = (name, result, prefix=nil, index=false) -> import div, label, code, ul, li, i, a, pre from dom - id = if prefix then "#{prefix}/#{name}" else name + prefix = if prefix then prefix .. "/" else "" + id = prefix .. name typestr = i tostring result.type assert result.meta, "#{id} doesn't have any metadata!" summary = assert result.meta.summary, "#{id} doesn't have a summary!" + if result.meta.name != name + summary = i "alias of ", a (code result.meta.name), href: "##{prefix}#{result.meta.name}" + if index div { label (a (code name), href: "##{id}"), ' (', typestr, '):  – ' diff --git a/docs/gen/module b/docs/gen/module index e6f4e89..d7a8e76 100755 --- a/docs/gen/module +++ b/docs/gen/module @@ -45,5 +45,8 @@ spit OUT, layout li render key, node.result, nil, true h3 'details' ul for key, node in opairs raw.values + if node.result.meta and node.result.meta.name != key + continue + li render key, node.result }, '' |
