I'm using https://github.com/iissnan/hexo-theme-next for a template. Can you convert below to swig equivalent.
Lutece opened this issue · comments
I want to install amp in my blog (use swig view template engine)
What should I do?
<% if (is_post() && config.generator_amp){ %>
'<link rel="amphtml" href="./amp/index.html"'
<% } %>
please help me :(
@Lutece
Hi , Thank you for using this plugin . Can you edit follow as ?
https://github.com/iissnan/hexo-theme-next/blob/master/layout/_partials/head.swig
{% if is_post() && config.generator_amp %}
<link rel="amphtml" href="./amp/index.html">
{% endif %}
i follow this steps;
- npm install ... generator-amp --save..
- add this script to header.swig file
{% if is_post() && config.generator_amp %}
link rel="amphtml" href="./amp/index.html"
{% endif %}
- add options to config.yml
The following settings is the quick start options.
generator_amp:
templateDir: amp-template
assetDistDir: amp-dist
logo:
path: sample/sample-logo.png
width: 600
height: 60
substituteTitleImage:
path: sample/sample-substituteTitleImage.png
width: 1024
height: 800
warningLog: false # If you want to validate, please set true.
- hexo deployment
how to check to apply amp in myblog
is this step wrong for amp settings?
myblog is http://lutece.github.io