{"id":28085726,"url":"https://github.com/jackpope/docreducer","last_synced_at":"2025-05-13T10:41:26.710Z","repository":{"id":48272105,"uuid":"178761504","full_name":"jackpope/DocReducer","owner":"jackpope","description":"Pull documentation from various repos into a single VuePress site","archived":false,"fork":false,"pushed_at":"2021-08-03T19:33:21.000Z","size":1673,"stargazers_count":7,"open_issues_count":20,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-15T05:28:57.859Z","etag":null,"topics":["documentation","documentation-site","vuepress"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/jackpope.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}},"created_at":"2019-04-01T01:09:10.000Z","updated_at":"2025-02-22T05:34:33.000Z","dependencies_parsed_at":"2022-08-29T01:50:53.639Z","dependency_job_id":null,"html_url":"https://github.com/jackpope/DocReducer","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackpope%2FDocReducer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackpope%2FDocReducer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackpope%2FDocReducer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackpope%2FDocReducer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jackpope","download_url":"https://codeload.github.com/jackpope/DocReducer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253925397,"owners_count":21985306,"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":["documentation","documentation-site","vuepress"],"created_at":"2025-05-13T10:41:25.765Z","updated_at":"2025-05-13T10:41:26.697Z","avatar_url":"https://github.com/jackpope.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DocReducer [![Actions Status](https://github.com/jackpope/DocReducer/workflows/Build%2C%20test%2C%20and%20release/badge.svg?branch=master)](https://github.com/jackpope/DocReducer/actions)\n\nDocReducer is a Github documentation consolidation CLI tool. It pairs nicely with Vuepress doc sites, with helpers specifically for VuePress config, but could be used to conslidate documentation anywhere.\n\n* DocReducer allows you to specify **repos across various orgs**, with various doc directories and custom README names.\n* DocReducer **helps resolve links** by transforming relative links that point outside of the doc directory to absolute links. It will also transform absolute links to other repos or docs into relative links so you can stay within the same documentation site whenever possible.\n* DocReducer generates missing README files in each documentation subdirectory to make sure doc site builders have reliable index pages.\n* DocReducer **provides helpers for Vuepress site configuration** to make building your new documentation site quick and easy.\n\n## Using with a Vuepress site\n\n### Setup and sync documents\n\n1. `yarn init`\n2. `yarn add vuepress doc-reducer`\n3. `touch doc-reducer.json`\n4. Add configuration to `doc-reducer.json` ([Example](./doc-reducer-example.json))\n5. Make sure `GITHUB_TOKEN` and `GITHUB_USERNAME` env vars are available and have access to the repos added to `doc-reducer.json`\n6. `yarn doc-reducer`\n7. `yarn vuepress dev \u003cdoc desitination directory\u003e`\n\n### Vuepress helpers\n\nIn addition to the document consolidation script, this package also exports helpers to configure your Vuepress site.\n\n#### navLinksGenerator\n\nWithin your `.vuepress/config.js` file, use `navLinksGenerator` to add a Nav dropdown with an option for each repo you've synced by providing their base path.\n\nExample:\n\n```javascript\nconst docReducer = require(\"doc-reducer\");\n\nmodule.exports = {\n  title: \"Site name\",\n  themeConfig: {\n    nav: [\n      { text: \"Home\", link: \"/\" },\n      {\n        text: \"Apps\",\n        items: docReducer.navLinksGenerator(\"/apps\")\n      }\n    ]\n  }\n};\n```\n\n#### sidebarLinksGenerator\n\nWithin your `.vuepress/config.js` file, use `sidebarLinksGenerator` to add a sidebar with items for each repo and their headers. Provide the root location for your Vuepress content and the base path for the synced content.\n\nExample:\n\n```javascript\nconst docReducer = require(\"doc-reducer\");\n\nmodule.exports = {\n  title: \"Site name\",\n  themeConfig: {\n    sidebar: {\n      ...docReducer.sidebarLinksGenerator(\"docs\", \"apps\"),\n      \"/\": [\"apps/\"]\n    }\n  }\n};\n```\n\n## Development\n\nThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.\n\nYou should have Node v12 and yarn installed on your system.\n\n```\nyarn install\nyarn test\n```\n\n## Versioning\n\nWe use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/jackpope/DocReducer/tags).\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackpope%2Fdocreducer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjackpope%2Fdocreducer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackpope%2Fdocreducer/lists"}