From c80769def6c7c4814d997dfe37ec22cd08b8615e Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Wed, 29 Jun 2022 23:20:53 +0000 Subject: [PATCH] Add noindex meta tag to stories --- apiserver/server.py | 16 ++++++++++------ webclient/public/index.html | 2 ++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/apiserver/server.py b/apiserver/server.py index ae19a33..0209cc9 100644 --- a/apiserver/server.py +++ b/apiserver/server.py @@ -124,9 +124,11 @@ def story(sid): @flask_app.route('/search') def index(): return render_template('index.html', - title='Feed', - url='news.t0.vc', - description='Hacker News, Reddit, Lobsters, and Tildes articles rendered in reader mode') + title='Feed', + url='news.t0.vc', + description='Hacker News, Reddit, Lobsters, and Tildes articles rendered in reader mode', + robots='index', + ) @flask_app.route('/', strict_slashes=False) @flask_app.route('//c', strict_slashes=False) @@ -151,9 +153,11 @@ def static_story(sid): url = url.replace('www.', '') return render_template('index.html', - title=story['title'], - url=url, - description=description) + title=story['title'], + url=url, + description=description, + robots='noindex', + ) http_server = WSGIServer(('', 33842), flask_app) diff --git a/webclient/public/index.html b/webclient/public/index.html index 34506e9..0024bc3 100644 --- a/webclient/public/index.html +++ b/webclient/public/index.html @@ -8,6 +8,8 @@ content="{{ description }}" /> + +