Assets
Assets include images, diagrams, videos, and other files you want to include in your documentation. Proper asset management becomes increasingly important as your documentation grows in size and complexity.
Asset Structure
All documentation assets should be stored in the src/assets/docs directory following a structured organization pattern.
-
Create a folder for each track of your documentation in the
src/assets/docsfolder. -
Create a folder for each section in your documentation.
-
Store all assets related to a section in a folder.
For example, if you need to include assets in react section of web-dev docs, create a folder called react in the src/assets/docs/wed-dev folder and store all assets related to React in this folder.
Final structure:
Directorysrc/
Directoryassets/
Directorybranding/
- chai.svg
- chaidocs.png
Directorydocs/
Directoryweb-dev/
Directoryjavascript/
- …
Directoryreact/
- react-dom.svg
Directorywindows/
- file-explorer.png
- …
Best Practices
- Use meaningful filenames that clearly indicate the content
- Keep file sizes optimized for web (compress images when possible)
- Use SVG format for diagrams and illustrations when available
- Include alt text when referencing images in your documentation
- Maintain consistent naming conventions across your asset library
This structured approach ensures ChaiDocs remains maintainable, organized, and easy to navigate as it grows.
Start your journey with ChaiCode
All of our courses are available on chaicode.com. Feel free to check them out.