forked from tanner/qotnews
Add noindex meta tag to stories
This commit is contained in:
parent
ebd1ad2140
commit
c80769def6
|
@ -124,9 +124,11 @@ def story(sid):
|
||||||
@flask_app.route('/search')
|
@flask_app.route('/search')
|
||||||
def index():
|
def index():
|
||||||
return render_template('index.html',
|
return render_template('index.html',
|
||||||
title='Feed',
|
title='Feed',
|
||||||
url='news.t0.vc',
|
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>', strict_slashes=False)
|
||||||
@flask_app.route('/<sid>/c', strict_slashes=False)
|
@flask_app.route('/<sid>/c', strict_slashes=False)
|
||||||
|
@ -151,9 +153,11 @@ def static_story(sid):
|
||||||
url = url.replace('www.', '')
|
url = url.replace('www.', '')
|
||||||
|
|
||||||
return render_template('index.html',
|
return render_template('index.html',
|
||||||
title=story['title'],
|
title=story['title'],
|
||||||
url=url,
|
url=url,
|
||||||
description=description)
|
description=description,
|
||||||
|
robots='noindex',
|
||||||
|
)
|
||||||
|
|
||||||
http_server = WSGIServer(('', 33842), flask_app)
|
http_server = WSGIServer(('', 33842), flask_app)
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
content="{{ description }}"
|
content="{{ description }}"
|
||||||
/>
|
/>
|
||||||
<meta content="{{ url }}" name="og:site_name">
|
<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="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
|
||||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
|
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user