General
Prerequisites
- Node.js version as stated here (
node-version:) - npm (the correct version should be installed automatically by Node.js)
Configuration
You can override the default configuration in trovu.config.default.yml by placing a trovu.config.yml next to it, and overriding the values you want to set differently for your instance.
For example, if your local Trovu shall have additional (or different) shortcuts available by default, you can create a new namespace file /data/shortcuts/foo.yml, and then set trovu.config.yml to
Also, if you don't want to build the /docs and the /blog, and instead link to the ones on trovu.net, adjust the URLs to:
Installation
For the minimal installation, run:
git clone https://github.com/trovu/trovu.git
cd trovu
npm clean-install # Install dependencies
npm run build # Build the website including data
npm run dev-server # Run the local development server
For building more, such as the blog and the docs, have a look at the GitHub workflow.
Now, open the displayed URL of the local server in your browser. You should see the Trovu website.
Testing
If you made changes, you can run automated tests with
For more test-related commands, run
Add custom shortcuts
If you want to add custom shortcuts to your local installation (that should be available as site namespaces), simply put one or more YAML files into /data/shortcuts/. Then run npm run build again.
Use Local Installation
If you prefer a local installation over using the public version trovu.net, you can set your local Trovu version as your default search engine by using your web server's domain or your localhost as its domain.