This plugin creates an Accelerate Mobile Page (AMP) subartifact of the original content artifact and links canonical and amphtml.
To enable the plugin run this command:
lektor plugins add lektor-amp
The plugin has a config file to turn off the amp generation. Just create
a file named amp.ini
into your configs/
folder and set the amp
key.
generate_amp = false
It expects an amp template version, prefixed with amp- of the templates. Basic example for lektors basic blog module templates is in the github repo (see repo). Just copy theses files into a fresh lektor 3.0 templates folder.
<!doctype html>
<html ⚡>
<head>
<meta charset="utf-8">
<script async src="https://cdn.ampproject.org/v0.js"></script>
...
Beware that various tags, google ads, etc. behaves different and need to be handled in the amp templates (see AMP).
Mobile first, AI is coming by itself ;)