Initial support for AMP (Accelerated Mobile Pages)

https://www.ampproject.org/

Basic implementation. Still needs the node description to be parsed,
as <img> tags need to be <amp-img> with special tags.
This commit is contained in:
2017-01-23 15:47:14 +01:00
parent 85988bb8c9
commit e3fc5d1b9b
2 changed files with 39 additions and 0 deletions

View File

@@ -207,6 +207,10 @@ def view(node_id):
template_path = '{0}/{1}_embed.html'.format(template_path, template_action)
# Full override for AMP view
if request.args.get('format') == 'amp':
template_path = 'nodes/view_amp.html'
try:
return render_template(template_path,
node_id=node._id,