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

请求把文章列表页的h1标签改成h2 #963

Closed
xiyuvi opened this issue Jun 29, 2023 · 0 comments
Closed

请求把文章列表页的h1标签改成h2 #963

xiyuvi opened this issue Jun 29, 2023 · 0 comments
Labels
✨ enhancement New feature request

Comments

@xiyuvi
Copy link
Contributor

xiyuvi commented Jun 29, 2023

如是功能需求,请确定符合以下情况

请描述该需求尝试解决的问题

bing是全球第二大搜索引擎,他会语义化解读标签,期望页面只有唯一的h1元素
image

请描述您认为可行的解决方案

希望可以把列表页的h1改为h2,样式是没有改变,更符合搜索引擎的收录标准.
hexo-theme-fluid\layout\index.ejs文件内

<h1 class="index-header">
        <% if (theme.index.post_sticky && theme.index.post_sticky.enable && post.sticky > 0) { %>
          <i class="index-pin <%= theme.index.post_sticky && theme.index.post_sticky.icon %>" title="Pin on top"></i>
        <% } %>
        <a href="<%= post_url %>" target="<%- theme.index.post_url_target %>">
          <%= post.title %>
        </a>
      </h1>

改为

<h2 class="index-header">
        <% if (theme.index.post_sticky && theme.index.post_sticky.enable && post.sticky > 0) { %>
          <i class="index-pin <%= theme.index.post_sticky && theme.index.post_sticky.icon %>" title="Pin on top"></i>
        <% } %>
        <a href="<%= post_url %>" target="<%- theme.index.post_url_target %>">
          <%= post.title %>
        </a>
      </h2>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature request
Projects
None yet
Development

No branches or pull requests

2 participants