Closed DamonHu closed 6 years ago
@DamonHu
I'm sorry, but that fix causes problems with current usage. I think you are using hexo-abbrlink. Is it possible to change permalink as follows?
permalink: :category/:abbrlink/
Then it will work normally with the current version.
<% if (is_post() && config.generator_amp){ %>
<link rel="amphtml" href="<%= config.url %><%= config.root %><%= page.path %>amp/index.html">
<% } %>
Please consider changing permalink . Also If you can't change link , please use the project you forked.
Yes, I used that plug-in. In order to be more unified, I've changed the amp to the front
<link rel="amphtml" href="<%= config.url %><%= config.root %>amp/<%= page.path %>index.html">
My submission is to solve the problem that the permalink is not a directory format. when you set the permalink end with the .html
.
Because I think it's better to SEO, so I always add .html
to the back and find that problem. Maybe I'm an disparate😂. And thank you for doing this
@DamonHu
I'm sorry . I had forget Custom AMP HTML Path Function (generateAmpPath option). This request can solve by generateAmpPath
option.
# Add this option in _config.yml.
generator_amp:
generateAmpPath: amp/:category/:abbrlink.html
This option can use hexo-abbrlink's path. Please try it in current public version.
I think that extension does not affect SEO. It is more effective to create more articles than that you think to set the permalink end with the .html
.
when the permalink like this
the permalink will Display as https://som.im/seo/65d1869b.htmlamp