Commit 36b0d5f4 authored by Martijn Braam's avatar Martijn Braam Committed by Oliver Smith

Add special files (#53)

* Add content for special pages
* Make flask serve robots and dnt-policy
parent 279caff4
......@@ -5,7 +5,7 @@ import re
import yaml
from datetime import datetime
from flask import Flask, render_template, url_for, Response, request
from flask import Flask, render_template, url_for, Response, request, send_file
from werkzeug.contrib.atom import AtomFeed
from os import listdir
......@@ -39,6 +39,14 @@ WIKI_REDIRECTS = {
def home():
return render_template('index.html')
@app.route('/robots.txt')
def robots_txt():
return send_file('static/robots.txt')
@app.route('/.well-known/dnt-policy.txt')
def dnt_policy():
return send_file('static/dnt-policy.txt')
def reading_time(content):
content = re.sub('<[^<]+?>', '', content)
words_per_minute = 200
......
This diff is collapsed.
User-agent: *
Disallow:
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment