bunbun/bunbun.default.yaml

47 lines
1.9 KiB
YAML
Raw Normal View History

2019-12-22 23:25:41 +00:00
# The location which your server is listening on and binds to. You must restart
# bunbun for changes to take effect for this config option.
2019-12-15 16:07:36 +00:00
bind_address: "127.0.0.1:8080"
2019-12-15 20:07:26 +00:00
# The root location where people can access your instance of bunbun
2019-12-15 17:49:16 +00:00
public_address: "localhost:8080"
2019-12-15 20:07:26 +00:00
# A default route, if no route is was matched. If none were matched, the entire
2019-12-24 05:05:56 +00:00
# query is used as the query for the default route. This field is optional, but
# highly recommended for ease-of-use.
2019-12-15 17:49:16 +00:00
default_route: "g"
2019-12-15 16:07:36 +00:00
2019-12-24 05:05:56 +00:00
# A list containing route groups. Each route group must have a name and a
# mapping of routes, with an optional description field. Each route mapping may
# contain "{{query}}", which will be populated by the user's search query. This
# input is percent-escaped. If multiple routes are defined, then the later
# defined route is used.
2020-01-01 00:12:17 +00:00
#
# You may provide an (absolute, recommended) path to an executable file to out-
# source route resolution to a program. The program will receive one argument
# only, which is the entire string provided from the user after matching the
# route. It is up to the out-sourced program to parse the arguments and to
# interpret those arguments. These programs should print one line to standard
# out, which should be a fully resolved URL to lead the user to.
#
# These programs must be developed defensively, as they accept arbitrary user
# input. Improper handling of user input can easily lead to anywhere from simple
# flakey responses to remote code execution.
2019-12-24 03:59:12 +00:00
groups:
2019-12-24 05:05:56 +00:00
-
name: "Meta commands"
description: "Commands for bunbun"
routes:
ls: &ls "/ls"
help: *ls
list: *ls
-
name: "Google"
routes:
g: "https://google.com/search?q={{query}}"
yt: "https://www.youtube.com/results?search_query={{query}}"
-
name: "Uncategorized routes"
description: "One-off routes with no specific grouping"
routes:
r: "https://reddit.com/r/{{query}}"