diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 9f88e69b..5c234615 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -30,7 +30,23 @@ jobs: chmod +x docfx/docfx - name: Generate documentation - run: ./docfx/docfx docs/docfx.json + env: + REPOSITORY_OWNER: ${{ github.repository_owner }} + REPOSITORY_NAME: ${{ github.event.repository.name }} + run: | + if [ "$REPOSITORY_NAME" = "$REPOSITORY_OWNER.github.io" ]; then + DOCFX_BASE_URL="https://${REPOSITORY_OWNER}.github.io/" + else + DOCFX_BASE_URL="https://${REPOSITORY_OWNER}.github.io/${REPOSITORY_NAME}/" + fi + + jq --arg base "$DOCFX_BASE_URL" \ + '.build.globalMetadata._appBaseUrl = $base' \ + docs/docfx.json > docs/docfx.generated.json + + ./docfx/docfx docs/docfx.generated.json + + rm docs/docfx.generated.json - name: Checkout gh-pages uses: actions/checkout@v4 diff --git a/docs/DiscordIcon.png b/docs/DiscordIcon.png new file mode 100644 index 00000000..957c20be Binary files /dev/null and b/docs/DiscordIcon.png differ diff --git a/docs/docfx.json b/docs/docfx.json index 0875132e..eb3320a0 100644 --- a/docs/docfx.json +++ b/docs/docfx.json @@ -42,6 +42,9 @@ "files": ["**"], "src": "../InscryptionCommunityPatch/Assets", "dest": "resources/community/assets" + }, + { + "files": ["DiscordIcon.png"] } ], "content": [ diff --git a/docs/template/api_wiki/layout/_master.tmpl b/docs/template/api_wiki/layout/_master.tmpl new file mode 100644 index 00000000..045682c3 --- /dev/null +++ b/docs/template/api_wiki/layout/_master.tmpl @@ -0,0 +1,175 @@ +{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}} +{{!include(/^public/.*/)}} +{{!include(favicon.ico)}} +{{!include(logo.svg)}} + + +
+ + {{#redirect_url}} + + {{/redirect_url}} + {{^redirect_url}} +