Skip to content

Contributing ​

Vault Lens is open source. You can report bugs, suggest features or change the code yourself.

Build the extension ​

You need:

  1. Clone the repository:
    bash
    git clone https://github.com/jk-oster/obsidian-search-for-web.git
    cd obsidian-search-for-web
  2. Install the dependencies:
    bash
    pnpm install
  3. 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 changedWhat to do
Content script, popup or settings pageReload 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-types

Add a new setting ​

Change these 4 files:

  1. src/types.ts: add the field to ExtensionConfig.
  2. src/config.ts: add the default value to config.
  3. src/store.ts: add the field where the store copies the stored values, for example store.myField = data.myField;.
  4. 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:dev

Every page has an Edit this page on GitHub link at the bottom.

Resources ​

Released under the GPLv3 License.