diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 953194c..3feca49 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -12,3 +12,7 @@ updates: package-ecosystem: github-actions schedule: interval: daily + - directory: / + package-ecosystem: gitsubmodule + schedule: + interval: daily diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..1a83c73 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,50 @@ +name: Docs + +on: + push: + branches: [main] + +permissions: + actions: read + pages: write + id-token: write + +concurrency: + group: pages + cancel-in-progress: false + +jobs: + generate-docs: + runs-on: ubuntu-latest + + environment: + name: github-pages + url: ${{ steps.deployment.output.page_url }} + + steps: + - name: Checkout + uses: actions/checkout@v6 + with: + submodules: true + + - name: Setup .NET + uses: actions/setup-dotnet@v5 + with: + dotnet-version: 10.x + + - name: Build + run: dotnet build -c Release + + - name: DocFX build + working-directory: docs + run: dnx docfx --yes + continue-on-error: false + + - name: Upload assets + uses: actions/upload-pages-artifact@v4 + with: + path: docs/_site + + - name: Deploy + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..34f4de1 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "docs/silksong-modding-style-docfx"] + path = docs/silksong-modding-style-docfx + url = https://github.com/silksong-modding/silksong-modding-style-docfx diff --git a/README.md b/README.md new file mode 100644 index 0000000..8976848 --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +# Silksong.ModMenu + +The standard menu-modification mod for Silksong. It provides a small but powerful set of features for mods to use. + +This mod also adds a 'Mod Options' menu to the main Options menu by default. + +For documentation and examples, see the [documentation](https://docs.silksong-modding.org/Silksong.DataManager). diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..ff96cc0 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,8 @@ +/**/DROP/ +/**/TEMP/ +/**/packages/ +/**/bin/ +/**/obj/ +_site +/api/*.yml +/api/.manifest diff --git a/docs/articles/toc.yml b/docs/articles/toc.yml new file mode 100644 index 0000000..a8baf40 --- /dev/null +++ b/docs/articles/toc.yml @@ -0,0 +1,2 @@ +- name: Getting Started +- href: ../index.md diff --git a/docs/docfx.json b/docs/docfx.json new file mode 100644 index 0000000..da8d754 --- /dev/null +++ b/docs/docfx.json @@ -0,0 +1,48 @@ +{ + "$schema": "https://raw.githubusercontent.com/dotnet/docfx/main/schemas/docfx.schema.json", + "metadata": [ + { + "src": [ + { + "src": "../Silksong.ModMenu", + "files": [ + "**/*.csproj" + ] + } + ], + "dest": "api", + "filter": "filterconfig.yml" + } + ], + "build": { + "content": [ + { + "files": [ + "**/*.{md,yml}" + ], + "exclude": [ + "_site/**" + ] + } + ], + "resource": [ + { + "files": [ + "images/**" + ] + } + ], + "output": "_site", + "template": [ + "default", + "modern", + "silksong-modding-style-docfx" + ], + "globalMetadata": { + "_appName": "ModMenu", + "_appTitle": "ModMenu", + "_enableSearch": true, + "pdf": false + } + } +} diff --git a/docs/filterconfig.yml b/docs/filterconfig.yml new file mode 100644 index 0000000..78af075 --- /dev/null +++ b/docs/filterconfig.yml @@ -0,0 +1,4 @@ +### YamlMime:ManagedReference +apiRules: + - exclude: + uidRegex: 'Silksong\.ModMenu\.ModMenuPlugin' diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..8eb9904 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,29 @@ +# ModMenu + +[![NuGet Version](https://img.shields.io/nuget/v/Silksong.ModMenu)](https://www.nuget.org/packages/Silksong.ModMenu) + +The standard menu-modification mod for Silksong. It provides a small but powerful set of features for mods to use. + +This mod also adds a 'Mod Options' menu to the main Options menu by default. + +## Usage + +Add the following line to your .csproj: +``` + +``` +The most up to date version number can be retrieved from [Nuget](https://www.nuget.org/packages/Silksong.ModMenu). + +You will also need to add a dependency to your thunderstore.toml: +``` +silksong_modding-ModMenu = "0.4.5" +``` +The version number does not matter hugely, but the most up to date number can be retrieved from +[Thunderstore](https://thunderstore.io/c/hollow-knight-silksong/p/silksong_modding/ModMenu/). +If manually uploading, instead copy the dependency string from the Thunderstore link. + +ModMenu should be added as a BepInEx dependency by putting the following attribute +onto your plugin class, below the BepInAutoPlugin attribute. +``` +[BepInDependency(Silksong.ModMenu.ModMenuPlugin.Id)] +``` diff --git a/docs/silksong-modding-style-docfx b/docs/silksong-modding-style-docfx new file mode 160000 index 0000000..168e249 --- /dev/null +++ b/docs/silksong-modding-style-docfx @@ -0,0 +1 @@ +Subproject commit 168e249d0a23cc92e26e0d9b231cd21ff121d4f8 diff --git a/docs/toc.yml b/docs/toc.yml new file mode 100644 index 0000000..9a84d8e --- /dev/null +++ b/docs/toc.yml @@ -0,0 +1,4 @@ +- name: Articles + href: articles/ +- name: API Documentation + href: api/