From e84137dd8d2ecb9fdd87b09497c3c0b87070be37 Mon Sep 17 00:00:00 2001 From: JFronny Date: Mon, 30 Sep 2024 17:39:35 +0200 Subject: [PATCH] docs: convert to vitepress --- .gitignore | 5 ++- .woodpecker.yml | 2 +- book.toml | 16 --------- docs/.vitepress/config.mts | 56 +++++++++++++++++++++++++++++ docs/SUMMARY.md | 18 ---------- docs/config/{README.md => index.md} | 0 docs/{README.md => index.md} | 0 docs/libjf-web-v1.md | 2 +- package.json | 10 ++++++ 9 files changed, 72 insertions(+), 37 deletions(-) delete mode 100644 book.toml create mode 100644 docs/.vitepress/config.mts delete mode 100644 docs/SUMMARY.md rename docs/config/{README.md => index.md} (100%) rename docs/{README.md => index.md} (100%) create mode 100644 package.json diff --git a/.gitignore b/.gitignore index 8b155d3..5f90fd7 100644 --- a/.gitignore +++ b/.gitignore @@ -123,4 +123,7 @@ runs/ bin .project .settings -/public \ No newline at end of file +/public +/docs/.vitepress/cache +/node_modules +/package-lock.json \ No newline at end of file diff --git a/.woodpecker.yml b/.woodpecker.yml index 7cdb17f..21b355a 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,2 +1,2 @@ -#link https://pages.frohnmeyer-wds.de/scripts/docs.yml +#link https://pages.frohnmeyer-wds.de/scripts/vitepress.yml #link https://pages.frohnmeyer-wds.de/scripts/jfmod.yml \ No newline at end of file diff --git a/book.toml b/book.toml deleted file mode 100644 index a1251b9..0000000 --- a/book.toml +++ /dev/null @@ -1,16 +0,0 @@ -[book] -authors = ["JFronny"] -language = "en" -multilingual = false -src = "docs" -title = "LibJF" -description = "Documentation for the LibJF library" - -[build] -build-dir = "public" - -[output.html] -git-repository-url = "https://git.frohnmeyer-wds.de/JfMods/LibJF" -git-repository-icon = "fa-git-alt" -edit-url-template = "https://git.frohnmeyer-wds.de/JfMods/LibJF/_edit/master/{path}" -site-url = "https://pages.frohnmeyer-wds.de/JfMods/LibJF/" diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts new file mode 100644 index 0000000..cb6acd8 --- /dev/null +++ b/docs/.vitepress/config.mts @@ -0,0 +1,56 @@ +import { defineConfig } from 'vitepress' + +// https://vitepress.dev/reference/site-config +export default defineConfig({ + title: "LibJF", + description: "Documentation for the LibJF library", + themeConfig: { + // https://vitepress.dev/reference/default-theme-config + nav: [ + { text: 'Modrinth', link: 'https://modrinth.com/mod/libjf' }, + { text: 'CurseForge', link: 'https://www.curseforge.com/minecraft/mc-mods/libjf' } + ], + + sidebar: [ + { + text: 'Modules', + collapsed: false, + items: [ + { text: 'libjf-base', link: '/libjf-base.md' }, + { + text: 'Config', + collapsed: false, + link: '/config/index.md', + items: [ + { text: 'libjf-config-core-v2', link: '/config/libjf-config-core-v2.md' }, + { text: 'libjf-config-compiler-plugin-v2', link: '/config/libjf-config-compiler-plugin-v2.md' }, + { text: 'libjf-config-commands', link: '/config/libjf-config-commands.md' }, + { text: 'libjf-config-ui-tiny', link: '/config/libjf-config-ui-tiny.md' } + ] + }, + { text: 'libjf-devutil', link: '/libjf-devutil.md' }, + { text: 'libjf-data-v0', link: '/libjf-data-v0.md' }, + { text: 'libjf-data-manipulation-v0', link: '/libjf-data-manipulation-v0.md' }, + { text: 'libjf-translate-v1', link: '/libjf-translate-v1.md' }, + { text: 'libjf-unsafe-v0', link: '/libjf-unsafe-v0.md' }, + { text: 'libjf-web-v1', link: '/libjf-web-v1.md' } + ] + } + ], + + socialLinks: [ + { icon: 'github', link: 'https://git.frohnmeyer-wds.de/JfMods/LibJF' } + ], + + search: { + provider: "local" + }, + }, + outDir: '../public', + base: '/JfMods/LibJF/', + mpa: true, + lang: 'en-US', + sitemap: { + hostname: 'https://pages.frohnmeyer-wds.de/JfMods/LibJF/' + } +}) diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md deleted file mode 100644 index 6a73656..0000000 --- a/docs/SUMMARY.md +++ /dev/null @@ -1,18 +0,0 @@ -# Summary - -- [About](./README.md) - -# Modules - -- [libjf-base](./libjf-base.md) -- [Config](./config/README.md) - - [libjf-config-core-v2](./config/libjf-config-core-v2.md) - - [libjf-config-compiler-plugin-v2](./config/libjf-config-compiler-plugin-v2.md) - - [libjf-config-commands](./config/libjf-config-commands.md) - - [libjf-config-ui-tiny](./config/libjf-config-ui-tiny.md) -- [libjf-devutil](./libjf-devutil.md) -- [libjf-data-v0](./libjf-data-v0.md) -- [libjf-data-manipulation-v0](./libjf-data-manipulation-v0.md) -- [libjf-translate-v1](./libjf-translate-v1.md) -- [libjf-unsafe-v0](./libjf-unsafe-v0.md) -- [libjf-web-v1](./libjf-web-v1.md) \ No newline at end of file diff --git a/docs/config/README.md b/docs/config/index.md similarity index 100% rename from docs/config/README.md rename to docs/config/index.md diff --git a/docs/README.md b/docs/index.md similarity index 100% rename from docs/README.md rename to docs/index.md diff --git a/docs/libjf-web-v1.md b/docs/libjf-web-v1.md index 5a9e1b3..b6dd486 100644 --- a/docs/libjf-web-v1.md +++ b/docs/libjf-web-v1.md @@ -16,4 +16,4 @@ Implement WebInit and register it as a libjf:web entrypoint. To enable the serve ``` Please be aware that your entrypoint may be called multiple times during one session. You can register content providers using the register* methods on the WebServer parameter of your entrypoint. -Please do not store it in a field, you may instead use WebServer.getInstance() if you wish to access it elsewhere. \ No newline at end of file +Please do not store it in a field, you may instead use `WebServer.getInstance()` if you wish to access it elsewhere. \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..253bbad --- /dev/null +++ b/package.json @@ -0,0 +1,10 @@ +{ + "devDependencies": { + "vitepress": "^1.3.4" + }, + "scripts": { + "docs:dev": "vitepress dev docs", + "docs:build": "vitepress build docs", + "docs:preview": "vitepress preview docs" + } +} \ No newline at end of file