2019-12-22 15:25:41 -08: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 08:07:36 -08:00
|
|
|
bind_address: "127.0.0.1:8080"
|
2019-12-15 12:07:26 -08:00
|
|
|
|
|
|
|
# The root location where people can access your instance of bunbun
|
2019-12-15 09:49:16 -08:00
|
|
|
public_address: "localhost:8080"
|
|
|
|
|
2019-12-15 12:07:26 -08:00
|
|
|
# A default route, if no route is was matched. If none were matched, the entire
|
2019-12-23 21:05:56 -08: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 09:49:16 -08:00
|
|
|
default_route: "g"
|
2019-12-15 08:07:36 -08:00
|
|
|
|
2019-12-23 21:05:56 -08: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.
|
2019-12-31 16:12:17 -08:00
|
|
|
#
|
|
|
|
# You may provide an (absolute, recommended) path to an executable file to out-
|
2020-09-27 21:51:02 -07:00
|
|
|
# source route resolution to a program. The program will receive the arguments
|
|
|
|
# as space-separated words, without any shell parsing.
|
|
|
|
#
|
|
|
|
# These programs must return a JSON object with either one of the following
|
|
|
|
# key-value pairs:
|
|
|
|
# - "redirect": "some-path-to-redirect-to.com"
|
|
|
|
# - "body": The actual body to return.
|
|
|
|
# For example, to return a page that only prints out `3`, the function should
|
|
|
|
# return `{"redirect": "3"}`.
|
2019-12-31 16:12:17 -08:00
|
|
|
#
|
|
|
|
# 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-23 19:59:12 -08:00
|
|
|
groups:
|
2019-12-23 21:05:56 -08:00
|
|
|
-
|
2020-07-04 21:12:58 -07:00
|
|
|
# This is a group with the name "Meta commands" with a short description.
|
2019-12-23 21:05:56 -08:00
|
|
|
name: "Meta commands"
|
|
|
|
description: "Commands for bunbun"
|
|
|
|
routes:
|
2020-07-04 21:12:58 -07:00
|
|
|
# /ls is the only page that comes with bunbun besides the homepage. This
|
|
|
|
# page provides a full list of routes and their groups they're in.
|
2020-09-27 18:47:35 -07:00
|
|
|
ls: &ls
|
|
|
|
path: "/ls"
|
|
|
|
# You can specify a maximum number of arguments, which are string
|
|
|
|
# delimited strings.
|
|
|
|
max_args: 0
|
|
|
|
# You can also specify a minimum amount of arguments.
|
|
|
|
# min_args: 1
|
2020-07-04 21:12:58 -07:00
|
|
|
help:
|
2020-09-27 18:52:06 -07:00
|
|
|
path: "/ls"
|
2020-09-27 18:47:35 -07:00
|
|
|
max_args: 0
|
2020-07-04 21:12:58 -07:00
|
|
|
# Paths can be hidden from the listings page if desired.
|
|
|
|
hidden: true
|
2020-09-27 18:47:35 -07:00
|
|
|
# Bunbun supports all standard YAML features, so things like YAML pointers
|
|
|
|
# and references are supported.
|
2019-12-23 21:05:56 -08:00
|
|
|
list: *ls
|
|
|
|
-
|
2020-07-04 21:12:58 -07:00
|
|
|
# This is another group without a description
|
2019-12-23 21:05:56 -08:00
|
|
|
name: "Google"
|
|
|
|
routes:
|
2020-07-04 21:12:58 -07:00
|
|
|
# Routes can be quickly defined as a simple link, where {{query}} is where
|
|
|
|
# your query to bunbun is forwarded to.
|
2019-12-23 21:05:56 -08:00
|
|
|
g: "https://google.com/search?q={{query}}"
|
2020-07-04 21:12:58 -07:00
|
|
|
# Alternatively, you can provide a description instead, which provides
|
|
|
|
# replaces the raw query string on the ls page with said description
|
|
|
|
yt:
|
|
|
|
path: "https://www.youtube.com/results?search_query={{query}}"
|
|
|
|
description: "A way to quickly search youtube videos"
|
2019-12-23 21:05:56 -08:00
|
|
|
-
|
|
|
|
name: "Uncategorized routes"
|
|
|
|
routes:
|
|
|
|
r: "https://reddit.com/r/{{query}}"
|
2020-07-04 21:12:58 -07:00
|
|
|
# Routes don't need the {{query}} tag, so links can just be shortcuts to
|
|
|
|
# pages you'd like
|
|
|
|
nice: "https://youtu.be/dQw4w9WgXcQ"
|
|
|
|
-
|
|
|
|
# This group is entirely hidden, so all routes under it are hidden.
|
|
|
|
name: "Hidden group"
|
|
|
|
hidden: true
|
|
|
|
routes:
|
|
|
|
sneaky: "https://nyan.cat"
|