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

How to add AMP page linking in head? #775

Open
4 of 6 tasks
perqin opened this issue Feb 21, 2021 · 0 comments
Open
4 of 6 tasks

How to add AMP page linking in head? #775

perqin opened this issue Feb 21, 2021 · 0 comments

Comments

@perqin
Copy link

perqin commented Feb 21, 2021

I certify that I have first consulted (check all with "x")

我确认我已经查看了 (使用 "x" 选择)


I'm submitting a (check one with "x")

我正在申请 (使用 "x" 选择)

  • bug report | 反馈一个 bug
  • feature request | 申请添加新的特性或功能
  • support request | 请求技术支持

I've read through the documentation but didn't find AMP support.

I'm using hexo-generator-amp plugin to generate the AMP pages for posts, and according to its README.md, I have to add the AMP page linking to pair normal version with the AMP-ed version:

<% if (is_post() && config.generator_amp){ %>
  <link rel="amphtml" href="<%= config.url %><%= config.root %><%= page.path %>/amp/index.html">
<% } %>

As you can see, the <link> need to contain the URL of the page so I can't use head.yml to achieve this.

Any idea or plan to support this feature?

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

No branches or pull requests

1 participant