charts-embed-sdk
charts-embed-sdk copied to clipboard
docs: CHARTS-6059 Extract common text from SDK guides
Summary
- Our SDK examples share a lot of common text in their README.md files
- Common partial files have been added to a new directory
examples/docs - Used npm package markdown-include to support building our README files with other Markdown files
- With each outputted README.md (one per SDK example) there now needs to be a new
markdown.jsonfile which specifies the build file for it- These build files are located in
examples/.md-config
- These build files are located in
- Until we set up an action, compilation is manual (see below)
- With each outputted README.md (one per SDK example) there now needs to be a new
- With this approach, future text changes should only be made to the configuration files or the partial docs
Script to compile all SDK guide README files:
for i in examples/charts/* examples/dashboard/*;
do ./node_modules/markdown-include/bin/cli.js "${i}"/markdown.json;
done;
Updated file tree
charts-embed-sdk/examples
├── .md-config
│ ├── chart
| | ├── authenticated-custom-jwt.md
| | └── ...other md config files
| └── dashboard
│ └── ...other md config files
├── charts
│ ├── authenticated-custom-jwt
| | ├── assets
| | ├── src
| | ├── app.js
| | ├── index.html
| | ├── markdown.json
| | ├── package.json
| | ├── package.json
| | └── package-lock.json
| └── ...other examples
├── dashboard
| └── ...other examples
├── docs
│ ├── chart
| | └── ...partial md files
| ├── dashboard
| | └── ...partial md files
| └── ...partial md files
└── README.md