feat: tags
This commit is contained in:
parent
7b519db0b3
commit
e16a126ef5
@ -125,6 +125,11 @@ cnzz:
|
|||||||
enable: true
|
enable: true
|
||||||
url: #
|
url: #
|
||||||
|
|
||||||
|
# Google Analytics
|
||||||
|
google_analytics: ''
|
||||||
|
# 百度统计
|
||||||
|
baidu_analytics: ''
|
||||||
|
|
||||||
# 数学公式
|
# 数学公式
|
||||||
mathjax: true
|
mathjax: true
|
||||||
|
|
||||||
@ -226,4 +231,6 @@ Use Tocbot to parse the title tags (h1~h6) in the content and insert the directo
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
Inspired by [Ocean](https://github.com/zhwangart/hexo-theme-ocean)
|
||||||
|
|
||||||
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png" /></a><br><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">Ayer</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="https://github.com/Shen-Yu/hexo-theme-ayer" property="cc:attributionName" rel="cc:attributionURL">Eric-Shen</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>.
|
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png" /></a><br><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">Ayer</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="https://github.com/Shen-Yu/hexo-theme-ayer" property="cc:attributionName" rel="cc:attributionURL">Eric-Shen</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>.
|
@ -2,8 +2,9 @@
|
|||||||
menu:
|
menu:
|
||||||
主页: /
|
主页: /
|
||||||
目录: /archives
|
目录: /archives
|
||||||
摄影: http://shenyu-vip.lofter.com
|
标签: /tags
|
||||||
旅行: /tags/旅行/
|
旅行: /tags/旅行/
|
||||||
|
摄影: http://shenyu-vip.lofter.com
|
||||||
关于我: /2019/about
|
关于我: /2019/about
|
||||||
|
|
||||||
# 网站图标和侧边栏logo
|
# 网站图标和侧边栏logo
|
||||||
@ -86,6 +87,11 @@ cnzz:
|
|||||||
enable: true
|
enable: true
|
||||||
url: https://s9.cnzz.com/z_stat.php?id=1278069914&web_id=1278069914
|
url: https://s9.cnzz.com/z_stat.php?id=1278069914&web_id=1278069914
|
||||||
|
|
||||||
|
# Google Analytics
|
||||||
|
google_analytics: ''
|
||||||
|
# 百度统计
|
||||||
|
baidu_analytics: ''
|
||||||
|
|
||||||
# 数学公式
|
# 数学公式
|
||||||
mathjax: true
|
mathjax: true
|
||||||
|
|
||||||
|
11
layout/_partial/baidu-analytics.ejs
Normal file
11
layout/_partial/baidu-analytics.ejs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<% if (theme.baidu_analytics){ %>
|
||||||
|
<script>
|
||||||
|
var _hmt = _hmt || [];
|
||||||
|
(function() {
|
||||||
|
var hm = document.createElement("script");
|
||||||
|
hm.src = "https://hm.baidu.com/hm.js?<%= theme.baidu_analytics %>";
|
||||||
|
var s = document.getElementsByTagName("script")[0];
|
||||||
|
s.parentNode.insertBefore(hm, s);
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
<% } %>
|
14
layout/_partial/google-analytics.ejs
Normal file
14
layout/_partial/google-analytics.ejs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<% if (theme.google_analytics){ %>
|
||||||
|
<%# "Google Analytics" %>
|
||||||
|
<script type="text/javascript">
|
||||||
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||||
|
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||||
|
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||||
|
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||||
|
|
||||||
|
ga('create', '<%= theme.google_analytics %>', 'auto');
|
||||||
|
ga('send', 'pageview');
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<%# "End Google Analytics" %>
|
||||||
|
<% } %>
|
@ -1,5 +1,6 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<% var title = page.title; if (is_archive()) { title = __('archive_a'); if
|
<% var title = page.title; if (is_archive()) { title = __('archive_a'); if
|
||||||
@ -7,10 +8,7 @@
|
|||||||
(is_year()) { title += ': ' + page.year; } } else if (is_category()) { title
|
(is_year()) { title += ': ' + page.year; } } else if (is_category()) { title
|
||||||
= __('categories.ejs') + ': ' + page.categories; } else if (is_tag()) {
|
= __('categories.ejs') + ': ' + page.categories; } else if (is_tag()) {
|
||||||
title = __('tag') + ': ' + page.tag; } %> <% if (page.keywords){ %>
|
title = __('tag') + ': ' + page.tag; } %> <% if (page.keywords){ %>
|
||||||
<meta
|
<meta name="keywords" content="<%= page.keywords %>,<%= config.keywords %>" />
|
||||||
name="keywords"
|
|
||||||
content="<%= page.keywords %>,<%= config.keywords %>"
|
|
||||||
/>
|
|
||||||
<% } else if (config.keywords){ %>
|
<% } else if (config.keywords){ %>
|
||||||
<meta name="keywords" content="<%= config.keywords %>" />
|
<meta name="keywords" content="<%= config.keywords %>" />
|
||||||
<% } %> <% if (page.description){ %>
|
<% } %> <% if (page.description){ %>
|
||||||
@ -18,10 +16,7 @@
|
|||||||
<% } else if (config.description){ %>
|
<% } else if (config.description){ %>
|
||||||
<meta name="description" content="<%= config.description %>" />
|
<meta name="description" content="<%= config.description %>" />
|
||||||
<% } %>
|
<% } %>
|
||||||
<meta
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
|
||||||
name="viewport"
|
|
||||||
content="width=device-width, initial-scale=1, maximum-scale=1"
|
|
||||||
/>
|
|
||||||
<title>
|
<title>
|
||||||
<% if (title){ %><%= title %> | <% } %> <%= config.title %>
|
<% if (title){ %><%= title %> | <% } %> <%= config.title %>
|
||||||
</title>
|
</title>
|
||||||
@ -30,5 +25,9 @@
|
|||||||
<% } %>
|
<% } %>
|
||||||
<%- css('css/style') %> <% if (theme.fancybox){ %> <%-
|
<%- css('css/style') %> <% if (theme.fancybox){ %> <%-
|
||||||
css('fancybox/jquery.fancybox.min') %> <% } %> <%- js('/js/pace.min.js') %>
|
css('fancybox/jquery.fancybox.min') %> <% } %> <%- js('/js/pace.min.js') %>
|
||||||
|
|
||||||
|
<%- partial('google-analytics') %>
|
||||||
|
<%- partial('baidu-analytics') %>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
</html>
|
</html>
|
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
.footer
|
.footer
|
||||||
border-top border-width solid border-color
|
border-top border-width solid #bbb
|
||||||
padding 3rem 0
|
padding 3rem 0
|
||||||
.outer
|
.outer
|
||||||
&>ul
|
&>ul
|
||||||
|
@ -63,6 +63,7 @@
|
|||||||
padding-left gutter-width
|
padding-left gutter-width
|
||||||
margin auto
|
margin auto
|
||||||
overflow-x hidden
|
overflow-x hidden
|
||||||
|
min-height calc( 100% - 157px )
|
||||||
clearfix()
|
clearfix()
|
||||||
|
|
||||||
.local-search
|
.local-search
|
||||||
@ -79,7 +80,6 @@
|
|||||||
width wrap-width
|
width wrap-width
|
||||||
padding-right 0
|
padding-right 0
|
||||||
padding-left 0
|
padding-left 0
|
||||||
|
|
||||||
.local-search
|
.local-search
|
||||||
width wrap-width
|
width wrap-width
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ border-radius = 0.4rem
|
|||||||
border-width = 0.1rem
|
border-width = 0.1rem
|
||||||
border-color = froth
|
border-color = froth
|
||||||
|
|
||||||
// Lyout
|
// Layout
|
||||||
aside-width = 7rem
|
aside-width = 7rem
|
||||||
wrap-width = 70rem
|
wrap-width = 70rem
|
||||||
years-width = 6rem
|
years-width = 6rem
|
||||||
|
Loading…
Reference in New Issue
Block a user