From 8445bce4863dc0cde8a198be34a8431ab32b4713 Mon Sep 17 00:00:00 2001 From: JFronny Date: Tue, 6 Sep 2022 16:03:17 +0200 Subject: [PATCH] Use mdbook for docs --- .gitignore | 3 ++- .gitlab-ci.yml | 17 ++--------------- book.toml | 16 ++++++++++++++++ docs/Commands.md | 13 +++++-------- docs/FileFormats.md | 28 ++-------------------------- docs/SUMMARY.md | 8 ++++++++ docs/Syncing.md | 2 +- mkdocs.yml | 17 ----------------- 8 files changed, 36 insertions(+), 68 deletions(-) create mode 100644 book.toml create mode 100644 docs/SUMMARY.md delete mode 100644 mkdocs.yml diff --git a/.gitignore b/.gitignore index a5727e9..69c7a7d 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ run*/ imgui.ini hs_err_pid* inceptum.log -bin \ No newline at end of file +bin +public \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index aea2b48..7972088 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,10 +1,6 @@ variables: GRADLE_OPTS: "-Dorg.gradle.daemon=false" -stages: - - build - - deploy - default: image: gradle:jdk18 before_script: @@ -100,14 +96,5 @@ portable: only: - master -pages: - image: python:3.8-buster - stage: deploy - script: - - pip install mkdocs - - mkdocs build - artifacts: - paths: - - public - only: - - master +include: + - remote: 'https://jfmods.gitlab.io/scripts/docs.yml' diff --git a/book.toml b/book.toml new file mode 100644 index 0000000..7dd91a4 --- /dev/null +++ b/book.toml @@ -0,0 +1,16 @@ +[book] +authors = ["JFronny"] +language = "en" +multilingual = false +src = "docs" +title = "LibJF" +description = "Inceptum Docs" + +[build] +build-dir = "public" + +[output.html] +git-repository-url = "https://gitlab.com/jfmods/Inceptum" +git-repository-icon = "fa-gitlab" +edit-url-template = "https://gitlab.com/jfmods/Inceptum/edit/master/{path}" +site-url = "https://jfmods.gitlab.io/inceptum" diff --git a/docs/Commands.md b/docs/Commands.md index 7f2ecc7..d6b0780 100644 --- a/docs/Commands.md +++ b/docs/Commands.md @@ -6,12 +6,7 @@ To view up-to-date information on the commands provided by Inceptum, run `incept Inceptum Wrapper looks through the libraries dir and launches the latest available Inceptum version. If it doesn't find a usable version, it will download the latest from GitLab. -Launching is performed through a custom ClassLoader and the wrapper command is prepended to the arguments provided by the user. - -## The "wrapper" command -Inceptum internally uses this command to inform the main Inceptum jar that it was launched through the Inceptum Wrapper and should allow installing updates. -It sets an internal flag and launches the command provided in its arguments. -Manually invoking this command WILL cause problems, so a check has been implemented that should prevent this from starting Inceptum in unintended environments. +Launching is performed through a custom ClassLoader and an internal flag is set to inform the launched version about the wrappers' presence. ## The "batch" command @@ -21,14 +16,16 @@ The batch command has the additional advantage of allowing caches to stay loaded For example, ``` -git pull icesrv +mod update all icesrv run server restart icesrv +run server restart server2 ``` is equivalent to the bash script ```shell #!/bin/sh -inceptum git pull icesrv +inceptum mod update all icesrv inceptum run server restart icesrv +inceptum run server restart server2 ``` diff --git a/docs/FileFormats.md b/docs/FileFormats.md index 7d4ec7d..89df163 100644 --- a/docs/FileFormats.md +++ b/docs/FileFormats.md @@ -21,32 +21,8 @@ All of these are subject to change, though automatic migrations will likely be p // The update channel. Either "CI" or "Stable". // I personally recommend the CI channel as it gets the latest fixes and features quicker "channel": "CI", - // Configuration for the git integration. - // This is also used during instance creation, but you can pretty much ignore it if you use an external client or don't create modpacks - "git": { - // Authentication for git - // Used when pushing or pulling from remote repos - "instanceAuths": { - // The name of an instance. This is equal to its directory name - "someInstance": { - // The username to use for authentication - "username": "yourusername@gmail.com", - // The password to use for authentication - "password": "SomePassword" - }, - "someOtherInstance": { - "username": "yourusername@gmail.com", - "password": "SomePassword" - } - }, - // The username to use when creating commits - "commitUsername": "Inceptum", - // The E-Mail address to use when creating commits. This default address doesn't exist btw - "commitMail": "inceptum@jfronny.gitlab.io", - // Whether to sign commits. - // If you want this for additional security, don't use the git integration - "signCommits": false - } + // The author name to add to packs where the metadata format requires specifying one + "authorName": "Inceptum" } ``` diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md new file mode 100644 index 0000000..4350b7d --- /dev/null +++ b/docs/SUMMARY.md @@ -0,0 +1,8 @@ +# Summary + +- [About](./README.md) +- [Installing](./Installing.md) +- [CLI](./Commands.md) +- [Syncing instances](./Syncing.md) +- [File Formats](./FileFormats.md) +- [Modules](./Modules.md) \ No newline at end of file diff --git a/docs/Syncing.md b/docs/Syncing.md index cddcfe8..f74c3a1 100644 --- a/docs/Syncing.md +++ b/docs/Syncing.md @@ -54,5 +54,5 @@ repository or using any graphical tool is enough to set this up. Users can add an instance created this way in the GUI under File->New Instance->Inceptum. To update the pack, simply create a new commit and push it to your repository. -Users can then update the pack under Edit->Git->Pull or using the Inceptum CLI. +Users can then update the pack by pulling the changes into their instance directory through the normal git CLI. You may also export the pack to other formats to upload it on sites like CurseForge \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml deleted file mode 100644 index e649efc..0000000 --- a/mkdocs.yml +++ /dev/null @@ -1,17 +0,0 @@ -site_name: Inceptum Docs -site_url: https://jfmods.gitlab.io/inceptum -theme: - name: readthedocs - hljs_languages: - - json5 -site_dir: public -repo_url: https://gitlab.com/jfmods/Inceptum -site_description: Documentation for the Inceptum Launcher -site_author: JFronny -nav: - - 'README.md' - - 'Installing.md' - - 'Commands.md' - - 'Syncing.md' - - 'FileFormats.md' - - 'Modules.md' \ No newline at end of file