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

页脚copyright应当显示author而不是title #727

Open
4 of 6 tasks
ghost opened this issue Jun 13, 2019 · 0 comments
Open
4 of 6 tasks

页脚copyright应当显示author而不是title #727

ghost opened this issue Jun 13, 2019 · 0 comments

Comments

@ghost
Copy link

ghost commented Jun 13, 2019

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 | 请求技术支持

页脚处,默认的copyright显示的是博客的title,即hexo_path/_config.yml文件中的title,但或许,显示author可能更加合适。

该代码定义在主题的的material/layout/_partial/footer.ejs文件中的第9行

<!--Footer-->
<footer class="mdl-mini-footer" id="bottom">
    <% if(theme.scheme === 'Paradox') { %>
        <!-- Paradox Footer Left Section -->
        <%- partial('_partial/footer-left') %>

        <!--Copyright-->
        <div id="copyright">
            <!--下一行末的 config.title 可能存在问题-->
            Copyright&nbsp;©&nbsp;<span year></span>&nbsp;<%- config.title %>
            <% if(theme.footer_text) { %>
                <br>
                <% if(Array.isArray(theme.footer_text)) { %>
                    <%- theme.footer_text.join('<br>') %>
                <% } else { %>
                    <%- theme.footer_text %>
                <% } %>
            <% } %>
        </div>

其应当改为config.author比较合适

<!--Footer-->
<footer class="mdl-mini-footer" id="bottom">
    <% if(theme.scheme === 'Paradox') { %>
        <!-- Paradox Footer Left Section -->
        <%- partial('_partial/footer-left') %>

        <!--Copyright-->
        <div id="copyright">
            <!--改为下一行末的 config.author-->
            Copyright&nbsp;©&nbsp;<span year></span>&nbsp;<%- config.author %>
            <% if(theme.footer_text) { %>
                <br>
                <% if(Array.isArray(theme.footer_text)) { %>
                    <%- theme.footer_text.join('<br>') %>
                <% } else { %>
                    <%- theme.footer_text %>
                <% } %>
            <% } %>
        </div>
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

0 participants