{"id":20555297,"url":"https://github.com/sinytra/wikitoolkit","last_synced_at":"2025-06-15T23:03:47.818Z","repository":{"id":259796384,"uuid":"847079531","full_name":"Sinytra/WikiToolkit","owner":"Sinytra","description":"Sinytra Wiki Gradle Dev Toolkit","archived":false,"fork":false,"pushed_at":"2025-02-10T14:23:19.000Z","size":134,"stargazers_count":6,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-07T13:25:02.609Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Sinytra.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"Sinytra","open_collective":"Sinytra"}},"created_at":"2024-08-24T19:37:09.000Z","updated_at":"2025-02-10T14:23:24.000Z","dependencies_parsed_at":"2024-10-28T03:18:19.339Z","dependency_job_id":"7e8882af-e5f2-47c1-a3bc-aaa25cf20f2e","html_url":"https://github.com/Sinytra/WikiToolkit","commit_stats":null,"previous_names":["sinytra/wikitoolkit"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Sinytra/WikiToolkit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sinytra%2FWikiToolkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sinytra%2FWikiToolkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sinytra%2FWikiToolkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sinytra%2FWikiToolkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sinytra","download_url":"https://codeload.github.com/Sinytra/WikiToolkit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sinytra%2FWikiToolkit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260063238,"owners_count":22953512,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T03:17:44.482Z","updated_at":"2025-06-15T23:03:47.791Z","avatar_url":"https://github.com/Sinytra.png","language":"Java","funding_links":["https://github.com/sponsors/Sinytra","https://opencollective.com/Sinytra"],"categories":[],"sub_categories":[],"readme":"# Sinytra Wiki Dev Toolkit\n\nUtility gradle plugin to aid in authoring documentation on the Sinytra Modded MC Wiki.\n\nHighlighted features:\n\n- Local real-time, accurate preview of your documentation in the exact same look as it will have once uploaded to the wiki\n- Automatically generating asset renders of inventory models for all mod items\n- Revalidating documentation after publishing\n\n## Installation\n\nThe wiki toolkit plugin is available on the [Gradle Plugin Portal](https://plugins.gradle.org/plugin/org.moddedmc.wiki.toolkit).\n\nYou can install it in your project by adding the following code to your `build.gradle` or `build.gradle.kts`.\n\n`build.gradle`\n```groovy\nplugins {\n    id 'org.moddedmc.wiki.toolkit' version '\u003cversion\u003e'\n}\n```\n\n`build.gradle.kts`\n```kts\nplugins {\n    id(\"org.moddedmc.wiki.toolkit\") version \"\u003cversion\u003e\"\n}\n```\n\n\n## Setup\n\nThe initial step for using this plugin is registering documentation roots, which is done via a Gradle DSL.\n\nA minimal setup may look like this:\n\n`build.gradle`\n```groovy\nwiki {\n    docs {\n        // The name of the object (examplemod) should match the registered wiki project ID (if it exists).\n        examplemod {\n            // The path to the folder containing the documentation metadata file (sinytra-wiki.json)\n            root = file('docs/examplemod')\n        }\n    }\n}\n```\n\n`build.gradle.kts`\n```kts\nwiki {\n    // The name of the object (examplemod) should match the registered wiki project ID (if it exists).\n    docs.create(\"examplemod\") {\n        // The path to the folder containing the documentation metadata file (sinytra-wiki.json)\n        root = file(\"docs/examplemod\")\n    }\n}\n```\n\n## Real-time documentation preview\n\nThe plugin allows you to preview your mod documentation in real-time on your local machine. Behind the scenes,\nthis is done by cloning the Wiki's GitHub repository and enabling local preview mode.\n\nRunning a local preview requires [NodeJS](https://nodejs.org/en/download/). Please make sure you have NodeJS\n**v20 or above** installed on your computer.\n\n**To start the local preview, run the `previewDocs` task.** This will set up and launch the local wiki environment.\n\nOnce ready, it will be available at `http://localhost:3000`.\n\n### Known issues\n\nUsing `org.gradle.daemon=false` will prevent the npm task from existing when gradle is stopped, keeping it running\nin the background. Please check your `gradle.properties` file and make sure this property is either set to `true` or\nremoved entirely.\n\n## Exporting assets\n\n\u003e [!NOTE]  \n\u003e Exporting assets is only supported when using [ModDevGradle](https://github.com/neoforged/ModDevGradle) (NeoForge) or [Fabric Loom](https://github.com/FabricMC/fabric-loom) (Fabric)\n\nThis feature lets you automatically render and export images of in-game items the way they are displayed\nin one's inventory, saving you time preparing documentation assets.\n\nThe resulting files are placed in the appropriate subfolder inside your documentation root, **ready to be referenced**\nin docs with no additional configuration necessary.\n\n### Prerequisites\n\nBefore running an export, make sure you have configured the `exportedAssetNamespaces` property of your\ndocumentation root(s).\n\n```groovy\nwiki {\n    docs {\n        examplemod {\n            // Namespaces of registered in-game item IDs that you wish to include in the asset export\n            // for this documentation root.\n            exportedAssetNamespaces = ['examplemod']\n        }\n    }\n}\n```\n\nNext, install our [Item Asset Exporter](https://github.com/Sinytra/ItemAssetExporterMod) mod.\nThere's no need to worry about it being present in all game runs, as it does not do anything by default\nnor does it affect the game. The exporter code only activates on designated run configurations.\n\n```groovy\n// Adding a repository is not necessary; it is automatically installed by the plugin.\n// However, if you are using a multiloader setup like Architectury Loom, you will need to install the plugin on your subprojects as well.\ndependencies {\n    // ModDevGradle\n    // Version list: https://maven.sinytra.org/org/sinytra/item-asset-export-neoforge\n    runtimeOnly \"org.sinytra:item-asset-export-neoforge:\u003cversion\u003e\"\n\n    // Fabric Loom\n    // Version list: https://maven.sinytra.org/org/sinytra/item-asset-export-fabric\n    modRuntimeOnly \"org.sinytra:item-asset-export-fabric:\u003cversion\u003e\"\n}\n```\n\n### Running the export\n\nExport tasks are created for each documentation root as automated client game runs. They will launch a game client that\nonce initialized, exports the renders of all matching items and exists the game. **Please do not interact with the client\nduring this run.** If the game reaches the main menu, please open a bug report on this repository.\n\nTo run an export for a documentation root, use the `runExport\u003cname\u003eAssets`, where `\u003cname\u003e` is the\nroot's capitalized name, e.g. `runExportExamplemodAssets`.\n\n## Publishing documentation\n\nAs the wiki caches all pages once they've been visited, updates to the documentation source will not be\nreflected on the website until the cache has been periodically revalidated, which can take a long time.\n\nTo force all of your documentation pages to re-render the next time they're visited\n(effectively \"publishing\" your documentation), the plugin provides a straightforward way to submit a request to our API.\n\n### Generating a token\n\nBefore you run the task, generate a GitHub [fine-grained access token](https://github.com/settings/personal-access-tokens/new)\nwith the following permissions:\n\n- Repository permissions \u003e Metadata = Read-only\n\nAdditionally, make sure the token can access the wiki project's GitHub repository.\n\nOnce the token is generated, add it to your gradle configuration under the `wiki` block.\n\n```groovy\nwiki {\n    wikiAccessToken = \"MY_ACCESS_TOKEN\" // Starts with github_pat_\n}\n```\n\n### Running the task\n\nTo revalidate a single documentation root, run `revalidate\u003cname\u003eDocs` where `\u003cname` is the\nroot's capitalized name, e.g. `revalidateExamplemodDocs`.\n\nTo revalidate **all roots**, run the `revalidateDocs` task.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinytra%2Fwikitoolkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsinytra%2Fwikitoolkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinytra%2Fwikitoolkit/lists"}