{"id":21512030,"url":"https://github.com/strvcom/docs","last_synced_at":"2025-03-17T15:26:06.414Z","repository":{"id":42468589,"uuid":"461546871","full_name":"strvcom/docs","owner":"strvcom","description":"An opinionated Docusaurus setup by @strvcom","archived":false,"fork":false,"pushed_at":"2022-04-04T14:08:38.000Z","size":71,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-01-24T01:43:41.108Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/strvcom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-02-20T16:30:59.000Z","updated_at":"2023-08-06T14:50:09.000Z","dependencies_parsed_at":"2022-09-14T00:32:29.254Z","dependency_job_id":null,"html_url":"https://github.com/strvcom/docs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strvcom%2Fdocs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strvcom%2Fdocs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strvcom%2Fdocs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strvcom%2Fdocs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/strvcom","download_url":"https://codeload.github.com/strvcom/docs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244056767,"owners_count":20390786,"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-23T22:25:37.842Z","updated_at":"2025-03-17T15:26:06.387Z","avatar_url":"https://github.com/strvcom.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @strv/docs\n\n\u003e Built with ❤️ at [STRV](https://www.strv.com/)\n\nAn opinionated Docusaurus setup by @strvcom, used to help document products.\n\n## Introduction\n\nThis library is a pre-configured Docusarus setup generator, originally used to create the [documentation](https://strvcom.github.io/strv-web/) for the STRV Website. It is composed of a set of defaults that aim at simplifying and standardizing the process of documenting projects – inside, and possibly beyond STRV.\n\nIf used to the fullest, this setup includes:\n\n- An index homepage\n- A general documentation builder (getting started, contributing, etc)\n- A components documentation (architecture, codebase, etc)\n- A section for ADRs (for architectural decision records)\n- A client-side search system for the above\n- Navbar links for the above\n- A code-fragment rehype plugin\n\nAll of these are opt-outs, meaning they can easily be disabled through configuration, but will be on by default.\n\nIn the end, `@strv/docs` main output is a [Docusaurus config](https://docusaurus.io/docs/next/configuration), and further configurations are possible and expected for each project's specific needs.\n\n## Setup\n\n### 1. Install the library:\n\n```\nyarn add --dev @strv/docs\n```\n\n### 2. Setup `docusaurus.config.js`:\n\nCreate a `docusaurus.config.js` file on the root folder. This is a minimal example:\n\n```js docusaurus.config.js\nmodule.exports = require('@strv/docs').docs({\n  title: 'Example Project',\n  url: 'https://docs-website.com/',\n  baseUrl: '/',\n})\n```\n\n\u003e For a more complete example, check the [example project's configuration](./example/docusaurus.config.js).\n\n### 3. Add docs scripts (optional):\n\nAdd Docusaurus building scripts to `package.json`:\n\n```json\n{\n  \"scripts\": {\n    \"docs:start\": \"docusaurus start -p 8001\",\n    \"docs:build\": \"docusaurus build --out-dir build-docs\",\n    \"docs:clear\": \"docusaurus clear\",\n    \"docs:serve\": \"docusaurus serve -p 8001 --dir build-docs\"\n  }\n}\n```\n\n## Configuration\n\nBy default, `@strv/docs` will try to guess which features you want to enable by checking the presence of some files in your project. Alternatively, these features can be turn-off manually at the `docusaurus.config.js`:\n\n```js\nmodule.exports = require('@strv/docs').docs({\n  customFields: {\n    strv: {\n      homepage: false, // disable the homepage index\n      pages: false, // disable pages plugin\n      docs: false, // disable general docs, found at /docs/general\n      adr: false, // disable adr docs, found ar /docs/adr\n      components: false, // disable components docs, spread across /src files\n      changelog: false, // disable Changelog link adding\n      github: false, // disable GitHub links\n    },\n  },\n})\n```\n\nFor some configuration above, no extra effort is needed. Some of them, however, require that you start creating docs in specific locations. Furthermore, the doc generating modules – `docs`, `adr`, and `component``- will use automated sidebars, which can be overriden by placing a sidebar file on specific locations:\n\n| Module | Description | Watched files | Custom sidebar |\n| ------ | ----------- | --------- | -------------- |\n| Pages | Add isolated React or MDX pages. **You should add these pages to navbar or other links to get access to them**.  | `./docs/pages/**/*.(md\\|mdx\\|js\\|jsx\\|ts\\|tsx)` |  |\n| General | Meant for general docs, not related to application logic  | `./docs/general/**/*.(md\\|mdx)` | `./docs/general/sidebar.js` |\n| ADR | Meant for architectural decision records | `./docs/adr/**/*.(md\\|mdx)` | `./docs/adr/sidebar.js` |\n| Components | Meant for documenting current codebase components | `./src/**/*.(md\\|mdx)` | `./docs/components-sidebar.js` |\n\n### Custom components source path\n\nIn case you want the components documentation to watch a different directory than `/src`, you can configure it in the `docusaurus.config.js` like so:\n\n```js\nmodule.exports = require('@strv/docs').docs({\n  customFields: {\n    strv: {\n      components: 'source', // would look for doc files under ./source/ dir\n    },\n  },\n})\n```\n\n\u003e Be careful not to set a path that overlaps any other documentation kinds.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstrvcom%2Fdocs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstrvcom%2Fdocs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstrvcom%2Fdocs/lists"}