添加备案号
大陆网站上线需要备案,并在网站显示备案号
ICP备案和公安备案
ICP
备案和公安备案的区别参考:企业网站ICP备案 和 网站公安备案的区分
ICP备案
注册域名并绑定网址后还需要进行服务器备案,我把服务器搭建在腾讯云上,所以在腾讯云上进行ICP
备案
具体备案流程参考备案流程
大约花费了2
周时间,今天发短信通知说备案成功了,还需要进行公安备案
公安备案
登录网址全国互联网安全管理服务平台
- 点击联网备案登录,注册个人帐号
- 点击新办网站申请,提交相关信息
添加备案号 - NexT-v6.7.0
参考:
还需要在网站底部添加备案号,NexT
主题6.x
版本已支持添加ICP
备案号
进入主题_config.yml
文件,搜索beian
关键字
# Beian icp information for Chinese users. In China, every legal website should have a beian icp in website footer.
# http://www.miitbeian.gov.cn
beian:
enable: false
icp:
设置enable
为true
,同时在icp
属性上输入备案号即可
目前需要同时添加ICP
备案号和公安备案号,参考修改如下
进入themes/next/_config.yml
,添加gongan
属性
beian:
enable: true
icp: ICP备案号
gongan: 公安备案号
在全国互联网安全管理平台上下载国徽图标,放置在/themes/next/source/images
下,命名为beian_logo.png
进入themes/next/layout/_partials/footer.swig
,删除以下代码:
{% if theme.footer.beian.enable %}{#
#} {{ next_url('http://www.miitbeian.gov.cn', theme.footer.beian.icp + ' ') }}{#
#}{% endif %}
在文件末尾添加如下代码:
{% if theme.footer.beian.enable %}
<div>
{{ next_url('http://www.miitbeian.gov.cn', theme.footer.beian.icp) }}
<span class="post-meta-divider">|</span>
<img src="/images/beian_icon.png" style="display:inline-block;text-decoration:none;height:13px;" />
{{ next_url('http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=公安备案号', theme.footer.beian.gongan) }}
</div>
{% endif %}
全国互联网安全管理平台上也提供了一段HTML
代码,用于在网站底部嵌入备案号,不过其样式不符合实际需求,所以修改如上所示
添加备案号 - NexT-v7.5.0
NexT
主题已集成了ICP
备案和公安备案功能,进入NexT _config.yml
# Beian ICP and gongan information for Chinese users. See: http://www.beian.miit.gov.cn, http://www.beian.gov.cn
beian:
enable: true
icp: 浙ICP备 1902xxx
# The digit in the num of gongan beian.
gongan_id: 330xxx
# The full num of gongan beian.
gongan_num: 浙公网安备 330118xxx
# The icon for gongan beian. See: http://www.beian.gov.cn/portal/download
gongan_icon_url: /images/beian_icon.png
在全国互联网安全管理平台上下载国徽图标,放置在/themes/next/source/images
下,命名为beian_logo.png
其显示效果不太理想,修改文件layout/_partials/footer.swig
,删除以下代码
{%- if theme.footer.beian.enable %}
<div class="beian">
{{- next_url('http://www.beian.miit.gov.cn', theme.footer.beian.icp + ' ') }}
{%- if theme.footer.beian.gongan_icon_url %}
<img src="{{ theme.footer.beian.gongan_icon_url }}" style="display: inline-block;">
{%- endif %}
{{- next_url('http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=' + theme.footer.beian.gongan_id,
theme.footer.beian.gongan_num + ' ') }}
</div>
{%- endif %}
在末尾添加如下代码
{%- if theme.footer.beian.enable %}
<div class="beian">
{{ next_url('http://www.beian.miit.gov.cn', theme.footer.beian.icp) }}
<span class="post-meta-divider">|</span>
<img src="/images/beian_icon.png" style="display:inline-block;text-decoration:none;height:13px;" />
{{ next_url('http://www.beian.gov.cn/portal/registerSystemInfo?recordcode='+theme.footer.beian.gongan_id, theme.footer.beian.gongan_num) }}
</div>
{%- endif %}