diff --git a/README.md b/README.md index eff8afa..80f6f98 100644 --- a/README.md +++ b/README.md @@ -258,6 +258,7 @@ easily template and generate HTML. The web server is provided by The default template search path is `index.html.j2` in the current working directory. This can be configured through the usual configuration entrypoints. +It is possible to use the template without the built-in server too! Here's a small example that renders a random ASCII letter and uses a stylesheet. diff --git a/xbotlib.py b/xbotlib.py index 329151b..32fa91b 100644 --- a/xbotlib.py +++ b/xbotlib.py @@ -490,11 +490,7 @@ class Bot(ClientXMPP): self.no_auto_join = no_auto_join self.port = port self.serve_web = serve_web - - self.template = None - if self.serve_web: - self.template = self.load_template(template) - + self.template = self.load_template(template) self.storage = storage self.output = Path(output).absolute()