mirror of
https://github.com/flysnow-org/maupassant-hugo.git
synced 2026-08-24 15:28:55 +00:00
添加备案信息支持
This commit is contained in:
@@ -36,6 +36,7 @@ Maupassant theme, ported to Hugo.
|
||||
20. 部分自定义的shortcode
|
||||
21. 文章自定义摘要
|
||||
22. 自定义广告支持
|
||||
23. 自定义备案信息
|
||||
|
||||
## 下载安装
|
||||
|
||||
@@ -202,6 +203,17 @@ type: archives
|
||||
|
||||
`content/archives/index.md`表示在`content/archives/`目录下的`index.md`文件
|
||||
|
||||
#### 添加备案信息
|
||||
|
||||
现在网站要求添加备案信息,本主题也进行了支持,使用方式非常简单,在`config.toml`的`params`配置中添加如下设置:
|
||||
|
||||
```toml
|
||||
[params]
|
||||
beian = "粤ICP备XXXXXXX号-1"
|
||||
```
|
||||
|
||||
以上配置中的备案信息要换成自己的
|
||||
|
||||
#### Disqus
|
||||
|
||||
该主题支持Disqus评论,如果要启用Disqus,可以在`config.toml`里添加如下配置即可.
|
||||
@@ -298,7 +310,9 @@ disablePathToLower = true
|
||||
```
|
||||
|
||||
* youku(youku.html)
|
||||
|
||||
#### 绘图支持
|
||||
|
||||
- 序列图(使用[js-sequence](https://bramp.github.io/js-sequence-diagrams/))
|
||||
1. 全局使用,在`config.toml`中添加如下配置
|
||||
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
|
||||
<div class="col-8" id="main">
|
||||
{{ block "content" . }}{{ end }}
|
||||
{{ partial "footer" . }}
|
||||
</div>
|
||||
|
||||
{{ partial "sidebar" . }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ partial "footer" . }}
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1,12 +1,22 @@
|
||||
<footer id="footer">
|
||||
<div class="container">
|
||||
© {{ now.Format "2006" }} <a href="{{ .Site.BaseURL | absURL }}">{{ .Site.Title }} By {{ .Site.Author.name }}</a>.
|
||||
Powered by <a rel="nofollow noreferer noopener" href="https://gohugo.io" target="_blank">Hugo</a>.
|
||||
<a href="https://www.flysnow.org/" target="_blank">Theme</a> based on <a href="https://github.com/flysnow-org/maupassant-hugo" target="_blank">maupassant</a>.
|
||||
{{ if .Site.Params.showHostPage }}
|
||||
Hosted by <a rel="nofollow noreferer noopener" href="https://pages.coding.me" target="_blank">Coding Pages</a>.
|
||||
<div>
|
||||
© {{ now.Format "2006" }} <a href="{{ .Site.BaseURL | absURL }}">{{ .Site.Title }} By {{ .Site.Author.name }}</a>
|
||||
{{ if .Site.Params.beian }}
|
||||
| <a rel="nofollow" target="_blank" href="http://www.beian.miit.gov.cn/">{{.Site.Params.beian}}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
<br />
|
||||
<div>
|
||||
<div class="github-badge">
|
||||
<a href="https://gohugo.io/" target="_black" rel="nofollow"><span class="badge-subject">Powered by</span><span class="badge-value bg-blue">Hugo</span></a>
|
||||
</div>
|
||||
<div class="github-badge">
|
||||
<a href="https://www.flysnow.org/" target="_black"><span class="badge-subject">Design by</span><span class="badge-value bg-brightgreen">飞雪无情</span></a>
|
||||
</div>
|
||||
<div class="github-badge">
|
||||
<a href="https://github.com/flysnow-org/maupassant-hugo" target="_black"><span class="badge-subject">Theme</span><span class="badge-value bg-yellowgreen">Maupassant</span></a>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
{{ if .IsPage }}
|
||||
|
||||
+68
-2
@@ -608,8 +608,8 @@ textarea.textarea {
|
||||
}
|
||||
#footer {
|
||||
padding:.8em 0 3.6em;
|
||||
line-height:1.5;
|
||||
color:#999;
|
||||
text-align: center;
|
||||
}
|
||||
.error-page {
|
||||
margin-top:100px;
|
||||
@@ -1049,4 +1049,70 @@ table tr th, table tr td {
|
||||
border: 1px solid #CCC;
|
||||
padding: 0.5em 1em;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
||||
.github-badge {
|
||||
display: inline-block;
|
||||
border-radius: 4px;
|
||||
text-shadow: none;
|
||||
font-size: 12px;
|
||||
color: #fff;
|
||||
line-height: 1.25;
|
||||
background-color: #ABBAC3;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.github-badge a {
|
||||
color: #fff;
|
||||
}
|
||||
.github-badge img {
|
||||
/*height: "calc(%s * 1.25)" % $fontsize-footnote*/
|
||||
height: 1.25em;
|
||||
vertical-align: top;
|
||||
}
|
||||
.github-badge .badge-subject {
|
||||
display: inline-block;
|
||||
background-color: #555;
|
||||
padding: 4px 4px 4px 6px;
|
||||
border-top-left-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
}
|
||||
.github-badge .badge-value {
|
||||
display: inline-block;
|
||||
padding: 4px 6px 4px 4px;
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
.github-badge .bg-brightgreen {
|
||||
background-color: #4c1 !important;
|
||||
}
|
||||
.github-badge .bg-green {
|
||||
background-color: #97ca00 !important;
|
||||
}
|
||||
.github-badge .bg-yellowgreen {
|
||||
background-color: #a4a61d !important;
|
||||
}
|
||||
.github-badge .bg-orange {
|
||||
background-color: #FE7D37 !important;
|
||||
}
|
||||
.github-badge .bg-yellow {
|
||||
background-color: #dfb317 !important;
|
||||
}
|
||||
.github-badge .bg-blueviolet {
|
||||
background-color: #8A2BE2 !important;
|
||||
}
|
||||
.github-badge .bg-pink {
|
||||
background-color: #FFC0CB !important;
|
||||
}
|
||||
.github-badge .bg-red {
|
||||
background-color: #e05d44 !important;
|
||||
}
|
||||
.github-badge .bg-blue {
|
||||
background-color: #007EC6 !important;
|
||||
}
|
||||
.github-badge .bg-grey,.github-badge .bg-gray {
|
||||
background-color: #555 !important;
|
||||
}
|
||||
.github-badge .bg-lightgrey,.github-badge .bg-lightgray {
|
||||
background-color: #9f9f9f !important;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user