Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I'm using https://github.com/iissnan/hexo-theme-next for a template. Can you convert below to swig equivalent. #14

Closed
Lutece opened this issue Nov 18, 2016 · 4 comments
Labels

Comments

@Lutece
Copy link

Lutece commented Nov 18, 2016

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 :(

@tea3
Copy link
Owner

tea3 commented Nov 18, 2016

@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 %}

@tea3 tea3 added the question label Nov 18, 2016
@Lutece
Copy link
Author

Lutece commented Nov 18, 2016

i follow this steps;

  1. npm install ... generator-amp --save..
  2. add this script to header.swig file

{% if is_post() && config.generator_amp %}
link rel="amphtml" href="./amp/index.html"
{% endif %}

  1. 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.

  1. hexo deployment

how to check to apply amp in myblog
is this step wrong for amp settings?

@Lutece
Copy link
Author

Lutece commented Nov 18, 2016

myblog is http://lutece.github.io

@tea3
Copy link
Owner

tea3 commented Nov 18, 2016

@Lutece Yes, that’s fine :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants