|
|
7 years ago | |
|---|---|---|
| .. | ||
| archetypes | 7 years ago | |
| assets | 7 years ago | |
| content | 7 years ago | |
| diagrams | 7 years ago | |
| layouts | 7 years ago | |
| static | 7 years ago | |
| README.md | 7 years ago | |
| config.toml | 7 years ago | |
| package.json | 7 years ago | |
| tsconfig.json | 7 years ago | |
| webpack.config.ts | 7 years ago | |
| yarn.lock | 7 years ago | |
This is the source for the Vendure documentation website. Docs are written in markdown and the website is generated with Hugo.
To build the docs, first install Hugo on your machine.
The run the docs:build script from the root of this repo.
This task will:
docs/public directory.Run docs:watch when developing the docs site. This will run all of the above in watch mode, so you can go to http://localhost:1313 to view the docs site. It will auto-reload the browser on any changes to the server source, the docs script/styles assets, or the Hugo templates.
The API docs are generated from the TypeScript source files by running the "generate-docs" script:
yarn generate-docs [-w]
This script uses the TypeScript compiler API to traverse the server source code and extract data about the types as well as other information such as descriptions and default values.
Currently, any interface which includes the JSDoc @docCategory tag will be extracted into a markdown file in the content/docs/api directory. Hugo can then build the API documentation from these markdown files. This will probably be expanded to be able to parse class and type declarations too.
The docs site also uses the Clarity icons to maintain consistency with the Vendure admin ui app. However, currently this bug makes the use of the custom-elements based icons unfeasible since it adds about 400kb to the JS bundle size. This is unacceptable for what is essentially a static HTML site.
So for now we are hand-picking the icons as svg files from https://icongr.am/clarity and using them as regular images. The downside is that to get different colours, the svg files themselves must be edited.
This is a pain but for the small number of icons planned, it is workable.