import influxframework

base_template_path = "www/robots.txt"


def get_context(context):
	robots_txt = (
		influxframework.db.get_single_value("Website Settings", "robots_txt")
		or (influxframework.local.conf.robots_txt and influxframework.read_file(influxframework.local.conf.robots_txt))
		or ""
	)

	return {"robots_txt": robots_txt}
