Add noindex meta tag to stories

This commit is contained in:
Tanner Collin 2022-06-29 23:20:53 +00:00
parent ebd1ad2140
commit c80769def6
2 changed files with 12 additions and 6 deletions

View File

@ -126,7 +126,9 @@ 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')
description='Hacker News, Reddit, Lobsters, and Tildes articles rendered in reader mode',
robots='index',
)
@flask_app.route('/<sid>', strict_slashes=False)
@flask_app.route('/<sid>/c', strict_slashes=False)
@ -153,7 +155,9 @@ def static_story(sid):
return render_template('index.html',
title=story['title'],
url=url,
description=description)
description=description,
robots='noindex',
)
http_server = WSGIServer(('', 33842), flask_app)

View File

@ -8,6 +8,8 @@
content="{{ description }}"
/>
<meta content="{{ url }}" name="og:site_name">
<meta name="robots" content="{{ robots }}">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">