{"id":20390271,"url":"https://github.com/nonebot/vuepress-plugin-versioning","last_synced_at":"2025-07-26T04:09:48.192Z","repository":{"id":103141425,"uuid":"303398651","full_name":"nonebot/vuepress-plugin-versioning","owner":"nonebot","description":null,"archived":false,"fork":false,"pushed_at":"2020-10-17T06:43:08.000Z","size":124,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-11T02:38:30.086Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nonebot.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2020-10-12T13:20:32.000Z","updated_at":"2020-10-17T06:43:10.000Z","dependencies_parsed_at":"2023-06-19T09:42:11.329Z","dependency_job_id":null,"html_url":"https://github.com/nonebot/vuepress-plugin-versioning","commit_stats":{"total_commits":6,"total_committers":2,"mean_commits":3.0,"dds":"0.16666666666666663","last_synced_commit":"cae7ad04c266f8bd9af91883d5942204c9197c17"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nonebot/vuepress-plugin-versioning","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonebot%2Fvuepress-plugin-versioning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonebot%2Fvuepress-plugin-versioning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonebot%2Fvuepress-plugin-versioning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonebot%2Fvuepress-plugin-versioning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nonebot","download_url":"https://codeload.github.com/nonebot/vuepress-plugin-versioning/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonebot%2Fvuepress-plugin-versioning/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265424970,"owners_count":23762888,"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-15T03:23:56.371Z","updated_at":"2025-07-26T04:09:48.162Z","avatar_url":"https://github.com/nonebot.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vuepres-plugin-versioning\n\nVersioning plugin for VuePress\n\nInspired by \u003chttps://github.com/appcelerator/docs-devkit/\u003e\n\n## Usage\n\nInstall the plugin\n\n```bash\nnpm i -D git+https://github.com/nonebot/vuepress-plugin-versioning\n```\n\nand enable it in your .vuepress/config.js\n\n```js\nmodule.exports = {\n  plugins: [\"versioning\"],\n};\n```\n\nConfig plugin\n\n```js\nconst path = require(\"path\");\nconst fs = require(\"fs-extra\");\n\nmodule.exports = (context) =\u003e ({\n  plugins: [\n    [\n      \"versioning\",\n      {\n        // Dir to store achieved version docs\n        versionedSourceDir: path.resolve(context.sourceDir, \"..\", \"archive\"),\n        // Dir to store extra pages that not within versioning\n        pagesSourceDir: path.resolve(context.sourceDir, \"..\", \"pages\"),\n        async onNewVersion(\n          version /*version str*/,\n          versionDestPath /*version dir*/\n        ) {\n          // Copy extra files on achieve\n          return fs.copy(\n            context.sourceDir,\n            \"api.json\",\n            path.join(versionDestPath, \"api.json\")\n          );\n        },\n      },\n    ],\n  ],\n});\n```\n\n## Routing\n\nOnce you have created your first version, the plugin will change the default routing to the latest achieved version. Docs in the vuepress source directory will be considered as part of the version `next` and they are available under the URL `/next/`. All other versions will be available under their respective version number like `/1.0.0/`.\n\n## Access Version Data\n\nThe plugin will automatically store the version information in the page metadata. You can access it in components via `this.$page.version`. To get a list of all versions that are currently available you can use `this.$versions`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnonebot%2Fvuepress-plugin-versioning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnonebot%2Fvuepress-plugin-versioning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnonebot%2Fvuepress-plugin-versioning/lists"}