diff --git a/bin/pagegen.py b/bin/pagegen.py index 1a96af4..d963698 100755 --- a/bin/pagegen.py +++ b/bin/pagegen.py @@ -69,6 +69,7 @@ def producehtml(name, debug): %s (Iris) +%s %s%s %s %s @@ -85,7 +86,7 @@ def producehtml(name, debug): -""" % (ui["doctype"], config.frontend["app_title"], config.frontend["static_base_url"], csshtml, customcss, jshtml, customjs, config.js_config(), ui["class"], div) +""" % (ui["doctype"], config.frontend["app_title"], config.frontend["static_base_url"], config.frontend["extra_html"], csshtml, customcss, jshtml, customjs, config.js_config(), ui["class"], div) def main(outputdir=".", produce_debug=True): p = os.path.join(outputdir, "static") diff --git a/iris.conf.example b/iris.conf.example index 241230e..1e42974 100644 --- a/iris.conf.example +++ b/iris.conf.example @@ -159,6 +159,23 @@ network_name: FooNet # The title of the application in the web browser. app_title: %(network_name)s Web IRC +# EXTRA HTML: Additional HTML (e.g. analytics code) to place in the of +# generated documents. Note: For multi-line values, indent all the lines +# after the first with at least one space or tab. +extra_html: + # INITIAL NICK: Default initial nickname for the user. # '.' characters will be replaced by random digits. # Leave blank to force the user to enter a nick before connecting. diff --git a/qwebirc/config.py b/qwebirc/config.py index 0ba9d87..fd0b159 100644 --- a/qwebirc/config.py +++ b/qwebirc/config.py @@ -123,9 +123,11 @@ def __interpret_config(): def js_config(): + f = frontend.copy() + del f["extra_html"] # already injected by pagegen. options = { 'atheme': atheme, - 'frontend': frontend, + 'frontend': f, 'ui': ui, } return json.dumps(options) diff --git a/qwebirc/config_options.py b/qwebirc/config_options.py index 1f88b22..5e997a3 100644 --- a/qwebirc/config_options.py +++ b/qwebirc/config_options.py @@ -63,6 +63,7 @@ ("frontend", "base_url"), ("frontend", "network_name"), ("frontend", "app_title"), + ("frontend", "extra_html"), ("frontend", "initial_nick"), ("frontend", "initial_chans"), ("frontend", "static_base_url"),