From 3cafd2922128eb72c07643cff5cfdc76e19bb198 Mon Sep 17 00:00:00 2001 From: aNNiMON Date: Mon, 27 Nov 2023 19:52:54 +0200 Subject: [PATCH] Rearrange module pages --- docs/src/docgen-md.own | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/docs/src/docgen-md.own b/docs/src/docgen-md.own index 587c886..622f2e1 100644 --- a/docs/src/docgen-md.own +++ b/docs/src/docgen-md.own @@ -1,4 +1,4 @@ -use std, types, files, yaml, functional +use std, types, files, json, yaml, functional INPUT_PATH_FMT = "./modules/%s.yml" OUTPUT_DIR_FMT = "../docs/%s/modules" @@ -7,33 +7,39 @@ OUTPUT_PATH_FMT = OUTPUT_DIR_FMT + "/%s.md" LANGS = ["en", "ru"] MODULES = [ "std", - "types", - "math", "date", - "files", - "http", - "socket", "downloader", + "files", + "functional", + "http", + "java", + "math", + "ounit", + "regex", + "robot", + "socket", + "types", + // formats "base64", "json", "yaml", - "zip", "gzip", - "functional", - "robot", - "ounit", + "zip" + + // Desktop-only "canvas", "canvasfx", "forms", - "java", - "jdbc", - "regex", + "jdbc" + + // Android-only "android", "canvas_android", "forms_android", - "imageprocessing_android", - "gps_android" + "gps_android", + "imageprocessing_android" ] + messages = { "constants": {"en": "Constants", "ru": "Константы"}, "functions": {"en": "Functions", "ru": "Функции"}, @@ -43,10 +49,9 @@ messages = { } // Write modules pages to vuepress config +modulesPages = jsonencode(map(MODULES, def(m) = m + ".md")) f = fopen("../docs/.vuepress/configs/modules.js", "w") -writeLine(f, "export default [") -writeLine(f, stream(MODULES).map(def(m) = " \"%s.md\"".sprintf(m)).joining(",\n")) -writeLine(f, "]") +writeLine(f, "export default " + modulesPages) flush(f) fclose(f)