A plugin for Obsidian that helps manage and enhance link functionality.
- NodeJS (v16+)
- npm or yarn
- Basic understanding of TypeScript and Obsidian API
-
Clone and Setup:
git clone <repository-url> cd obsidian-link-plugin npm install
-
Development:
npm run dev
-
Building:
npm run build
- Follow the established folder structure for new features
- Place business logic in services
- Keep UI components in modals/components
- Use TypeScript interfaces for type definitions
- Use
this.app
instead of globalapp
- Clean up resources in
onunload()
- Use
registerEvent()
for event listeners - Use
addCommand()
for commands
- Prefer Vault API (
app.vault
) over Adapter API - Use
normalizePath()
for file/folder paths - Use
getActiveViewOfType()
instead ofworkspace.activeLeaf
- Use Editor API over
Vault.modify
for active file changes
- Avoid Node.js and Electron APIs
- Test on both desktop and mobile
- Be careful with lookbehind in regex (iOS compatibility)
- Use sentence case in UI text
- Use
setHeading()
instead of HTML headings - Avoid setting default hotkeys
- Use CSS classes instead of hardcoded styles
- ESBuild is configured for bundling
- TypeScript compilation checks are run before build
- Source maps are enabled in development
- ESLint is configured for code quality
- Run
npm run lint
before committing - Follow TypeScript strict mode guidelines
- Don't commit
main.js
(built file) - Don't commit
node_modules
- Update version numbers using
npm run version