Skip to content

How to add AMP page linking in head? #775

@perqin

Description

@perqin

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions