This directory contains code examples demonstrating how to use various features of the Obsidian Plugin Template.
Available Examples
Logger System
- Logger Usage - Demonstrates proper use of the logging system
- Component-based logging
- Different log levels (debug, info, warn, error)
- Tag-based filtering
- Production debug elimination
- File logging
Run with:
npx tsx docs/examples/logger-usage.ts
Using These Examples
Examples are written in TypeScript and can be run with:
npx tsx docs/examples/example-name.ts
Topics Covered
Logging System
- Component-based logging
- Different log levels (debug, info, warn, error)
- Tag-based filtering for complex components
- Production debug elimination
Coming Soon
- Modal creation examples
- Settings tab examples
- UI component examples
- Event handling examples
Contributing Examples
When adding new examples:
- Create a
.tsfile with a descriptive name - Add comprehensive comments explaining the code
- Include practical, real-world use cases
- Update this README with a link and description
- Test the example works correctly
Related Documentation
- User Documentation - End-user guides
- Developer Documentation - Contributing and development guides
- Feature Documentation - Detailed feature documentation