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
Via GitHub (recommended)
- If you don't have one, create a GitHub.com account. It is free.
- Fork trovu-data-user into your own GitHub account.
- In there, adjust
config.yml
to your needs, and add your own shortcuts toshortcuts.yml
. (Both are YAML files.) - Call Trovu with
https://trovu.net/?#github=YOUR_GITHUB_USERNAME
Via a self-hosted file
- Put a file online matching the structure of config.yml.
- 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:
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
.
You can also give it a custom name. Defaults to the current repo's name.
Will look for a repo https://github.com/johndoe/trovu-data-user/
and use its shortcuts. Setting another name:
is possible.
Will take shortcuts from this URL. Make sure CORS is enabled.
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
If no keyword is recognized in a query, this one will be used. Useful for setting up a much used shortcut.
Language
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
For shortcuts that use <$country>
in their URL. Works similarly as <$language>
.
Personal shortcuts
Add personal shortcuts to shortcuts.yml
.