Contributing
Vault Lens is open source. You can report bugs, suggest features or change the code yourself.
- Bug or feature request: open an issue on GitHub.
- Code change: follow the steps below and open a pull request.
Build the extension
You need:
- Clone the repository:bash
git clone https://github.com/jk-oster/obsidian-search-for-web.git cd obsidian-search-for-web - Install the dependencies:bash
pnpm install - Start the development build:bash
pnpm dev # Chrome pnpm dev-firefox # Firefox
The development build opens a new browser window with the extension installed. The build writes the extension to the dist/ folder.
Test your changes
The development build watches your files and builds again after each change.
| You changed | What to do |
|---|---|
| Content script, popup or settings page | Reload the web page. |
Background script (src/background.ts or src/background-services/) | Go to chrome://extensions/ and click Update. |
Before you open a pull request, run the type check:
bash
pnpm check-typesAdd a new setting
Change these 4 files:
src/types.ts: add the field toExtensionConfig.src/config.ts: add the default value toconfig.src/store.ts: add the field where the store copies the stored values, for examplestore.myField = data.myField;.src/components/OptionsPage.vue: add the input.
If existing users need a changed default value, increase MIGRATION in src/config.ts. The extension then migrates the stored settings on the next browser start.
Edit this documentation
The documentation is a VitePress site in the docs/ folder.
bash
pnpm docs:devEvery page has an Edit this page on GitHub link at the bottom.
Resources
- Icon generator: Chrome Extension Icon Generator
- Rounded corners for icons: pinetools.com (50px)
- Obsidian brand guidelines