Skip to content

Advanced settings & personal shortcuts

You can create and manage your own user shortcuts and set advanced settings via GitHub, or a self-hosted config file.

There is also this tutorial video.

Set up a custom configuration

  1. If you don't have one, create a GitHub.com account. It is free.
  2. Fork trovu-data-user into your own GitHub account.
  3. In there, adjust config.yml to your needs, and add your own shortcuts to shortcuts.yml. (Both are YAML files.)
  4. Call Trovu with https://trovu.net/?#github=YOUR_GITHUB_USERNAME

Via a self-hosted file

  1. Put a file online matching the structure of config.yml.
  2. Call Trovu with https://trovu.net/?#configUrl=URL_TO_YOUR_CONFIG_YML.

Note that creating your own shortcuts won't work with github: .

Instead, you will need to define them within the config file, see Namespaces.

Custom configuration

You may adjust config.yml to your needs.

Namespaces

namespaces:
    - o
    - en
    - .us
    - github: john-doe
      name: john
    - github: .
      name: my
    - url: https://example.com/shortcuts.yml
      name: mydomain

This is an array of the namespaces you want to use. Every entry may be either

  • a string: Then it refers to an (official) site namespace, i.e. one in the /data subdirectory repository. Shortcuts in there are curated by the Trovu community.
  • key/value pairs, then they refer to a user namespace, e.g. your (or someone else's) user namespace in GitHub. Read more below.

The order is also relevant: The later the namespace appears in the list, the higher priority it has. So in the example above, shortcuts in mydomain have the highest precedence.

User namespaces

User namespaces can look like this:

namespaces:
    - github: .

This is the most common setting. It refers to the current (=your) trovu-data-user repo. It will look for a shortcuts.yml, next to this very config.yml.

namespaces:
    - github: .
      name: my

You can also give it a custom name. Defaults to the current repo's name.

namespaces:
    - github: johndoe

Will look for a repo https://github.com/johndoe/trovu-data-user/ and use its shortcuts. Setting another name: is possible.

namespaces:
    - name: mydomain
      url: https://example.com/shortcuts.yml

Will take shortcuts from this URL. Make sure CORS is enabled.

namespaces:
    - name: righthere
      shortcuts:
          examplekeyword 0:
              url: https://example.com/

Define a namespace with shortcuts just right here.

(Beware: Unlike having them in a separate shortcuts.yml, this approach makes it impossible for others to use them.)

Default keyword

defaultKeyword: g

If no keyword is recognized in a query, this one will be used. Useful for setting up a much used shortcut.

Language

language: en

For Wikipedia in your language (or other shortcuts using <$language>). Basically, it fills the <$language> variable in the shortcut URLs. Now, using the w shortcut will get you to the Wikipedia in your language, as its shortcut URL is set as https://<$language>.wikipedia.org/.

Country

country: de

For shortcuts that use <$country> in their URL. Works similarly as <$language>.

Personal shortcuts

Add personal shortcuts to shortcuts.yml.