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

在_config.yml中快速添加网站备案号 #112

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,16 @@ footer:
# Dependencies: https://github.com/theme-next/hexo-symbols-count-time
count: false
powered: true

# Beian ICP and gongan information for Chinese users. See: https://beian.miit.gov.cn, https://beian.mps.gov.cn
beian:
enable: false
# The id of ICP beian. e.g. 京ICP备1919081145号-1
icp: 京ICP备1919081145号-1
# The id of gongan beian. e.g. 京公安网备11451401919810号
gongan_id:
# The icon for gongan beian. Login and See: https://beian.mps.gov.cn/web/business/businessHome/website
gongan_icon_url:

post:
# Dependencies: https://github.com/theme-next/hexo-symbols-count-time
Expand Down
14 changes: 14 additions & 0 deletions layout/_partials/footer.njk
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,20 @@
</div>
{%- endif %}

{%- if theme.footer.beian.enable %}
<div class="beian">
<a href="https://beian.miit.gov.cn" target="_blank">{{theme.footer.beian.icp}}</a>
{%- if theme.footer.beian.gongan_icon_url %}
<img src="{{ url_for(theme.footer.beian.gongan_icon_url) }}" alt="">
{%- endif %}
{%- if theme.footer.beian.gongan_id %}
<a href="https://beian.mps.gov.cn/#/query/webSearch?code=00000000000000" target="_blank" rel="noopener">
{{theme.footer.beian.gongan_id}}
</a>
{%- endif %}
</div>
{%- endif %}

{%- if theme.footer.powered %}
<div class="powered-by">
{{ __('footer.powered', _url('https://hexo.io', 'Hexo') + ' & Theme.' + _url('https://github.com/amehime/hexo-theme-shoka', 'Shoka')) }}
Expand Down