feat: tags
This commit is contained in:
parent
7b519db0b3
commit
e16a126ef5
@ -125,6 +125,11 @@ cnzz:
|
||||
enable: true
|
||||
url: #
|
||||
|
||||
# Google Analytics
|
||||
google_analytics: ''
|
||||
# 百度统计
|
||||
baidu_analytics: ''
|
||||
|
||||
# 数学公式
|
||||
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>.
|
@ -2,8 +2,9 @@
|
||||
menu:
|
||||
主页: /
|
||||
目录: /archives
|
||||
摄影: http://shenyu-vip.lofter.com
|
||||
标签: /tags
|
||||
旅行: /tags/旅行/
|
||||
摄影: http://shenyu-vip.lofter.com
|
||||
关于我: /2019/about
|
||||
|
||||
# 网站图标和侧边栏logo
|
||||
@ -86,6 +87,11 @@ cnzz:
|
||||
enable: true
|
||||
url: https://s9.cnzz.com/z_stat.php?id=1278069914&web_id=1278069914
|
||||
|
||||
# Google Analytics
|
||||
google_analytics: ''
|
||||
# 百度统计
|
||||
baidu_analytics: ''
|
||||
|
||||
# 数学公式
|
||||
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,34 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<% var title = page.title; if (is_archive()) { title = __('archive_a'); if
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<% var title = page.title; if (is_archive()) { title = __('archive_a'); if
|
||||
(is_month()) { title += ': ' + page.year + '/' + page.month; } else if
|
||||
(is_year()) { title += ': ' + page.year; } } else if (is_category()) { title
|
||||
= __('categories.ejs') + ': ' + page.categories; } else if (is_tag()) {
|
||||
title = __('tag') + ': ' + page.tag; } %> <% if (page.keywords){ %>
|
||||
<meta
|
||||
name="keywords"
|
||||
content="<%= page.keywords %>,<%= config.keywords %>"
|
||||
/>
|
||||
<% } else if (config.keywords){ %>
|
||||
<meta name="keywords" content="<%= config.keywords %>" />
|
||||
<% } %> <% if (page.description){ %>
|
||||
<meta name="description" content="<%= page.description %>" />
|
||||
<% } else if (config.description){ %>
|
||||
<meta name="description" content="<%= config.description %>" />
|
||||
<% } %>
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1, maximum-scale=1"
|
||||
/>
|
||||
<title>
|
||||
<% if (title){ %><%= title %> | <% } %> <%= config.title %>
|
||||
</title>
|
||||
<% if (theme.favicon){ %>
|
||||
<link rel="shortcut icon" href="<%- theme.favicon %>" />
|
||||
<% } %>
|
||||
<%- css('css/style') %> <% if (theme.fancybox){ %> <%-
|
||||
<meta name="keywords" content="<%= page.keywords %>,<%= config.keywords %>" />
|
||||
<% } else if (config.keywords){ %>
|
||||
<meta name="keywords" content="<%= config.keywords %>" />
|
||||
<% } %> <% if (page.description){ %>
|
||||
<meta name="description" content="<%= page.description %>" />
|
||||
<% } else if (config.description){ %>
|
||||
<meta name="description" content="<%= config.description %>" />
|
||||
<% } %>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
|
||||
<title>
|
||||
<% if (title){ %><%= title %> | <% } %> <%= config.title %>
|
||||
</title>
|
||||
<% if (theme.favicon){ %>
|
||||
<link rel="shortcut icon" href="<%- theme.favicon %>" />
|
||||
<% } %>
|
||||
<%- css('css/style') %> <% if (theme.fancybox){ %> <%-
|
||||
css('fancybox/jquery.fancybox.min') %> <% } %> <%- js('/js/pace.min.js') %>
|
||||
</head>
|
||||
</html>
|
||||
|
||||
<%- partial('google-analytics') %>
|
||||
<%- partial('baidu-analytics') %>
|
||||
</head>
|
||||
|
||||
</html>
|
@ -1,6 +1,6 @@
|
||||
|
||||
.footer
|
||||
border-top border-width solid border-color
|
||||
border-top border-width solid #bbb
|
||||
padding 3rem 0
|
||||
.outer
|
||||
&>ul
|
||||
|
@ -63,6 +63,7 @@
|
||||
padding-left gutter-width
|
||||
margin auto
|
||||
overflow-x hidden
|
||||
min-height calc( 100% - 157px )
|
||||
clearfix()
|
||||
|
||||
.local-search
|
||||
@ -79,7 +80,6 @@
|
||||
width wrap-width
|
||||
padding-right 0
|
||||
padding-left 0
|
||||
|
||||
.local-search
|
||||
width wrap-width
|
||||
|
||||
|
@ -50,7 +50,7 @@ border-radius = 0.4rem
|
||||
border-width = 0.1rem
|
||||
border-color = froth
|
||||
|
||||
// Lyout
|
||||
// Layout
|
||||
aside-width = 7rem
|
||||
wrap-width = 70rem
|
||||
years-width = 6rem
|
||||
|
Loading…
Reference in New Issue
Block a user