mirror of https://github.com/Nofated095/blog
20210629
This commit is contained in:
parent
2678c44904
commit
268cee9871
|
@ -105,7 +105,7 @@ navbar:
|
|||
分类: /categories
|
||||
标签: /tags
|
||||
媒体: /media
|
||||
友链: /friend
|
||||
友链: /friends
|
||||
关于: /about
|
||||
导航: http://nofated.gitee.io/edgelight
|
||||
# Page footer configurations
|
||||
|
|
|
@ -0,0 +1,339 @@
|
|||
# Version of the configuration file
|
||||
version: 4.0.0
|
||||
# Icarus theme variant, can be "default" or "cyberpunk"
|
||||
variant: default
|
||||
# Path or URL to the website's logo
|
||||
logo:
|
||||
text: Nofated's Blog
|
||||
# Page metadata configurations
|
||||
head:
|
||||
# URL or path to the website's icon
|
||||
favicon: https://cravatar.eu/helmavatar/Nofated
|
||||
# Web application manifests configuration
|
||||
# https://developer.mozilla.org/en-US/docs/Web/Manifest
|
||||
manifest:
|
||||
# Name of the web application (default to the site title)
|
||||
name:
|
||||
# The displayed name of the web application
|
||||
# when there is not enough space to display full name
|
||||
short_name:
|
||||
# The start URL of the web application
|
||||
start_url:
|
||||
# The default theme color for the application
|
||||
theme_color:
|
||||
# A placeholder background color for the application page to display
|
||||
# before its stylesheet is loaded
|
||||
background_color:
|
||||
# The preferred display mode for the website
|
||||
display: standalone
|
||||
# Image files that can serve as application icons for different contexts
|
||||
icons:
|
||||
-
|
||||
# The path to the image file
|
||||
src: ''
|
||||
# A string containing space-separated image dimensions
|
||||
sizes: ''
|
||||
# A hint as to the media type of the image
|
||||
type:
|
||||
# Open Graph metadata
|
||||
# https://hexo.io/docs/helpers.html#open-graph
|
||||
open_graph:
|
||||
# Page title (og:title) (optional)
|
||||
# You should leave this blank for most of the time
|
||||
title:
|
||||
# Page type (og:type) (optional)
|
||||
# You should leave this blank for most of the time
|
||||
type: blog
|
||||
# Page URL (og:url) (optional)
|
||||
# You should leave this blank for most of the time
|
||||
url:
|
||||
# Page cover (og:image) (optional)
|
||||
# You should leave this blank for most of the time
|
||||
image:
|
||||
# Site name (og:site_name) (optional)
|
||||
# You should leave this blank for most of the time
|
||||
site_name:
|
||||
# Page author (article:author) (optional)
|
||||
# You should leave this blank for most of the time
|
||||
author:
|
||||
# Page description (og:description) (optional)
|
||||
# You should leave this blank for most of the time
|
||||
description:
|
||||
# Twitter card type (twitter:card)
|
||||
twitter_card:
|
||||
# Twitter ID (twitter:creator)
|
||||
twitter_id:
|
||||
# Twitter Site (twitter:site)
|
||||
twitter_site:
|
||||
# Google+ profile link (deprecated)
|
||||
google_plus:
|
||||
# Facebook admin ID
|
||||
fb_admins:
|
||||
# Facebook App ID
|
||||
fb_app_id:
|
||||
# Structured data of the page
|
||||
# https://developers.google.com/search/docs/guides/intro-structured-data
|
||||
structured_data:
|
||||
# Page title (optional)
|
||||
# You should leave this blank for most of the time
|
||||
title:
|
||||
# Page description (optional)
|
||||
# You should leave this blank for most of the time
|
||||
description:
|
||||
# Page URL (optional)
|
||||
# You should leave this blank for most of the time
|
||||
url:
|
||||
# Page author (article:author) (optional)
|
||||
# You should leave this blank for most of the time
|
||||
author:
|
||||
# Page images (optional)
|
||||
# You should leave this blank for most of the time
|
||||
image:
|
||||
# Additional HTML meta tags in an array
|
||||
meta:
|
||||
# Meta tag specified in <attribute>=<value> style
|
||||
# E.g., name=theme-color;content=#123456 => <meta name="theme-color" content="#123456">
|
||||
- ''
|
||||
# URL or path to the website's RSS atom.xml
|
||||
rss:
|
||||
# Page top navigation bar configurations
|
||||
navbar:
|
||||
# Navigation menu items
|
||||
menu:
|
||||
首页: /
|
||||
归档: /archives
|
||||
分类: /categories
|
||||
标签: /tags
|
||||
媒体: /media
|
||||
友链: /friends
|
||||
关于: /about
|
||||
导航: http://nofated.gitee.io/edgelight
|
||||
# Page footer configurations
|
||||
footer:
|
||||
# Links to be shown on the right of the footer section
|
||||
links:
|
||||
Creative Commons:
|
||||
icon: fab fa-creative-commons
|
||||
url: 'https://creativecommons.org/'
|
||||
Attribution 4.0 International:
|
||||
icon: fab fa-creative-commons-by
|
||||
url: 'https://creativecommons.org/licenses/by/4.0/'
|
||||
Download on GitHub:
|
||||
icon: fab fa-github
|
||||
url: 'https://github.com/ppoffice/hexo-theme-icarus'
|
||||
# Article related configurations
|
||||
article:
|
||||
# Code highlight settings
|
||||
highlight:
|
||||
# Code highlight themes
|
||||
# https://github.com/highlightjs/highlight.js/tree/master/src/styles
|
||||
theme: atom-one-light
|
||||
# Show copy code button
|
||||
clipboard: true
|
||||
# Default folding status of the code blocks. Can be "", "folded", "unfolded"
|
||||
fold: unfolded
|
||||
# Whether to show estimated article reading time
|
||||
readtime: true
|
||||
# Article licensing block
|
||||
licenses:
|
||||
Creative Commons:
|
||||
icon: fab fa-creative-commons
|
||||
url: 'https://creativecommons.org/'
|
||||
Attribution:
|
||||
icon: fab fa-creative-commons-by
|
||||
url: 'https://creativecommons.org/licenses/by/4.0/'
|
||||
Noncommercial:
|
||||
icon: fab fa-creative-commons-nc
|
||||
url: 'https://creativecommons.org/licenses/by-nc/4.0/'
|
||||
# Search plugin configurations
|
||||
# https://ppoffice.github.io/hexo-theme-icarus/categories/Plugins/Search/
|
||||
search:
|
||||
type: insight
|
||||
# Comment plugin configurations
|
||||
# https://ppoffice.github.io/hexo-theme-icarus/categories/Plugins/Comment/
|
||||
comment:
|
||||
type: valine
|
||||
app_id: L7bg4EcXDh2SSIwYGu8fU9p5-MdYXbMMI
|
||||
app_key: Iwbdj09b8tI7DXkKYz7sMbfc
|
||||
placeholder: "" # 可选填
|
||||
avatar: mm # 可选填
|
||||
avatar_force: false # 可选填
|
||||
meta: ["nick", "mail", "link"] # 可选填
|
||||
page_size: 10 # 可选填
|
||||
lang: zh-CN # 可选填
|
||||
visitor: false # 可选填
|
||||
highlight: true # 可选填
|
||||
record_ip: false # 可选填
|
||||
server_urls: # 可选填
|
||||
emoji_cdn: # 可选填
|
||||
emoji_maps: # 可选填
|
||||
enable_qq: false # 可选填
|
||||
required_fields: [] # 可选填
|
||||
# Donate plugin configurations
|
||||
# https://ppoffice.github.io/hexo-theme-icarus/categories/Plugins/Donation/
|
||||
donates:
|
||||
-
|
||||
type: alipay
|
||||
# Alipay qrcode image URL
|
||||
qrcode: 'https://pic.rmb.bdstatic.com/bjh/e773e4c7da6f039ecbe0b3536ca16119.jpeg'
|
||||
-
|
||||
type: wechat
|
||||
# Wechat qrcode image URL
|
||||
qrcode: 'https://pic.rmb.bdstatic.com/bjh/caae30e75d185555d0518690e5ea101a.png'
|
||||
# Share plugin configurations
|
||||
# https://ppoffice.github.io/hexo-theme-icarus/categories/Plugins/Share/
|
||||
# Sidebar configurations.
|
||||
# Please be noted that a sidebar is only visible when it has at least one widget
|
||||
sidebar:
|
||||
# Left sidebar configurations
|
||||
left:
|
||||
# Whether the sidebar sticks to the top when page scrolls
|
||||
sticky: true
|
||||
# Right sidebar configurations
|
||||
right:
|
||||
# Whether the sidebar sticks to the top when page scrolls
|
||||
sticky: true
|
||||
# Sidebar widget configurations
|
||||
# http://ppoffice.github.io/hexo-theme-icarus/categories/Widgets/
|
||||
widgets:
|
||||
# Profile widget configurations
|
||||
-
|
||||
# Where should the widget be placed, left sidebar or right sidebar
|
||||
position: left
|
||||
type: profile
|
||||
# Author name
|
||||
author: Nofated
|
||||
# Author title
|
||||
author_title: Student
|
||||
# Author's current location
|
||||
location: Beijing, China
|
||||
# URL or path to the avatar image
|
||||
avatar: https://pic.rmb.bdstatic.com/bjh/020a46e8318d66b55d73afe31805d653.jpeg
|
||||
# Whether show the rounded avatar image
|
||||
avatar_rounded: false
|
||||
# Email address for the Gravatar
|
||||
gravatar:
|
||||
# URL or path for the follow button
|
||||
follow_link: 'https://space.bilibili.com/351951550'
|
||||
# Links to be shown on the bottom of the profile widget
|
||||
social_links:
|
||||
Github:
|
||||
icon: fab fa-github
|
||||
url: 'https://github.com/Nofated095'
|
||||
QQ:
|
||||
icon: fab fa-qq
|
||||
url: 'tencent://message/?uin=2032025551&Menu=yes'
|
||||
Email:
|
||||
icon: fas fa-envelope
|
||||
url: 'mailto:nofated095@outlook.com'
|
||||
RSS:
|
||||
icon: fas fa-rss
|
||||
url: /atom.xml
|
||||
-
|
||||
position: left
|
||||
type: categories
|
||||
-
|
||||
# Where should the widget be placed, left sidebar or right sidebar
|
||||
position: left
|
||||
type: tags
|
||||
# Table of contents widget configurations
|
||||
-
|
||||
# Where should the widget be placed, left sidebar or right sidebar
|
||||
position: left
|
||||
type: toc
|
||||
# Whether to show the index of each heading
|
||||
index: true
|
||||
# Whether to collapse sub-headings when they are out-of-view
|
||||
collapsed: true
|
||||
# Maximum level of headings to show (1-6)
|
||||
depth: 3
|
||||
-
|
||||
# Where should the widget be placed, left sidebar or right sidebar
|
||||
position: left
|
||||
type: recent_posts
|
||||
# Recommendation links widget configurations
|
||||
|
||||
# Plugin configurations
|
||||
# https://ppoffice.github.io/hexo-theme-icarus/categories/Plugins/
|
||||
plugins:
|
||||
# Enable page startup animations
|
||||
animejs: true
|
||||
# Show the "back to top" button
|
||||
back_to_top: true
|
||||
# Baidu Analytics plugin settings
|
||||
# https://tongji.baidu.com
|
||||
baidu_analytics:
|
||||
# Baidu Analytics tracking ID
|
||||
tracking_id:
|
||||
# Bing Webmaster Tools plugin settings
|
||||
# https://www.bing.com/toolbox/webmaster/
|
||||
bing_webmaster:
|
||||
# Bing Webmaster Tools tracking ID in the <meta> tag
|
||||
tracking_id:
|
||||
# BuSuanZi site/page view counter
|
||||
# https://busuanzi.ibruce.info
|
||||
busuanzi: true
|
||||
# CNZZ statistics
|
||||
# https://www.umeng.com/web
|
||||
cnzz:
|
||||
# CNZZ tracker id
|
||||
id:
|
||||
# CNZZ website id
|
||||
web_id:
|
||||
# Alerting users about the use of cookies
|
||||
# https://www.osano.com/cookieconsent/
|
||||
cookie_consent:
|
||||
# The compliance type. Can be "info", "opt-in", or "opt-out"
|
||||
type: opt-in
|
||||
# Theme of the popup. Can be "block", "edgeless", or "classic"
|
||||
theme: edgeless
|
||||
# Whether the popup should stay static regardless of the page scrolls
|
||||
static: false
|
||||
# Where on the screen the consent popup should display
|
||||
position: bottom-left
|
||||
# URL to your site's cookie policy
|
||||
policyLink: 'https://www.cookiesandyou.com/'
|
||||
# Enable the lightGallery and Justified Gallery plugins
|
||||
gallery: true
|
||||
# Google Analytics plugin settings
|
||||
# https://analytics.google.com
|
||||
google_analytics:
|
||||
# Google Analytics tracking ID
|
||||
tracking_id:
|
||||
# Hotjar user feedback plugin
|
||||
# https://www.hotjar.com/
|
||||
hotjar:
|
||||
# Hotjar site id
|
||||
site_id:
|
||||
# Enable the KaTeX math typesetting support
|
||||
# https://katex.org/
|
||||
katex: false
|
||||
# Enable the MathJax math typesetting support
|
||||
# https://www.mathjax.org/
|
||||
mathjax: false
|
||||
# Enable the Outdated Browser plugin
|
||||
# http://outdatedbrowser.com/
|
||||
outdated_browser: false
|
||||
# Show a progress bar at top of the page on page loading
|
||||
progressbar: true
|
||||
# Statcounter statistics
|
||||
# https://statcounter.com/
|
||||
statcounter:
|
||||
# Statcounter project id
|
||||
project:
|
||||
# Statcounter project security code
|
||||
security:
|
||||
# Twitter conversion tracking plugin settings
|
||||
# https://business.twitter.com/en/help/campaign-measurement-and-analytics/conversion-tracking-for-websites.html
|
||||
twitter_conversion_tracking:
|
||||
# Twitter Pixel ID
|
||||
pixel_id:
|
||||
# CDN provider settings
|
||||
# https://ppoffice.github.io/hexo-theme-icarus/Configuration/Theme/speed-up-your-site-with-custom-cdn/
|
||||
providers:
|
||||
# Name or URL template of the JavaScript and/or stylesheet CDN provider
|
||||
cdn: jsdelivr
|
||||
# Name or URL template of the webfont CDN provider
|
||||
fontcdn: loli
|
||||
# Name or URL of the fontawesome icon font CDN provider
|
||||
iconcdn: https://cdn.bootcdn.net/ajax/libs/font-awesome/5.15.2/css/all.css
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
# Site
|
||||
title: Nofated's Blog
|
||||
subtitle: ''
|
||||
description: ''
|
||||
subtitle: 'I hope to be with you everyday.'
|
||||
description: 'A little blog'
|
||||
keywords:
|
||||
author: Nofated
|
||||
language: zh-CN
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -9,7 +9,7 @@
|
|||
"server": "hexo server"
|
||||
},
|
||||
"hexo": {
|
||||
"version": "5.3.0"
|
||||
"version": "5.4.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"bulma-stylus": "^0.8.0",
|
||||
|
@ -30,4 +30,4 @@
|
|||
"inferno": "^7.4.7",
|
||||
"inferno-create-element": "^7.4.7"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -62,4 +62,4 @@ tags:
|
|||
|地理|70|62|
|
||||
|道德与法治|70|67|
|
||||
|生物|70|69|
|
||||
|总分|602.2|班排5 级部54|
|
||||
|总分|602.2|班排3 级部40|
|
|
@ -1,28 +0,0 @@
|
|||
---
|
||||
title: Ubuntu To Go 制作教程
|
||||
date: 2021-05-05 06:31:04
|
||||
cover:
|
||||
tags:
|
||||
- Ubuntu
|
||||
categories:
|
||||
- 写BUG日常
|
||||
- 教程
|
||||
---
|
||||
把 Ubuntu 装进移动硬盘
|
||||
<!--more-->
|
||||
|
||||
{% raw %}<article class="message is-success"><div class="message-body">{% endraw %}
|
||||
特别鸣谢
|
||||
- [StevenQiu](https://www.littlqiu.net)
|
||||
- [Ubuntu团队](https://www.ubuntu.com)
|
||||
{% raw %}</div></article>{% endraw %}
|
||||
|
||||
## 准备
|
||||
|
||||
- 一个大于8GB的U盘或者移动硬盘
|
||||
- [Vmware Workstation](https://www.vmware.com/products/workstation-pro/workstation-pro-evaluation.html)
|
||||
- Ubuntu [安装盘](https://mirrors.163.com/ubuntu-releases)
|
||||
- 一个可以联网的计算机
|
||||
|
||||
## 安装
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
title: 活用 Bulma 美化文章
|
||||
title: 让你的文章更耐看
|
||||
date: 2020-10-15 10:34:46
|
||||
cover: https://pic.rmb.bdstatic.com/bjh/2902fadc80bff86b1f657a77e15e2cf1.png
|
||||
tags:
|
||||
|
@ -12,10 +12,32 @@ categories:
|
|||
---
|
||||
怎么让自己光秃秃的 MarkDown 文章变得更好看呢?
|
||||
<!--more-->
|
||||
{% raw %}<article class="message is-success"><div class="message-body">{% endraw %}
|
||||
特别鸣谢
|
||||
- [iMaeGoo](https://www.imaegoo.com/)
|
||||
{% raw %}</div></article>{% endraw %}
|
||||
|
||||
本文部分摘自
|
||||
<script type="text/javascript">
|
||||
|
||||
window.onload=function(){
|
||||
var LinkCards=document.getElementsByClassName('LinkCard');
|
||||
if(LinkCards.length != 0){
|
||||
var LinkCard=LinkCards[0];
|
||||
var link=LinkCard.href;
|
||||
var title=LinkCard.innerText;
|
||||
LinkCard.innerHTML="<style type=text/css>.LinkCard,.LinkCard:hover{text-decoration:none;border:none!important;color:inherit!important}.LinkCard{position:relative;display:block;margin:1em auto;width:390px;box-sizing:border-box;border-radius:12px;max-width:100%;overflow:hidden;color:inherit;text-decoration:none}.ztext{word-break:break-word;line-height:1.6}.LinkCard-backdrop{position:absolute;top:0;left:0;right:0;bottom:0;background-repeat:no-repeat;-webkit-filter:blur(20px);filter:blur(20px);background-size:cover;background-position:center}.LinkCard,.LinkCard:hover{text-decoration:none;border:none!important;color:inherit!important}.LinkCard-content{position:relative;display:flex;align-items:center;justify-content:space-between;padding:12px;border-radius:inherit;background-color:rgba(246,246,246,0.88)}.LinkCard-text{overflow:hidden}.LinkCard-title{display:-webkit-box;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;max-height:calc(16px * 1.25 * 2);font-size:16px;font-weight:500;line-height:1.25;color:#1a1a1a}.LinkCard-meta{display:flex;margin-top:4px;font-size:14px;line-height:20px;color:#999;white-space:nowrap}.LinkCard-imageCell{margin-left:8px;border-radius:6px}.LinkCard-image{display:block;width:60px;height:auto;border-radius:inherit}</style><span class=LinkCard-backdrop style=background-image:url(https://zhstatic.zhihu.com/assets/zhihu/editor/zhihu-card-default.svg)></span><span class=LinkCard-content><span class=LinkCard-text><span class=LinkCard-title>"+title+"</span><span class=LinkCard-meta><span style=display:inline-flex;align-items:center><svg class="+"'Zi Zi--InsertLink'"+" fill=currentColor viewBox="+"'0 0 24 24'"+" width=17 height=17><path d="+"'M6.77 17.23c-.905-.904-.94-2.333-.08-3.193l3.059-3.06-1.192-1.19-3.059 3.058c-1.489 1.489-1.427 3.954.138 5.519s4.03 1.627 5.519.138l3.059-3.059-1.192-1.192-3.059 3.06c-.86.86-2.289.824-3.193-.08zm3.016-8.673l1.192 1.192 3.059-3.06c.86-.86 2.289-.824 3.193.08.905.905.94 2.334.08 3.194l-3.059 3.06 1.192 1.19 3.059-3.058c1.489-1.489 1.427-3.954-.138-5.519s-4.03-1.627-5.519-.138L9.786 8.557zm-1.023 6.68c.33.33.863.343 1.177.029l5.34-5.34c.314-.314.3-.846-.03-1.176-.33-.33-.862-.344-1.176-.03l-5.34 5.34c-.314.314-.3.846.03 1.177z'"+" fill-rule=evenodd></path></svg></span>"+link+"</span></span><span class=LinkCard-imageCell><img class=LinkCard-image alt=图标 src=https://www.imaegoo.com/images/avatar.jpg></span></span>";
|
||||
|
||||
for (var i = LinkCards.length - 1; i >= 1; i--) {
|
||||
LinkCard=LinkCards[i];
|
||||
title=LinkCard.innerText;
|
||||
link=LinkCard.href;
|
||||
LinkCard.innerHTML="<span class=LinkCard-backdrop style=background-image:url(https://zhstatic.zhihu.com/assets/zhihu/editor/zhihu-card-default.svg)></span><span class=LinkCard-content><span class=LinkCard-text><span class=LinkCard-title>"+title+"</span><span class=LinkCard-meta><span style=display:inline-flex;align-items:center><svg class="+"'Zi Zi--InsertLink'"+" fill=currentColor viewBox="+"'0 0 24 24'"+" width=17 height=17><path d="+"'M6.77 17.23c-.905-.904-.94-2.333-.08-3.193l3.059-3.06-1.192-1.19-3.059 3.058c-1.489 1.489-1.427 3.954.138 5.519s4.03 1.627 5.519.138l3.059-3.059-1.192-1.192-3.059 3.06c-.86.86-2.289.824-3.193-.08zm3.016-8.673l1.192 1.192 3.059-3.06c.86-.86 2.289-.824 3.193.08.905.905.94 2.334.08 3.194l-3.059 3.06 1.192 1.19 3.059-3.058c1.489-1.489 1.427-3.954-.138-5.519s-4.03-1.627-5.519-.138L9.786 8.557zm-1.023 6.68c.33.33.863.343 1.177.029l5.34-5.34c.314-.314.3-.846-.03-1.176-.33-.33-.862-.344-1.176-.03l-5.34 5.34c-.314.314-.3.846.03 1.177z'"+" fill-rule=evenodd></path></svg></span>"+link+"</span></span><span class=LinkCard-imageCell><img class=LinkCard-image alt=图标 src=https://www.imaegoo.com/images/avatar.jpg></span></span>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<a href="https://www.imaegoo.com/2020/icarus-with-bulma/" class="LinkCard">活用 Bulma 美化 Icarus 文章 | iMaeGoo's Blog</a>
|
||||
|
||||
|
||||
|
||||
## 按钮
|
||||
|
||||
|
@ -342,4 +364,52 @@ Bulma Docs
|
|||
<span class="icon"><i class="fas fa-camera"></i></span>
|
||||
Bulma Docs
|
||||
</a>
|
||||
```
|
||||
```
|
||||
|
||||
## 文章引用
|
||||
<script type="text/javascript">
|
||||
|
||||
window.onload=function(){
|
||||
var LinkCards=document.getElementsByClassName('LinkCard');
|
||||
if(LinkCards.length != 0){
|
||||
var LinkCard=LinkCards[0];
|
||||
var link=LinkCard.href;
|
||||
var title=LinkCard.innerText;
|
||||
LinkCard.innerHTML="<style type=text/css>.LinkCard,.LinkCard:hover{text-decoration:none;border:none!important;color:inherit!important}.LinkCard{position:relative;display:block;margin:1em auto;width:390px;box-sizing:border-box;border-radius:12px;max-width:100%;overflow:hidden;color:inherit;text-decoration:none}.ztext{word-break:break-word;line-height:1.6}.LinkCard-backdrop{position:absolute;top:0;left:0;right:0;bottom:0;background-repeat:no-repeat;-webkit-filter:blur(20px);filter:blur(20px);background-size:cover;background-position:center}.LinkCard,.LinkCard:hover{text-decoration:none;border:none!important;color:inherit!important}.LinkCard-content{position:relative;display:flex;align-items:center;justify-content:space-between;padding:12px;border-radius:inherit;background-color:rgba(246,246,246,0.88)}.LinkCard-text{overflow:hidden}.LinkCard-title{display:-webkit-box;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;max-height:calc(16px * 1.25 * 2);font-size:16px;font-weight:500;line-height:1.25;color:#1a1a1a}.LinkCard-meta{display:flex;margin-top:4px;font-size:14px;line-height:20px;color:#999;white-space:nowrap}.LinkCard-imageCell{margin-left:8px;border-radius:6px}.LinkCard-image{display:block;width:60px;height:auto;border-radius:inherit}</style><span class=LinkCard-backdrop style=background-image:url(https://zhstatic.zhihu.com/assets/zhihu/editor/zhihu-card-default.svg)></span><span class=LinkCard-content><span class=LinkCard-text><span class=LinkCard-title>"+title+"</span><span class=LinkCard-meta><span style=display:inline-flex;align-items:center><svg class="+"'Zi Zi--InsertLink'"+" fill=currentColor viewBox="+"'0 0 24 24'"+" width=17 height=17><path d="+"'M6.77 17.23c-.905-.904-.94-2.333-.08-3.193l3.059-3.06-1.192-1.19-3.059 3.058c-1.489 1.489-1.427 3.954.138 5.519s4.03 1.627 5.519.138l3.059-3.059-1.192-1.192-3.059 3.06c-.86.86-2.289.824-3.193-.08zm3.016-8.673l1.192 1.192 3.059-3.06c.86-.86 2.289-.824 3.193.08.905.905.94 2.334.08 3.194l-3.059 3.06 1.192 1.19 3.059-3.058c1.489-1.489 1.427-3.954-.138-5.519s-4.03-1.627-5.519-.138L9.786 8.557zm-1.023 6.68c.33.33.863.343 1.177.029l5.34-5.34c.314-.314.3-.846-.03-1.176-.33-.33-.862-.344-1.176-.03l-5.34 5.34c-.314.314-.3.846.03 1.177z'"+" fill-rule=evenodd></path></svg></span>"+link+"</span></span><span class=LinkCard-imageCell><img class=LinkCard-image alt=图标 src=https://pic.rmb.bdstatic.com/bjh/020a46e8318d66b55d73afe31805d653.jpeg></span></span>";
|
||||
|
||||
for (var i = LinkCards.length - 1; i >= 1; i--) {
|
||||
LinkCard=LinkCards[i];
|
||||
title=LinkCard.innerText;
|
||||
link=LinkCard.href;
|
||||
LinkCard.innerHTML="<span class=LinkCard-backdrop style=background-image:url(https://zhstatic.zhihu.com/assets/zhihu/editor/zhihu-card-default.svg)></span><span class=LinkCard-content><span class=LinkCard-text><span class=LinkCard-title>"+title+"</span><span class=LinkCard-meta><span style=display:inline-flex;align-items:center><svg class="+"'Zi Zi--InsertLink'"+" fill=currentColor viewBox="+"'0 0 24 24'"+" width=17 height=17><path d="+"'M6.77 17.23c-.905-.904-.94-2.333-.08-3.193l3.059-3.06-1.192-1.19-3.059 3.058c-1.489 1.489-1.427 3.954.138 5.519s4.03 1.627 5.519.138l3.059-3.059-1.192-1.192-3.059 3.06c-.86.86-2.289.824-3.193-.08zm3.016-8.673l1.192 1.192 3.059-3.06c.86-.86 2.289-.824 3.193.08.905.905.94 2.334.08 3.194l-3.059 3.06 1.192 1.19 3.059-3.058c1.489-1.489 1.427-3.954-.138-5.519s-4.03-1.627-5.519-.138L9.786 8.557zm-1.023 6.68c.33.33.863.343 1.177.029l5.34-5.34c.314-.314.3-.846-.03-1.176-.33-.33-.862-.344-1.176-.03l-5.34 5.34c-.314.314-.3.846.03 1.177z'"+" fill-rule=evenodd></path></svg></span>"+link+"</span></span><span class=LinkCard-imageCell><img class=LinkCard-image alt=图标 src=https://pic.rmb.bdstatic.com/bjh/020a46e8318d66b55d73afe31805d653.jpeg></span></span>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<a href="http://nofated.gitee.io/" class="LinkCard">Nofated's Blog</a>
|
||||
``` js 点击展开代码>folded
|
||||
<script type="text/javascript">
|
||||
|
||||
window.onload=function(){
|
||||
var LinkCards=document.getElementsByClassName('LinkCard');
|
||||
if(LinkCards.length != 0){
|
||||
var LinkCard=LinkCards[0];
|
||||
var link=LinkCard.href;
|
||||
var title=LinkCard.innerText;
|
||||
LinkCard.innerHTML="<style type=text/css>.LinkCard,.LinkCard:hover{text-decoration:none;border:none!important;color:inherit!important}.LinkCard{position:relative;display:block;margin:1em auto;width:390px;box-sizing:border-box;border-radius:12px;max-width:100%;overflow:hidden;color:inherit;text-decoration:none}.ztext{word-break:break-word;line-height:1.6}.LinkCard-backdrop{position:absolute;top:0;left:0;right:0;bottom:0;background-repeat:no-repeat;-webkit-filter:blur(20px);filter:blur(20px);background-size:cover;background-position:center}.LinkCard,.LinkCard:hover{text-decoration:none;border:none!important;color:inherit!important}.LinkCard-content{position:relative;display:flex;align-items:center;justify-content:space-between;padding:12px;border-radius:inherit;background-color:rgba(246,246,246,0.88)}.LinkCard-text{overflow:hidden}.LinkCard-title{display:-webkit-box;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;max-height:calc(16px * 1.25 * 2);font-size:16px;font-weight:500;line-height:1.25;color:#1a1a1a}.LinkCard-meta{display:flex;margin-top:4px;font-size:14px;line-height:20px;color:#999;white-space:nowrap}.LinkCard-imageCell{margin-left:8px;border-radius:6px}.LinkCard-image{display:block;width:60px;height:auto;border-radius:inherit}</style><span class=LinkCard-backdrop style=background-image:url(https://zhstatic.zhihu.com/assets/zhihu/editor/zhihu-card-default.svg)></span><span class=LinkCard-content><span class=LinkCard-text><span class=LinkCard-title>"+title+"</span><span class=LinkCard-meta><span style=display:inline-flex;align-items:center><svg class="+"'Zi Zi--InsertLink'"+" fill=currentColor viewBox="+"'0 0 24 24'"+" width=17 height=17><path d="+"'M6.77 17.23c-.905-.904-.94-2.333-.08-3.193l3.059-3.06-1.192-1.19-3.059 3.058c-1.489 1.489-1.427 3.954.138 5.519s4.03 1.627 5.519.138l3.059-3.059-1.192-1.192-3.059 3.06c-.86.86-2.289.824-3.193-.08zm3.016-8.673l1.192 1.192 3.059-3.06c.86-.86 2.289-.824 3.193.08.905.905.94 2.334.08 3.194l-3.059 3.06 1.192 1.19 3.059-3.058c1.489-1.489 1.427-3.954-.138-5.519s-4.03-1.627-5.519-.138L9.786 8.557zm-1.023 6.68c.33.33.863.343 1.177.029l5.34-5.34c.314-.314.3-.846-.03-1.176-.33-.33-.862-.344-1.176-.03l-5.34 5.34c-.314.314-.3.846.03 1.177z'"+" fill-rule=evenodd></path></svg></span>"+link+"</span></span><span class=LinkCard-imageCell><img class=LinkCard-image alt=图标 src=https://pic.rmb.bdstatic.com/bjh/020a46e8318d66b55d73afe31805d653.jpeg></span></span>";
|
||||
|
||||
for (var i = LinkCards.length - 1; i >= 1; i--) {
|
||||
LinkCard=LinkCards[i];
|
||||
title=LinkCard.innerText;
|
||||
link=LinkCard.href;
|
||||
LinkCard.innerHTML="<span class=LinkCard-backdrop style=background-image:url(https://zhstatic.zhihu.com/assets/zhihu/editor/zhihu-card-default.svg)></span><span class=LinkCard-content><span class=LinkCard-text><span class=LinkCard-title>"+title+"</span><span class=LinkCard-meta><span style=display:inline-flex;align-items:center><svg class="+"'Zi Zi--InsertLink'"+" fill=currentColor viewBox="+"'0 0 24 24'"+" width=17 height=17><path d="+"'M6.77 17.23c-.905-.904-.94-2.333-.08-3.193l3.059-3.06-1.192-1.19-3.059 3.058c-1.489 1.489-1.427 3.954.138 5.519s4.03 1.627 5.519.138l3.059-3.059-1.192-1.192-3.059 3.06c-.86.86-2.289.824-3.193-.08zm3.016-8.673l1.192 1.192 3.059-3.06c.86-.86 2.289-.824 3.193.08.905.905.94 2.334.08 3.194l-3.059 3.06 1.192 1.19 3.059-3.058c1.489-1.489 1.427-3.954-.138-5.519s-4.03-1.627-5.519-.138L9.786 8.557zm-1.023 6.68c.33.33.863.343 1.177.029l5.34-5.34c.314-.314.3-.846-.03-1.176-.33-.33-.862-.344-1.176-.03l-5.34 5.34c-.314.314-.3.846.03 1.177z'"+" fill-rule=evenodd></path></svg></span>"+link+"</span></span><span class=LinkCard-imageCell><img class=LinkCard-image alt=图标 src=https://pic.rmb.bdstatic.com/bjh/020a46e8318d66b55d73afe31805d653.jpeg></span></span>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<a href="http://nofated.gitee.io/" class="LinkCard">Nofated's Blog</a>
|
||||
```
|
|
@ -33,20 +33,55 @@ categories:
|
|||
|
||||
### 安装 Office
|
||||
|
||||
以 Office 2021 为例,点击 *RunMe.bat*,会自动打开应用主程序。点击部署,在产品列表中默认为 ***Microsoft 365 企业应用版***,你可以选择你想要的版本(但是必须要是批量版,即后面标注 **Volume** 的,不然激活比较麻烦)。如果你不知道如何选择,那么推荐你安装 ***Office 专业增强版 2019 - 批量版(ProPlus2019Volume)*** 或 ***Office 专业增强版 2021 - 批量版(ProPlus2021Volume)***。
|
||||
以 Office 2021 为例,打开 *RunMe.bat*,会自动打开应用主程序。点击部署,在产品列表中默认为 ***Microsoft 365 企业应用版***,你可以选择你想要的版本(但是必须要是批量版,即后面标注 **Volume** 的,不然激活比较麻烦)。如果你不知道如何选择,那么推荐你安装 ***Office 专业增强版 2019 - 批量版(ProPlus2019Volume)*** 或 ***Office 专业增强版 2021 - 批量版(ProPlus2021Volume)***。
|
||||
|
||||
在*应用程序*中你可以选择安装的应用而不是安装全家桶。比如我一般只会用 Word, Excel, PowerPoint 和 Outlook。
|
||||
在「应用程序」中你可以选择安装的应用而不是安装全家桶。比如我一般只会用 Word, Excel, PowerPoint 和 Outlook。
|
||||
|
||||
在右侧的*部署设置*中,你可以根据你的电脑的体系结构选择安装64位或32位,勾选下载后安装并点击开始部署。整个过程时间不长,我大概花了15分钟(下载很快,主要是安装比较缓慢)。
|
||||
在右侧的「部署设置」中,你可以根据你的电脑的体系结构选择安装「64位」或「32位」,勾选下载后安装并点击开始部署。整个过程时间不长,我大概花了15分钟(下载很快,主要是安装比较缓慢)。
|
||||
|
||||
## 激活 Office
|
||||
|
||||
部署完成后,退回到主页并点击激活。
|
||||
部署完成后,退回到主页并点击「激活」。
|
||||
|
||||
如果你是全新安装的 Office,可以直接跳过安装许可证,直接填入 KMS 主机进行激活。
|
||||
|
||||
点击许可证管理,默认是 Office 专业增强版 2019 - 批量版,你可以选择你下载的对应版本,比如 Office 专业增强版 2021 - 批量版,点击安装许可证,会自动调用OSPP安装。如果失败了,可以点击安装许可证右侧的小三角,把有清除字眼的选项全都选一遍(bushi。
|
||||
|
||||
点击KMS 管理,在KMS 主机中填入 **kms.cangshui.net** ,端口留空。点击激活,一切正常的话,你已经完美地激活了你的 Office。
|
||||
|
||||
{% raw %}<article class="message is-warn"><div class="message-body">{% endraw %}
|
||||
KMS 主机有一定可能宕机,这里有一些其他的收集的 KMS 主机
|
||||
``` html 备用 KMS 主机
|
||||
kms.cangshui.net
|
||||
kms.cangshui.net
|
||||
kms.03k.org
|
||||
kms.chinancce.com
|
||||
kms.lotro.cc
|
||||
kms.luody.info
|
||||
zh.us.to
|
||||
kms.library.hk
|
||||
kms.tttal.com
|
||||
kms.v0v.bid
|
||||
kms.moeclub.org
|
||||
kms8.MSGuides.com
|
||||
kms9.MSGuides.com
|
||||
kms.cz9.cn
|
||||
windows.kms.app
|
||||
kms.zhuxiaole.org
|
||||
key.17108.com
|
||||
222.184.9.98
|
||||
kms.51it.wang
|
||||
kms.iaini.net
|
||||
nb.shenqw.win
|
||||
kms.srv.crsoo.com
|
||||
kms.myds.cloud
|
||||
kms.myftp.org
|
||||
kms.digiboy.ir
|
||||
kms.bige0.com
|
||||
enter.picp.net
|
||||
```
|
||||
{% raw %}</div></article>{% endraw %}
|
||||
|
||||
### 确认
|
||||
|
||||
以上操作没有出现问题的话可以进行安装的确认。你可以点击激活旁边的小三角并点击查看激活信息。
|
|
@ -13,12 +13,31 @@ Wi-Fi 问题完美解决。
|
|||
<!--more-->
|
||||
|
||||
{% raw %}<article class="message is-success"><div class="message-body">{% endraw %}
|
||||
特别鸣谢
|
||||
- [青瓷妈妈的文章](https://zhuanlan.zhihu.com/p/335640700)
|
||||
- [sysin 的文章](https://sysin.org/article/install-macos-11-on-unsupported-mac/)
|
||||
|
||||
本文基础系统为 macOS Mojave 10.14.6
|
||||
{% raw %}</div></article>{% endraw %}
|
||||
本文部分摘自
|
||||
<script type="text/javascript">
|
||||
|
||||
window.onload=function(){
|
||||
var LinkCards=document.getElementsByClassName('LinkCard');
|
||||
if(LinkCards.length != 0){
|
||||
var LinkCard=LinkCards[0];
|
||||
var link=LinkCard.href;
|
||||
var title=LinkCard.innerText;
|
||||
LinkCard.innerHTML="<style type=text/css>.LinkCard,.LinkCard:hover{text-decoration:none;border:none!important;color:inherit!important}.LinkCard{position:relative;display:block;margin:1em auto;width:390px;box-sizing:border-box;border-radius:12px;max-width:100%;overflow:hidden;color:inherit;text-decoration:none}.ztext{word-break:break-word;line-height:1.6}.LinkCard-backdrop{position:absolute;top:0;left:0;right:0;bottom:0;background-repeat:no-repeat;-webkit-filter:blur(20px);filter:blur(20px);background-size:cover;background-position:center}.LinkCard,.LinkCard:hover{text-decoration:none;border:none!important;color:inherit!important}.LinkCard-content{position:relative;display:flex;align-items:center;justify-content:space-between;padding:12px;border-radius:inherit;background-color:rgba(246,246,246,0.88)}.LinkCard-text{overflow:hidden}.LinkCard-title{display:-webkit-box;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;max-height:calc(16px * 1.25 * 2);font-size:16px;font-weight:500;line-height:1.25;color:#1a1a1a}.LinkCard-meta{display:flex;margin-top:4px;font-size:14px;line-height:20px;color:#999;white-space:nowrap}.LinkCard-imageCell{margin-left:8px;border-radius:6px}.LinkCard-image{display:block;width:60px;height:auto;border-radius:inherit}</style><span class=LinkCard-backdrop style=background-image:url(https://zhstatic.zhihu.com/assets/zhihu/editor/zhihu-card-default.svg)></span><span class=LinkCard-content><span class=LinkCard-text><span class=LinkCard-title>"+title+"</span><span class=LinkCard-meta><span style=display:inline-flex;align-items:center><svg class="+"'Zi Zi--InsertLink'"+" fill=currentColor viewBox="+"'0 0 24 24'"+" width=17 height=17><path d="+"'M6.77 17.23c-.905-.904-.94-2.333-.08-3.193l3.059-3.06-1.192-1.19-3.059 3.058c-1.489 1.489-1.427 3.954.138 5.519s4.03 1.627 5.519.138l3.059-3.059-1.192-1.192-3.059 3.06c-.86.86-2.289.824-3.193-.08zm3.016-8.673l1.192 1.192 3.059-3.06c.86-.86 2.289-.824 3.193.08.905.905.94 2.334.08 3.194l-3.059 3.06 1.192 1.19 3.059-3.058c1.489-1.489 1.427-3.954-.138-5.519s-4.03-1.627-5.519-.138L9.786 8.557zm-1.023 6.68c.33.33.863.343 1.177.029l5.34-5.34c.314-.314.3-.846-.03-1.176-.33-.33-.862-.344-1.176-.03l-5.34 5.34c-.314.314-.3.846.03 1.177z'"+" fill-rule=evenodd></path></svg></span>"+link+"</span></span><span class=LinkCard-imageCell><img class=LinkCard-image alt=图标 src=https://sysin.org/img/logo.png></span></span>";
|
||||
|
||||
for (var i = LinkCards.length - 1; i >= 1; i--) {
|
||||
LinkCard=LinkCards[i];
|
||||
title=LinkCard.innerText;
|
||||
link=LinkCard.href;
|
||||
LinkCard.innerHTML="<span class=LinkCard-backdrop style=background-image:url(https://zhstatic.zhihu.com/assets/zhihu/editor/zhihu-card-default.svg)></span><span class=LinkCard-content><span class=LinkCard-text><span class=LinkCard-title>"+title+"</span><span class=LinkCard-meta><span style=display:inline-flex;align-items:center><svg class="+"'Zi Zi--InsertLink'"+" fill=currentColor viewBox="+"'0 0 24 24'"+" width=17 height=17><path d="+"'M6.77 17.23c-.905-.904-.94-2.333-.08-3.193l3.059-3.06-1.192-1.19-3.059 3.058c-1.489 1.489-1.427 3.954.138 5.519s4.03 1.627 5.519.138l3.059-3.059-1.192-1.192-3.059 3.06c-.86.86-2.289.824-3.193-.08zm3.016-8.673l1.192 1.192 3.059-3.06c.86-.86 2.289-.824 3.193.08.905.905.94 2.334.08 3.194l-3.059 3.06 1.192 1.19 3.059-3.058c1.489-1.489 1.427-3.954-.138-5.519s-4.03-1.627-5.519-.138L9.786 8.557zm-1.023 6.68c.33.33.863.343 1.177.029l5.34-5.34c.314-.314.3-.846-.03-1.176-.33-.33-.862-.344-1.176-.03l-5.34 5.34c-.314.314-.3.846.03 1.177z'"+" fill-rule=evenodd></path></svg></span>"+link+"</span></span><span class=LinkCard-imageCell><img class=LinkCard-image alt=图标 src=https://sysin.org/img/logo.png></span></span>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<a href="https://sysin.org/article/install-macos-11-on-unsupported-mac/" class="LinkCard">在不受支持的 Mac 上安装 macOS Big Sur 11 正式版 | sysin</a>
|
||||
|
||||
## Big Sur 下载
|
||||
|
||||
|
|
|
@ -0,0 +1,126 @@
|
|||
---
|
||||
title: Ubuntu To Go 制作教程
|
||||
date: 2021-05-05 06:31:04
|
||||
cover: https://assets.ubuntu.com/v1/9d42b2ab-3B-embedded-linux_AW.svg
|
||||
tags:
|
||||
- Ubuntu
|
||||
categories:
|
||||
- 写BUG日常
|
||||
- 教程
|
||||
---
|
||||
把 Ubuntu 装进移动硬盘
|
||||
<!--more-->
|
||||
|
||||
{% raw %}<article class="message is-success"><div class="message-body">{% endraw %}
|
||||
本文安装系统为 Ubuntu 20.04.2 LTS
|
||||
{% raw %}</div></article>{% endraw %}
|
||||
本文部分摘自
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
window.onload=function(){
|
||||
var LinkCards=document.getElementsByClassName('LinkCard');
|
||||
if(LinkCards.length != 0){
|
||||
var LinkCard=LinkCards[0];
|
||||
var link=LinkCard.href;
|
||||
var title=LinkCard.innerText;
|
||||
LinkCard.innerHTML="<style type=text/css>.LinkCard,.LinkCard:hover{text-decoration:none;border:none!important;color:inherit!important}.LinkCard{position:relative;display:block;margin:1em auto;width:390px;box-sizing:border-box;border-radius:12px;max-width:100%;overflow:hidden;color:inherit;text-decoration:none}.ztext{word-break:break-word;line-height:1.6}.LinkCard-backdrop{position:absolute;top:0;left:0;right:0;bottom:0;background-repeat:no-repeat;-webkit-filter:blur(20px);filter:blur(20px);background-size:cover;background-position:center}.LinkCard,.LinkCard:hover{text-decoration:none;border:none!important;color:inherit!important}.LinkCard-content{position:relative;display:flex;align-items:center;justify-content:space-between;padding:12px;border-radius:inherit;background-color:rgba(246,246,246,0.88)}.LinkCard-text{overflow:hidden}.LinkCard-title{display:-webkit-box;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;max-height:calc(16px * 1.25 * 2);font-size:16px;font-weight:500;line-height:1.25;color:#1a1a1a}.LinkCard-meta{display:flex;margin-top:4px;font-size:14px;line-height:20px;color:#999;white-space:nowrap}.LinkCard-imageCell{margin-left:8px;border-radius:6px}.LinkCard-image{display:block;width:60px;height:auto;border-radius:inherit}</style><span class=LinkCard-backdrop style=background-image:url(https://zhstatic.zhihu.com/assets/zhihu/editor/zhihu-card-default.svg)></span><span class=LinkCard-content><span class=LinkCard-text><span class=LinkCard-title>"+title+"</span><span class=LinkCard-meta><span style=display:inline-flex;align-items:center><svg class="+"'Zi Zi--InsertLink'"+" fill=currentColor viewBox="+"'0 0 24 24'"+" width=17 height=17><path d="+"'M6.77 17.23c-.905-.904-.94-2.333-.08-3.193l3.059-3.06-1.192-1.19-3.059 3.058c-1.489 1.489-1.427 3.954.138 5.519s4.03 1.627 5.519.138l3.059-3.059-1.192-1.192-3.059 3.06c-.86.86-2.289.824-3.193-.08zm3.016-8.673l1.192 1.192 3.059-3.06c.86-.86 2.289-.824 3.193.08.905.905.94 2.334.08 3.194l-3.059 3.06 1.192 1.19 3.059-3.058c1.489-1.489 1.427-3.954-.138-5.519s-4.03-1.627-5.519-.138L9.786 8.557zm-1.023 6.68c.33.33.863.343 1.177.029l5.34-5.34c.314-.314.3-.846-.03-1.176-.33-.33-.862-.344-1.176-.03l-5.34 5.34c-.314.314-.3.846.03 1.177z'"+" fill-rule=evenodd></path></svg></span>"+link+"</span></span><span class=LinkCard-imageCell><img class=LinkCard-image alt=图标 src=https://www.littleqiu.net/images/Avatar.png></span></span>";
|
||||
|
||||
for (var i = LinkCards.length - 1; i >= 1; i--) {
|
||||
LinkCard=LinkCards[i];
|
||||
title=LinkCard.innerText;
|
||||
link=LinkCard.href;
|
||||
LinkCard.innerHTML="<span class=LinkCard-backdrop style=background-image:url(https://zhstatic.zhihu.com/assets/zhihu/editor/zhihu-card-default.svg)></span><span class=LinkCard-content><span class=LinkCard-text><span class=LinkCard-title>"+title+"</span><span class=LinkCard-meta><span style=display:inline-flex;align-items:center><svg class="+"'Zi Zi--InsertLink'"+" fill=currentColor viewBox="+"'0 0 24 24'"+" width=17 height=17><path d="+"'M6.77 17.23c-.905-.904-.94-2.333-.08-3.193l3.059-3.06-1.192-1.19-3.059 3.058c-1.489 1.489-1.427 3.954.138 5.519s4.03 1.627 5.519.138l3.059-3.059-1.192-1.192-3.059 3.06c-.86.86-2.289.824-3.193-.08zm3.016-8.673l1.192 1.192 3.059-3.06c.86-.86 2.289-.824 3.193.08.905.905.94 2.334.08 3.194l-3.059 3.06 1.192 1.19 3.059-3.058c1.489-1.489 1.427-3.954-.138-5.519s-4.03-1.627-5.519-.138L9.786 8.557zm-1.023 6.68c.33.33.863.343 1.177.029l5.34-5.34c.314-.314.3-.846-.03-1.176-.33-.33-.862-.344-1.176-.03l-5.34 5.34c-.314.314-.3.846.03 1.177z'"+" fill-rule=evenodd></path></svg></span>"+link+"</span></span><span class=LinkCard-imageCell><img class=LinkCard-image alt=图标 src=https://www.littleqiu.net/images/Avatar.png></span></span>";
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<a href="https://www.littleqiu.net/ubuntu-to-go/" class="LinkCard">Ubuntu To Go | 制作属于你的随身 Ubuntu 系统盘</a>
|
||||
|
||||
## 准备
|
||||
|
||||
- 一个大于8GB的U盘或者移动硬盘
|
||||
- [Vmware Workstation](https://www.vmware.com/products/workstation-pro/workstation-pro-evaluation.html)
|
||||
- Ubuntu [安装盘](https://mirrors.163.com/ubuntu-releases)
|
||||
- 一个可以联网的计算机
|
||||
|
||||
## 安装
|
||||
|
||||
### 准备虚拟机
|
||||
|
||||
插入你的U盘
|
||||
![打开 Vmware Workstation,创建新的虚拟机。选择「自定义」](https://pic.rmb.bdstatic.com/bjh/21efba4fbd06c5a2f2429ecf2e07f675.png)
|
||||
![选择「稍后安装系统」,否则 Vmware 会自动启动快速安装](https://pic.rmb.bdstatic.com/bjh/41ba8fcb22db1a3781c2c49896c2252d.png)
|
||||
|
||||
内存最好打一点,不然比较卡(
|
||||
|
||||
接下来的磁盘设置就比较重要了。这是决定你的系统安装位置的设置项。
|
||||
|
||||
![I/O 控制器种类选择 「LSI Logic」](https://pic.rmb.bdstatic.com/bjh/4425f0e6975422d6ae284da48c9dca85.png)
|
||||
![磁盘类型选择 「SCSI」](https://pic.rmb.bdstatic.com/bjh/ac1f3199e0016a0358c7f3f04ab7643d.png)
|
||||
![选择「物理磁盘」,使用情况选择「使用整个磁盘」](https://pic.rmb.bdstatic.com/bjh/5325cb4d3ca323b53b6697bd3453100e.png)
|
||||
这个时候就要小心一点了,因为要设置安装的硬盘。你可以根据你的电脑有几个实体硬盘来判断。比如只有一个实体硬盘的你新插入的U盘应该是 PhysicalDrive 1,如果有两个则是 PhysicalDrive 2。如果你不确定的话可以右键此电脑,选择「管理」,点击「磁盘管理」,查看盘号。
|
||||
![](https://pic.rmb.bdstatic.com/bjh/9a13d49b24cfe407afa099eacd126304.png)
|
||||
如果 Vmware 没有识别到你的U盘,多半是因为你先打开的 Vmware 后插入的U盘,这个时候你需要关掉虚拟机重新打开。
|
||||
![点击「自定义配置」,在「新 CD/DVD」配置项中选择「使用 ISO 映像文件」并选择你下载好的 Ubuntu 系统安装镜像](https://pic.rmb.bdstatic.com/bjh/cba0505f26e76be20f4df8ceb997aa9b.png)
|
||||
|
||||
### 安装 Ubuntu
|
||||
|
||||
![先不要开机,点击小三角并选择「打开电源时进入固件」](https://pic.rmb.bdstatic.com/bjh/227eaf1427d525c1109ff20381ca4a32.png)
|
||||
![将光驱调到硬盘之前,并F10保存退出](https://pic.rmb.bdstatic.com/bjh/b0aaca023b8267c257355aa33d973bba.png)
|
||||
在安装界面选择「试用 Ubuntu」
|
||||
|
||||
![进入 LiveCD 后先点击右上角,选择「系统设置」,然后点击「显示」,把分辨率调整到一个合适的大小,否则因为安装时你八成不会看到完整的分区界面](https://pic.rmb.bdstatic.com/bjh/19e9bdac7e4beb9e2e33e852d29c4ff4.png)
|
||||
点击桌面的安装程序进行常规安装。在选择安装类型的时候要选「其他选项」。我们要对硬盘进行分区。
|
||||
|
||||
>一般来说全新的 U 盘都会有一个 FAT32/NTFS/exFAT 分区,把这个分区删掉。在磁盘前部建立一个大小为 200MB 的 FAT32 分区作为 EFI 分区,必须是主分区,挂载点为 /boot/efi。然后建立根分区(挂载点为 /),这个分区也必须是主分区。你可以按你的喜好来配置根分区,我的建议是分区大小不小于 10GB,分区格式为 EXT4。你也可以按照个人喜好给 /usr,/home,/var,/tmp 等目录单独划分分区。如果你的 U 盘容量比较大,可以在磁盘后部留下一点空闲的空间,安装完成后把这部分空间单独划分出一个 NTFS 分区来,你的 Ubuntu To Go 系统盘还能继续当 U 盘使。————摘自[《Ubuntu To Go | 制作属于你的随身 Ubuntu 系统盘 | DreamCity》](https://www.littleqiu.net/ubuntu-to-go/)
|
||||
|
||||
![如图所示是上文的分区方式](https://pic.rmb.bdstatic.com/bjh/ebb54add4cd1845376fc2702f7d4ca76.png)
|
||||
|
||||
如果你确定你做好了分区,那么就点击「现在安装」进行下一步的配置。一般来说也是一路 Next 下去,设置一下个人信息就好了。如果确认设置无误,可以正式开始安装。因为 U 盘的读写性能比较低而且虚拟机有性能损耗,安装过程会比较长,不过一般都会在一个小时内结束。(所以建议拿读写速度快的硬盘安装)
|
||||
![](https://pic.rmb.bdstatic.com/bjh/1351ecb335ec23b88b71797611c633af.png)
|
||||
![安装完成后点击继续试用然后点击右上角关机](https://pic.rmb.bdstatic.com/bjh/11017f89f5246b1cc14eb2cc21d67f39.png)
|
||||
|
||||
![关机后打开虚拟机设置,将「选项」选项卡中「高级」设置项中的「通过 EFI 而非 BIOS 引导」选中,然后点击「确定」](https://pic.rmb.bdstatic.com/bjh/9dc9dd1ed5cb57872072dd00b97d36e7.png)
|
||||
![重新开启虚拟机,点击「Enter」](https://pic.rmb.bdstatic.com/bjh/1cee303d98eed696ec54d6ae22a79257.png)
|
||||
|
||||
在 LiveCD 中,打开终端
|
||||
|
||||
``` bash 获取 root 权限
|
||||
sudo -s
|
||||
```
|
||||
``` bash 查看分区
|
||||
fdisk -l
|
||||
```
|
||||
![如图,`/dev/sda1` 是格式为 FAT32 的 EFI 分区,`/dev/sda2` 是格式为 EXT4 的根分区](https://pic.rmb.bdstatic.com/bjh/049248ea48ab78f64d727a74b970a616.png)
|
||||
``` bash 挂载分区
|
||||
mount /dev/sda2 /mnt
|
||||
mount /dev/sda1 /mnt/boot/efi
|
||||
mount --options bind /dev /mnt/dev
|
||||
mount --options bind /proc /mnt/proc
|
||||
mount --options bind /sys /mnt/sys
|
||||
mount --options bind /run /mnt/run
|
||||
# 如果你有划分其他分区,最好也挂载它们。如下指令为挂载 /dev/sda3 为 /home。
|
||||
# mount /dev/sda3 /mnt/home
|
||||
```
|
||||
{% raw %}<div class="notification is-danger">{% endraw %}
|
||||
可能你和我的分区存在差异,只要将 sda1 或 sda2 更换成你现实的就好了。在挂载时要先挂载根分区再挂载 EFI 分区
|
||||
{% raw %}</div>{% endraw %}
|
||||
|
||||
``` bash 进入 Chroot 环境
|
||||
chroot /mnt
|
||||
```
|
||||
|
||||
```
|
||||
root@ubuntu:/# apt-get install grub-efi
|
||||
|
||||
正在读取软件包列表...
|
||||
完成正在分析软件包的依赖关系树
|
||||
正在读取状态信息... 完成
|
||||
有一些软件包无法被安装。如果您用的是 unstable 发行版,这也许是因为系统无法达到您要求的状态造成的。该版本中可能会有一些您需要的软件包尚未被创建或是它们已被从新到(Incoming)目录移出。下列信息可能会对解决问题有所帮助:
|
||||
下列软件包有未满足的依赖关系:
|
||||
grub-efi :
|
||||
依赖: grub-common (= 2.04-1ubuntu26.2) 但是 2.04-1ubuntu26.8 正要被安装
|
||||
依赖: grub-efi-amd64 (= 2.04-1ubuntu26.2) 但是它将不会被安装
|
||||
E: 无法修正错误,因为您要求某些软件包保持现状,就是它们破坏了软件包间的依赖关系。
|
||||
```
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: 关于
|
||||
cover: https://bing.biturl.top/?resolution=1920&format=image&index=0&mkt=zh-CN
|
||||
date: 2020-10-01 00:00:00
|
||||
date: 2007-06-09 00:00:00
|
||||
---
|
||||
想了又想,决定还是把关于博客和关于我分开写
|
||||
|
||||
|
@ -9,11 +9,11 @@ date: 2020-10-01 00:00:00
|
|||
|
||||
## 关于博客
|
||||
|
||||
这个小博客历经了很多次改版。原定的是一个基于 WordPress 的资源站或者镜像站。但很后来认清事实后还是老老实实写博客。选用 Gridea,但最终因为没有我喜欢的主题并且我不会构建重写的 Gridea,我最终选择了 Hexo + Icarus 进行写作并沿用至今。
|
||||
眼前的这个不起眼的小博客大致始于 2019 年年末到 2020 年年初。历经了很多次改版。原定的是一个基于 WordPress 的软件资源站或者开源镜像站。但是后来认清事实后还是老老实实用了静态页面+Pages。最开始使用 Gridea 进行写作,但最终因为没有我喜欢的主题并且我不会构建重新写的 Gridea,我最终选择了 Hexo + Icarus 进行写作并沿用至今。一般这个博客用来记录一些我在网络上学会的或者自己总结的一些东西。偶尔也会记录一些生活上学习上的故事。
|
||||
|
||||
2020年年末时由于种种原因,原先写博客的电脑坏了,虽然文件没有丢失,但是我没有给博客的源文件做备份,我也暂时碰不到它,于是在2021年初的寒假,我开始着手进行博客的重写恢复工作。这期间一开始使用一台 Samsung Galaxy S6,但又因为这个手机后来也坏了,我没备份,我就又用 Ubuntu To Go 和我爸爸原来的老电脑重新写博客。
|
||||
2020年年末时由于种种原因,原先写博客的电脑坏了,虽然文件没有丢失,但是我没有给博客的源文件做备份,我也暂时碰不到它,于是在2021年初的寒假,我开始着手进行博客的重写恢复工作。这期间一开始使用一台 Samsung Galaxy S6,但又因为这个手机后来也坏了,我没备份,我就又用 Ubuntu To Go 和我爸爸原来的老电脑重新写博客。现在,博客的主力军主要徘徊在原先写博客的电脑和一个 Windows To Go。毕竟 Ubuntu 等 Linux 系的系统我没有办法驾驭地很好。
|
||||
|
||||
目前博客有两个域名 https://nofated095.github.io 和 http://nofated.gitee.io 这两个站点分别架设在国际的 Github Pages 和国内的 Gitee Pages上。正在考虑将来购买一个域名并租用服务器进行域名跳转服务。
|
||||
目前博客有两个域名 https://nofated095.github.io 和 http://nofated.gitee.io 这两个站点分别架设在国际的 Github Pages 和国内的 Gitee Pages上。虽然说我一直很想去给自己找一个域名,可奈何不了域名都很贵,而且申请域名的繁杂步骤让我很烦,目前以 Gitee Pages 为主力军,我尽量将部署在 Github 上的博客尽可能做一些加速。
|
||||
|
||||
## 关于我
|
||||
|
||||
|
@ -25,32 +25,29 @@ Hi, 我是 Nofated,很高兴可以在这里见到你!
|
|||
|
||||
### 学业
|
||||
|
||||
我居住在北京,正在准备中考,很快在2021年下半学期我就要参加生物和地理的中考,结束时候我就升入初三该开始没日没夜的学习了。所以可能我会在网络上消失一段时间。
|
||||
我居住在北京,正在准备中考,目前已经是一名忙成狗的初三学生。虽然学习比较忙但是我尽量抽空去写一写编一编文章。
|
||||
|
||||
### 游戏
|
||||
|
||||
最喜欢的游戏是 Minecraft,没有什么理由,最开始接触到它是大概小学三四年级的时候。目前热衷于生电领域,但是我还很弱,目前是两个服务器的成员(也许很快就不是了)。
|
||||
最喜欢的游戏是 Minecraft,没有什么理由,最开始接触到它是大概小学三四年级的时候。目前热衷于生电领域,但是我还很弱,目前是 [Redstone Expermental Server](http://rems.gitee.io) 的一员。
|
||||
|
||||
### 编程
|
||||
|
||||
我接触的语言很少很少,目前正在学习 Python3。我最开始正式学习的语言是 HTML5,但我现在有时还需要看看菜鸟编程(。目前我还没有独自写过任何项目,也没有参与编写过任何项目,也许这还需要一段时间。
|
||||
我接触的语言很少很少,我记得最开始接触的语言是 HTML5 但是没有好好学。真正认认真真学的语言是 Windows 的批处理。目前正在学习 Python3。我最开始正式学习的语言是 HTML5,但我现在有时还需要看看菜鸟编程(。目前我还没有独自写过任何项目,也没有参与编写过任何项目。但是没事的时候,我会根据我自己的使用情况对一些已经停止更新的项目进行一些小更新。比如我更新的 [deepin-wine-ubuntu](https://github.com/Nofated095/deepin-wine-ubuntu)。
|
||||
|
||||
### 习惯
|
||||
|
||||
目前日常使用的操作系统是 Ubuntu To Go(Ubuntu 20.10),有时也会用 Windows 系的操作系统或者 macOS。手机是一台 Nokia 230,平时就拿来打电话和听音乐,闲的没事会看看番剧。
|
||||
目前日常使用的操作系统是 macOS Big Sur 11.4,有时也会用 Windows 操作系统或者 Ubuntu。手机是一台 Nokia 230,平时就拿来打电话和听音乐,闲的没事会看看番剧。
|
||||
|
||||
### 番剧
|
||||
|
||||
- 《魔物娘的同居生活》\
|
||||
- 《工作细胞》\
|
||||
- 《JOJO的奇妙冒险》/
|
||||
- 《四月是你的谎言》\
|
||||
- 《工作细胞 BLACK》/
|
||||
- 《工作细胞第二季》/
|
||||
|
||||
\:已刷完
|
||||
/:没刷完或正在刷
|
||||
- [x] -《魔物娘的同居生活》
|
||||
- [x] -《工作细胞》
|
||||
- [ ] -《JOJO的奇妙冒险》
|
||||
- [x] -《四月是你的谎言》
|
||||
- [ ] -《工作细胞 BLACK》
|
||||
- [ ] -《工作细胞第二季》
|
||||
|
||||
### 性格
|
||||
|
||||
不好说,也许是最近刚进入青春期的原因,人比较nt,也不太会安慰人。不喜欢被别人控制,想法比较中立。我的话经常不过脑子就说出来。
|
||||
之前网上很聊得来的小伙伴似乎很多都患有抑郁症或者焦虑症。之前怀疑自己有,但是照目前来看应该是没有任何问题。我比较乐观,可能比较偏理想主义。说实话,我没有对任何事情比较深地焦虑过。我本身
|
|
@ -36,7 +36,8 @@ class Footer extends Component {
|
|||
<p class="is-size-7">
|
||||
<span dangerouslySetInnerHTML={{ __html: `© ${siteYear} ${author || siteTitle}` }}></span>
|
||||
Powered by <a href="https://hexo.io/" target="_blank" rel="noopener">Hexo</a> &
|
||||
<a href="https://github.com/ppoffice/hexo-theme-icarus" target="_blank" rel="noopener">Icarus</a>
|
||||
<a href="https://github.com/ppoffice/hexo-theme-icarus" target="_blank" rel="noopener">Icarus</a> &
|
||||
<a href="https://pages.github.com/" target="_blank" rel="noopener">Github Pages</a>
|
||||
{showVisitorCounter ? <br /> : null}
|
||||
{showVisitorCounter ? <span id="busuanzi_container_site_uv"
|
||||
dangerouslySetInnerHTML={{ __html: visitorCounterTitle }}></span> : null}
|
||||
|
|
|
@ -4,7 +4,11 @@ const logger = require('hexo-log')();
|
|||
/**
|
||||
* Print welcome message
|
||||
*/
|
||||
logger.info(`=======================================
|
||||
logger.info(`Welcome to Soviet Union
|
||||
Here is the offical site of CCCP
|
||||
https://gov.com.su
|
||||
SOVIET UNION
|
||||
=======================================
|
||||
██╗ ██████╗ █████╗ ██████╗ ██╗ ██╗███████╗
|
||||
██║██╔════╝██╔══██╗██╔══██╗██║ ██║██╔════╝
|
||||
██║██║ ███████║██████╔╝██║ ██║███████╗
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"extends": "airbnb-base",
|
||||
"plugins": [
|
||||
"import"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,90 @@
|
|||
<!--
|
||||
IF YOU DON'T FILL OUT THE FOLLOWING INFORMATION OR YOU DON'T READ THE DOCS AND CONFIGURE YOUR CONFIG CAREFULLY 】WE MIGHT CLOSE YOUR ISSUE WITHOUT INVESTIGATING
|
||||
|
||||
ATTENTION: THE DOCS MIGHT UPDATE ANYTIME, AND BEFORE YOU OPEN A NEW ISSUE, CHECK THE DOCS AGAIN.
|
||||
|
||||
如果你不填充下面的内容,或者你没有仔细阅读相关文档,或者合理地配置你的配置文件,我们可能会直接关闭你的 issue。
|
||||
|
||||
注意:文档可能随时都会更新。在提交一个 issue 前,请重新查看相关文档。
|
||||
-->
|
||||
|
||||
**I certify that I have first consulted** (check with "x")
|
||||
|
||||
**我确认我已经查看了** (选择时请使用 "x" 取代方括号中的空格)
|
||||
|
||||
- [ ] [Hexo documentation | Hexo 文档](https://hexo.io/docs/)
|
||||
- [ ] [Suka Theme documentation | Suka Theme 文档](https://theme-suka.skk.moe/docs/)
|
||||
- [ ] [Suka theme issues | Suka 主题的其它 issue](https://github.com/SukkaW/hexo-theme-suka/issues?utf8=%E2%9C%93&q=is%3Aissue)
|
||||
|
||||
----
|
||||
|
||||
## I'm submitting a (check one with "x")
|
||||
|
||||
## 我正在申请 (选择时请使用 "x" 取代方括号中的空格)
|
||||
|
||||
- [ ] bug report | 反馈一个 Bug
|
||||
- [ ] feature request | 申请添加新的特性或功能
|
||||
- [ ] support request | 请求技术支持
|
||||
|
||||
----
|
||||
|
||||
## 如果你遇到了运行 `hexo g` `hexo s` 时报错
|
||||
## If you get error when you are running `hexo s` `hexo g`.
|
||||
|
||||
### Node.js and NPM Information
|
||||
### Node.js 和 NPM 的相关信息
|
||||
<!-- Paste output from `node -v && npm -v` (粘贴 `node -v && npm -v` 输出的信息) -->
|
||||
|
||||
|
||||
### Package dependencies Information
|
||||
### 依赖包相关信息
|
||||
<!-- Paste output from `cat package.json` both from site and theme dir (分别从站点目录和主题目录下粘贴 `cat package.json` 输出的信息) -->
|
||||
|
||||
|
||||
### Hexo version
|
||||
### Hexo 版本号
|
||||
<!-- Paste output from `hexo -v` (粘贴 `hexo -v` 输出的信息) -->
|
||||
|
||||
|
||||
### Hexo & Theme Configuration
|
||||
### 站点配置文件和主题配置文件
|
||||
<!-- Paste USEFUL configuration from Hexo `_config.yml` (从 Hexo 和主题目录下的 `_config.yml` 中粘贴 有用的 信息) -->
|
||||
|
||||
|
||||
### Error Log
|
||||
### 报错日志
|
||||
<!-- Only paste USEFUL log 务必仅粘贴有用的日志 -->
|
||||
|
||||
|
||||
----
|
||||
|
||||
## 如果你在浏览器中发现了问题
|
||||
## If you find something wrong when visiy your blog in browser.
|
||||
|
||||
### Which device am I using, such as Android, iOS, Windows, Linux, MacOS
|
||||
### 我使用的平台,如 Android、iOS、Windows、Linux、MacOS 等
|
||||
|
||||
|
||||
### Which brows am I using, such as Chrome 58.0.3029.110 (64-bit)
|
||||
### 我使用的浏览器(如 Chrome 58.0.3029.110 64 位)
|
||||
|
||||
|
||||
### Dev Tool - Console.log
|
||||
### 开发者面板的控制台日志
|
||||
|
||||
|
||||
### What you are expected and what you actually get
|
||||
### 预期结果和你的实际结果
|
||||
|
||||
|
||||
----
|
||||
|
||||
### Demo site related with this issue, JSFiddle and gist are welcomed.
|
||||
### 和 issue 有关的在线演示页面,推荐使用 JSFiddle 和 gist
|
||||
|
||||
|
||||
### Link(s) to source code or any usefull link(s)
|
||||
### 相关源码或有用资源的入口
|
||||
|
||||
|
||||
<!-- ----------- -->
|
|
@ -0,0 +1,86 @@
|
|||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
|
||||
---
|
||||
|
||||
<!--
|
||||
IF YOU DON'T FILL OUT THE FOLLOWING INFORMATION OR YOU DON'T READ THE DOCS AND CONFIGURE YOUR CONFIG CAREFULLY 】WE MIGHT CLOSE YOUR ISSUE WITHOUT INVESTIGATING
|
||||
|
||||
ATTENTION: THE DOCS MIGHT UPDATE ANYTIME, AND BEFORE YOU OPEN A NEW ISSUE, CHECK THE DOCS AGAIN.
|
||||
|
||||
如果你不填充下面的内容,或者你没有仔细阅读相关文档,或者合理地配置你的配置文件,我们可能会直接关闭你的 issue。
|
||||
|
||||
注意:文档可能随时都会更新。在提交一个 issue 前,请重新查看相关文档。
|
||||
-->
|
||||
|
||||
**I certify that I have first consulted** (check with "x")
|
||||
|
||||
**我确认我已经查看了** (选择时请使用 "x" 取代方括号中的空格)
|
||||
|
||||
- [ ] [Hexo documentation | Hexo 文档](https://hexo.io/docs/)
|
||||
- [ ] [Suka Theme documentation | Suka Theme 文档](https://theme-suka.skk.moe/docs/)
|
||||
- [ ] [Suka theme issues | Suka 主题的其它 issue](https://github.com/SukkaW/hexo-theme-suka/issues?utf8=%E2%9C%93&q=is%3Aissue)
|
||||
|
||||
----
|
||||
|
||||
## 如果你遇到了运行 `hexo g` `hexo s` 时报错
|
||||
## If you get error when you are running `hexo s` `hexo g`.
|
||||
|
||||
### Node.js and NPM Information
|
||||
### Node.js 和 NPM 的相关信息
|
||||
<!-- Paste output from `node -v && npm -v` (粘贴 `node -v && npm -v` 输出的信息) -->
|
||||
|
||||
|
||||
### Package dependencies Information
|
||||
### 依赖包相关信息
|
||||
<!-- Paste output from `cat package.json` both from site and theme dir (分别从站点目录和主题目录下粘贴 `cat package.json` 输出的信息) -->
|
||||
|
||||
|
||||
### Hexo version
|
||||
### Hexo 版本号
|
||||
<!-- Paste output from `hexo -v` (粘贴 `hexo -v` 输出的信息) -->
|
||||
|
||||
|
||||
### Hexo & Theme Configuration
|
||||
### 站点配置文件和主题配置文件
|
||||
<!-- Paste USEFUL configuration from Hexo `_config.yml` (从 Hexo 和主题目录下的 `_config.yml` 中粘贴 有用的 信息) -->
|
||||
|
||||
|
||||
### Error Log
|
||||
### 报错日志
|
||||
<!-- Only paste USEFUL log 务必仅粘贴有用的日志 -->
|
||||
|
||||
|
||||
----
|
||||
|
||||
## 如果你在浏览器中发现了问题
|
||||
## If you find something wrong when visiy your blog in browser.
|
||||
|
||||
### Which device am I using, such as Android, iOS, Windows, Linux, MacOS
|
||||
### 我使用的平台,如 Android、iOS、Windows、Linux、MacOS 等
|
||||
|
||||
|
||||
### Which brows am I using, such as Chrome 58.0.3029.110 (64-bit)
|
||||
### 我使用的浏览器(如 Chrome 58.0.3029.110 64 位)
|
||||
|
||||
|
||||
### Dev Tool - Console.log
|
||||
### 开发者面板的控制台日志
|
||||
|
||||
|
||||
### What you are expected and what you actually get
|
||||
### 预期结果和你的实际结果
|
||||
|
||||
|
||||
----
|
||||
|
||||
### Demo site related with this issue, JSFiddle and gist are welcomed.
|
||||
### 和 issue 有关的在线演示页面,推荐使用 JSFiddle 和 gist
|
||||
|
||||
|
||||
### Link(s) to source code or any usefull link(s)
|
||||
### 相关源码或有用资源的入口
|
||||
|
||||
|
||||
<!-- ----------- -->
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
|
||||
---
|
||||
|
||||
### Describe what you need.
|
||||
### 介绍你需要的特性
|
||||
|
||||
### Demo site related with this issue, JSFiddle and gist are welcomed.
|
||||
### 和 issue 有关的在线演示页面,推荐使用 JSFiddle 和 gist
|
||||
|
||||
|
||||
### Link(s) to source code or any usefull link(s)
|
||||
### 相关源码或有用资源的入口
|
|
@ -0,0 +1,45 @@
|
|||
<!--
|
||||
IF YOU DON'T FILL OUT THE FOLLOWING INFORMATION WE MIGHT CLOSE YOUR PULL REQUESTS WITHOUT INVESTIGATING
|
||||
-->
|
||||
|
||||
**Contributing rules**
|
||||
|
||||
- Fork the repo and create your branch from `canary`. Then be sure to put the `canary` branch as the target for your pull request.
|
||||
- Please be sure to follow the [contributing guidelines](https://github.com/SukkaW/hexo-theme-suka/blob/master/CONTRIBUTING.md), especially for commit message.
|
||||
- Remove the `Contributing rules` part from this description if you like.
|
||||
- Fill out the other parts from this description.
|
||||
|
||||
> If you don't do so, we might change your pull request's title and using `squash` to merge your changed.
|
||||
|
||||
<!-- ----------- -->
|
||||
|
||||
## Please check if your PR fulfills the following requirements:
|
||||
|
||||
- [ ] The commit message follows our guidelines.
|
||||
- [ ] Tests for the changes have been added (for bug fixes / new features).
|
||||
- [ ] Docs have been added / updated (for bug fixes / new features).
|
||||
|
||||
## What kind of change does this PR introduce? (check with "x")
|
||||
|
||||
- [ ] Bug fix
|
||||
- [ ] Feature
|
||||
- [ ] Code style update (formatting, local variables)
|
||||
- [ ] Refactoring (no functional changes, no api changes)
|
||||
- [ ] Build related changes
|
||||
- [ ] CI related changes
|
||||
- [ ] Other... Please describe:
|
||||
|
||||
## Does this PR introduce a breaking change? (check one with "x")
|
||||
|
||||
- [ ] Yes
|
||||
- [ ] No
|
||||
|
||||
____
|
||||
|
||||
## Description
|
||||
|
||||
|
||||
____
|
||||
|
||||
## Verification steps
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
.DS_Store
|
||||
|
||||
*.log
|
||||
|
||||
_config.yml
|
||||
|
||||
node_modules
|
||||
|
||||
.idea
|
||||
|
||||
.directory
|
||||
|
||||
package-lock.json
|
|
@ -0,0 +1,31 @@
|
|||
language: node_js
|
||||
node_js:
|
||||
- "8"
|
||||
- "10"
|
||||
- "12"
|
||||
git:
|
||||
depth: 5
|
||||
quiet: true
|
||||
before_install:
|
||||
- rm -rf .git
|
||||
- npm set audit false
|
||||
install:
|
||||
- cd ..
|
||||
- git clone https://github.com/theme-suka/hexo-theme-unit-test.git --depth=2
|
||||
- rm -rf hexo-theme-unit-test/.git
|
||||
- mkdir -p suka-theme-test
|
||||
- mv -f hexo-theme-unit-test/* suka-theme-test
|
||||
- cd suka-theme-test
|
||||
- npm i > /dev/null
|
||||
- chmod +x ./install-theme.sh
|
||||
- ./install-theme.sh
|
||||
script:
|
||||
- chmod +x ./build.sh
|
||||
- ./build.sh
|
||||
- chmod +x ./deploy.sh
|
||||
- ./deploy.sh > /dev/null
|
||||
cache:
|
||||
directories:
|
||||
- /home/travis/build/SukkaW/suka-theme-test/themes/suka/node_modules
|
||||
- /home/travis/build/SukkaW/suka-theme-test/node_modules
|
||||
timeout: 60
|
|
@ -0,0 +1,150 @@
|
|||
|
||||
|
||||
# Commit message format
|
||||
|
||||
*Read this in other languages: [English](CONTRIBUTING.md), [简体中文](CONTRIBUTING.zh-cn.md).*
|
||||
|
||||
## 1. Title (Header)
|
||||
|
||||
**(1)type**
|
||||
|
||||
`type` is used to describe the commit class. It must be one of the following:
|
||||
|
||||
- feat: A new feature
|
||||
- fix: A bug fix
|
||||
- docs: Documentation related, such as changes on GitHub template or README.
|
||||
- style: Changes that related to UI/UX or some small changes at appearance.
|
||||
- codestyle: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
|
||||
- refactor: A code change that neither fixes a bug nor adds a feature
|
||||
- test: Adding missing tests or correcting existing tests
|
||||
- chore: Changes that affect the build system or external dependencies
|
||||
- merge: Merge Pull Request
|
||||
- str: Including but not limited to the changes in the directory and the establishment of the theme structure
|
||||
|
||||
|
||||
**(2)scope**
|
||||
|
||||
`scope` is used to describe the scope of the impact of commit, such as sns, lang, share, post.
|
||||
|
||||
`scope` is placed after `type` and within parenthesis (`()`).
|
||||
|
||||
**(3)subject**
|
||||
|
||||
`subject` is a short description of the commit purpose, not more than 50 characters.
|
||||
|
||||
- starts with a verb and uses the first person present, such as change, not changed or changes
|
||||
- The first letter is lowercase
|
||||
- End without a period (.)
|
||||
|
||||
---
|
||||
|
||||
See #119 `refactor(sns): simplify conditional display` for example.
|
||||
|
||||
## 2. Body
|
||||
|
||||
Body is a detailed description that can be divided into multiple lines. The following is an example.
|
||||
|
||||
> More detailed explanatory text, if necessary.
|
||||
|
||||
> Further paragraphs come after blank lines.
|
||||
|
||||
> - Bullet points are okay, too
|
||||
- Use a hanging indent
|
||||
|
||||
There are two points to note:
|
||||
|
||||
(1) Use the first person present, such as `change` instead of `changed` or `changes`.
|
||||
|
||||
(2) The motivation for the code change should be stated, as well as the comparison with the previous behavior.
|
||||
|
||||
## 3. Footer
|
||||
|
||||
The Footer section is used only in two cases.
|
||||
|
||||
** (1) Incompatible changes **
|
||||
|
||||
If the current code is incompatible with the previous version, the Footer section begins with `BREAKING CHANGE`, followed by a description of the change, along with the reason for the change and the migration method.
|
||||
|
||||
BREAKING CHANGE: isolate scope bindings definition has changed.
|
||||
|
||||
To migrate the code follow the example below:
|
||||
|
||||
Before:
|
||||
|
||||
scope: {
|
||||
myAttr: 'attribute',
|
||||
}
|
||||
|
||||
After:
|
||||
|
||||
scope: {
|
||||
myAttr: '@',
|
||||
}
|
||||
|
||||
The removed `inject` wasn't generally useful for directives so there should be no code using it.
|
||||
|
||||
** (2) Close Issue **
|
||||
|
||||
If the current commit is for an issue, then you can close the issue in the Footer section.
|
||||
|
||||
Closes #234
|
||||
|
||||
You can also close more than one issue at a time.
|
||||
|
||||
Closes #123, #245, #992.
|
||||
|
||||
## 4. Revert
|
||||
|
||||
There is also a special case that if the current commit is used to revoke a previous commit, it must begin with `revert:` followed by the commit header.
|
||||
|
||||
revert: feat(pencil): add 'graphiteWidth' option
|
||||
|
||||
This reverts commit 667ecc1654a317a13331b17617d973392f415f02.
|
||||
|
||||
Body part of the format is fixed, must be written as `This reverts commit <hash>.`, Where `hash` is revoked SHA identifier of the commit.
|
||||
|
||||
If the current commit is in the same release as the revoked commit, they will not appear in the Change log. If the two are in different releases, the current commit will appear in the Change log under the `Reverts` subtitle.
|
||||
|
||||
## 5. Merge
|
||||
|
||||
When merging Pull Request, use `merge` as type of commit, use the number as scope of commit. This is an example: `merge(#402): merge feat/footer_text into canary`
|
||||
|
||||
When merging a pull request using Squash,fill subject with the summary of the changes,fill body with bullet points with every commit information(GitHub will automatically generate it for you when you are at github.com)
|
||||
|
||||
|
||||
A Branch should include this three parts, and use `/` as sseparator:
|
||||
|
||||
- type
|
||||
- scope
|
||||
- subject
|
||||
|
||||
# Branch name format
|
||||
|
||||
## Type
|
||||
|
||||
A `type` is used to mark what the branch used for.There are some examples:
|
||||
|
||||
- feat: New Feature
|
||||
- fix: Fix a bug
|
||||
- docs: About Documentiations
|
||||
- style: Format (And it won't affect the code running)
|
||||
- refactor: Refactor(No new feature will be added or no bugs will be fixed)
|
||||
- test: Test
|
||||
- chore: Update our tools
|
||||
|
||||
## scope
|
||||
|
||||
It is used to explain which parts will this branch mainly affected.
|
||||
|
||||
## subject(Unnecessary)
|
||||
|
||||
This tell which objects will be affected, or why we open this branch.
|
||||
|
||||
-----
|
||||
|
||||
Here are some examples for branch names:
|
||||
|
||||
- fix/jsload
|
||||
- fix/comment/disqusclick
|
||||
- feat/sidebar
|
||||
- revert/nprogress
|
|
@ -0,0 +1,154 @@
|
|||
# Commit message format
|
||||
|
||||
*其他语言版本: [English](CONTRIBUTING.md), [简体中文](CONTRIBUTING.zh-cn.md).*
|
||||
|
||||
## 1. Title (Header)
|
||||
|
||||
**(1)type**
|
||||
|
||||
`type` 用于说明 commit 的类别,只允许使用下面的标识。
|
||||
|
||||
- feat: New feature 新功能
|
||||
- fix: Fix bug 修补 bug
|
||||
- docs: Documentation 文档(包括 README 的更新)
|
||||
- style: UI/UX 主题外观样式和风格的改动
|
||||
- codestyle: Format 格式(不影响代码运行的变动)
|
||||
- refactor: Refactor 重构
|
||||
- test: Test 增加测试
|
||||
- chore: 构建过程或辅助工具的变动
|
||||
- merge: 合并 Pull Request
|
||||
- str: 结构的改变,包括但不限于目录变动和主题框架的搭建
|
||||
|
||||
**(2)scope**
|
||||
|
||||
`scope` 用于说明 commit 影响的范围,比如 sns,lang,share,post。
|
||||
|
||||
`scope` 紧接 `type` 置于 `()` 之内。
|
||||
|
||||
**(3)subject**
|
||||
|
||||
`subject` 是 commit 目的的简短描述,不超过 50 个字符。
|
||||
|
||||
- 以动词开头,使用第一人称现在时,比如 change,而不是 changed 或 changes
|
||||
- 第一个字母小写
|
||||
- 结尾不加句号(.)
|
||||
|
||||
---
|
||||
|
||||
Title 可参考 #119 `refactor(sns): simplify conditional display`
|
||||
|
||||
## 2. Body
|
||||
|
||||
Body 部分是对本次 commit 的详细描述,可以分成多行。下面是一个范例。
|
||||
|
||||
> More detailed explanatory text, if necessary.
|
||||
|
||||
> Further paragraphs come after blank lines.
|
||||
|
||||
> - Bullet points are okay, too
|
||||
- Use a hanging indent
|
||||
|
||||
有两个注意点:
|
||||
|
||||
(1)使用第一人称现在时,比如使用 `change` 而不是 `changed` 或 `changes`。
|
||||
|
||||
(2)应该说明代码变动的动机,以及与以前行为的对比。
|
||||
|
||||
## 3. Footer
|
||||
|
||||
Footer 部分只用于两种情况。
|
||||
|
||||
**(1)不兼容变动**
|
||||
|
||||
如果当前代码与上一个版本不兼容,则 Footer 部分以 `BREAKING CHANGE` 开头,后面是对变动的描述、以及变动理由和迁移方法。
|
||||
|
||||
```
|
||||
BREAKING CHANGE: isolate scope bindings definition has changed.
|
||||
|
||||
To migrate the code follow the example below:
|
||||
|
||||
Before:
|
||||
|
||||
scope: {
|
||||
myAttr: 'attribute',
|
||||
}
|
||||
|
||||
After:
|
||||
|
||||
scope: {
|
||||
myAttr: '@',
|
||||
}
|
||||
|
||||
The removed `inject` wasn't generally useful for directives so there should be no code using it.
|
||||
```
|
||||
|
||||
**(2)关闭 Issue**
|
||||
|
||||
如果当前 commit 针对某个 issue,那么可以在 Footer 部分关闭这个 issue 。
|
||||
|
||||
`Closes #234`
|
||||
|
||||
也可以一次关闭多个 issue 。
|
||||
|
||||
`Closes #123, #245, #992`
|
||||
|
||||
## 4. Revert
|
||||
|
||||
还有一种特殊情况,如果当前 commit 用于撤销以前的 commit,则必须以 `revert:` 开头,后面跟着被撤销 Commit 的 Header。
|
||||
|
||||
```
|
||||
revert: feat(pencil): add 'graphiteWidth' option
|
||||
|
||||
This reverts commit 667ecc1654a317a13331b17617d973392f415f02.
|
||||
```
|
||||
|
||||
Body 部分的格式是固定的,必须写成 `This reverts commit <hash>.`,其中的 `hash` 是被撤销 commit 的 SHA 标识符。
|
||||
|
||||
如果当前 commit 与被撤销的 commit,在同一个发布(release)里面,那么它们都不会出现在 Change log 里面。如果两者在不同的发布,那么当前 commit,会出现在 Change log 的 `Reverts` 小标题下面。
|
||||
|
||||
|
||||
## 5. Merge
|
||||
|
||||
当使用 Merge Pull Request 合并一个分支到另一个分支时,type 为 `merge`,scope 为 PR 的编号。这是一个范例:`merge(#402): merge feat/footer_text into canary`
|
||||
|
||||
使用 Squash 合并分支时,type 为 `merge`,scope 为 PR 的编号,subject 为这次 PR 主要改动的概括,body 为以无序列表排列的对应多条 commit 记录(在网页端使用 Squash 合并时,GitHub 会自动生成列表)。
|
||||
|
||||
一个 Branch 的命名应当包含三个部分,并使用 `/` 作为分隔符。
|
||||
|
||||
- type
|
||||
- scope
|
||||
- subject
|
||||
|
||||
# Branch name format
|
||||
|
||||
## Type
|
||||
|
||||
`type` 用于标记这个分支的作用。下面是一些例子:
|
||||
|
||||
- feat: 新的特性、新的功能
|
||||
- fix: 修复 Bugs
|
||||
- docs: 关于文档的更新
|
||||
- style: 代码格式化,代码简化等(不影响代码的运行)
|
||||
- refactor: 重构(没有新特性增加也没有 Bug 被修复)
|
||||
- test: 项目测试
|
||||
- chore: 升级工具(如 `gulpfile` 的更新)
|
||||
- remove: 简单地将部分模块的代码从项目中移除
|
||||
|
||||
> 一个分支可以包含一或两个 Type。
|
||||
|
||||
## scope
|
||||
|
||||
用于注明项目中的哪一部分会被影响
|
||||
|
||||
## subject(非必须)
|
||||
|
||||
用于注明项目中这一部分中的哪些代码会被影响,或简单注明为什么新建了这个分支
|
||||
|
||||
----
|
||||
|
||||
这是几个分支命名的示例:
|
||||
|
||||
- fix/jsload
|
||||
- fix/comment/disqusclick
|
||||
- feat/sidebar
|
||||
- revert/nprogress
|
|
@ -0,0 +1,674 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
|
@ -0,0 +1,129 @@
|
|||
![](https://i.loli.net/2018/07/27/5b5b2eee0dc9b.png)
|
||||
|
||||
# <div align="center"><a title="Go to homepage" href="https://theme-suka.skk.moe"><img align="center" alt="S" width="56" height="56" src="https://i.loli.net/2018/07/27/5b5b32fb7963f.png"></a>u k a</div>
|
||||
|
||||
> Modern · Powerful · Simple
|
||||
> 现代 · 强大 · 简洁
|
||||
|
||||
<p align="center">
|
||||
<img alt="Version" src="https://img.shields.io/github/v/release/sukkaw/hexo-theme-suka?color=%235755d9&include_prereleases&label=version&style=flat-square">
|
||||
<a href="https://skk.moe" target="_blank"><img alt="Author" src="https://img.shields.io/badge/Author-Sukka-b68469.svg?style=flat-square"/></a>
|
||||
<a href="https://hexo.io" target="_blank"><img alt="Hexo" src="https://img.shields.io/badge/hexo-3.7+-0e83cd.svg?style=flat-square"/></a>
|
||||
<a href="https://nodejs.org/" target="_blank"><img alt="node.js" src="https://img.shields.io/badge/node.js-8.6%2B-43853d.svg?style=flat-square"/></a>
|
||||
<img alt="GitHub repo size" src="https://img.shields.io/github/repo-size/sukkaw/hexo-theme-suka?style=flat-square">
|
||||
<br>
|
||||
<a href="https://travis-ci.org/SukkaW/hexo-theme-suka"><img alt="Build Status" src="https://img.shields.io/travis/SukkaW/hexo-theme-suka.svg?style=flat-square"/></a>
|
||||
<a href="https://www.codacy.com/app/SukkaW/hexo-theme-suka" target="_blank"><img alt="Codacy Badge" src="https://img.shields.io/codacy/grade/273f45610882413aad88396e06bfa6ec.svg?style=flat-square"></a>
|
||||
<a href="https://david-dm.org/SukkaW/hexo-theme-suka" target="_blank"><img alt="Dependency Status" src="https://img.shields.io/david/SukkaW/hexo-theme-suka.svg?style=flat-square"></a>
|
||||
<a href="https://david-dm.org/SukkaW/hexo-theme-suka#info=devDependencies" target="_blank"><img alt="devDependency Status" src="https://img.shields.io/david/dev/SukkaW/hexo-theme-suka.svg?style=flat-square"></a>
|
||||
</p>
|
||||
|
||||
## Contents 目录
|
||||
|
||||
- [Introduction 简介](#introduction-简介)
|
||||
- [Demo 演示](#demo-演示)
|
||||
- [Install 安装](#install-安装)
|
||||
- [Documents 文档](#documents-文档)
|
||||
- [Contributing 贡献](#contributing-贡献)
|
||||
- [Changelog 更新日志](#changelog-更新日志)
|
||||
- [Todo 计划](#todo-计划)
|
||||
- [Maintainer 维护者](#maintainer-维护者)
|
||||
- [License 许可证](#license-许可证)
|
||||
- [Support 支持](#support-支持)
|
||||
- [Render 渲染](#render-渲染)
|
||||
|
||||
## Introduction 简介
|
||||
|
||||
"Suka", a Modern and Simple Theme for Hexo, with a lot of powerful features.
|
||||
「Suka」,一个拥有许多强大特性的,现代、简洁的 Hexo 主题。
|
||||
|
||||
## Demo 演示
|
||||
|
||||
- [Sukka's Blog](https://blog.skk.moe)
|
||||
- [Suka Theme Demo](https://theme-suka.skk.moe/demo/)
|
||||
|
||||
|
||||
## Install 安装
|
||||
|
||||
```bash
|
||||
$ cd hexo
|
||||
$ git clone https://github.com/SukkaW/hexo-theme-suka themes/suka
|
||||
$ cat themes/suka/site_config.yml >> _config.yml
|
||||
$ cd themes/suka
|
||||
$ npm i
|
||||
$ cd ..
|
||||
$ cd ..
|
||||
```
|
||||
|
||||
You can also read our [detailed installation instructions](https://theme-suka.skk.moe/docs/en/) if you want any other variant.
|
||||
|
||||
你也可以阅读我们的 [详细安装说明](https://theme-suka.skk.moe/docs/) 了解如何用其他方法下载「Suka」并启用。
|
||||
|
||||
## Documents 文档
|
||||
|
||||
[Suka Theme Docs](https://theme-suka.skk.moe/docs/en/)
|
||||
|
||||
> ATTENTION! The English Version of Docs is still under construction!<br>But do not worry, I wrote the detailed explainations in config file's comment in English. So you can still configure the theme without difficulty. Any problem please feel free to open a new issue.
|
||||
|
||||
[Suka 主题文档](https://theme-suka.skk.moe/docs/)
|
||||
|
||||
---
|
||||
|
||||
[The source code of Docs](https://github.com/theme-suka/docs/)
|
||||
|
||||
## Contributing 贡献
|
||||
|
||||
All kinds of contributions (enhancements, new features, documentation & code improvements, issues & bugs reporting) are welcome.<br>
|
||||
please read the [Dev Guide](https://theme-suka.skk.moe/docs/en/dev/) before you start your contributing.
|
||||
|
||||
欢迎各种形式的贡献,包括但不限于优化,添加功能,文档 & 代码的改进,问题和 bugs 的报告。期待你的 Pull Request。<br>
|
||||
在参与贡献之前,请先阅读 [开发指南](https://theme-suka.skk.moe/docs/dev/)。
|
||||
|
||||
## Changelog 更新日志
|
||||
|
||||
[View our release notes](https://github.com/SukkaW/hexo-theme-suka/releases)<br>
|
||||
[阅读我们的更新日志](https://github.com/SukkaW/hexo-theme-suka/releases)
|
||||
|
||||
## Todo 计划
|
||||
|
||||
See [Repo's projects](https://github.com/SukkaW/hexo-theme-suka/projects) for details.
|
||||
|
||||
在 [Repo's projects](https://github.com/SukkaW/hexo-theme-suka/projects) 查看关于 Todo 的详细信息
|
||||
|
||||
> The Todo is written in Chinese
|
||||
|
||||
## Maintainer 维护者
|
||||
|
||||
**Suka Theme** © [Sukka](https://github.com/SukkaW), Released under the [GPL-3.0](./LICENSE) License.<br>
|
||||
Authored and maintained by Sukka with help from contributors ([list](https://github.com/SukkaW/hexo-theme-suka/contributors)).
|
||||
|
||||
> [Personal Website](https://skk.moe) · [Blog](https://blog.skk.moe) · GitHub [@SukkaW](https://github.com/SukkaW) · Telegram Channel [@SukkaChannel](https://t.me/SukkaChannel) · Twitter [@isukkaw](https://twitter.com/isukkaw) · Keybase [@sukka](https://keybase.io/sukka)
|
||||
|
||||
## License 许可证
|
||||
|
||||
[![license](https://img.shields.io/github/license/sukkaw/hexo-theme-suka.svg?style=flat-square)](./LICENSE)
|
||||
|
||||
Open sourced under the GPL v3.0 license.
|
||||
|
||||
根据 GPL V3.0 许可证开源。
|
||||
|
||||
## Support 支持
|
||||
|
||||
[![jsdelivr.png](https://i.loli.net/2018/07/27/5b5b29e9a9820.png)](https://www.jsdelivr.com)
|
||||
|
||||
> jsDelivr – Open Source CDN. free, fast, and reliable
|
||||
|
||||
Thanks jsDelivr for providing Public CDN service.
|
||||
|
||||
[![](https://data.jsdelivr.com/v1/package/gh/sukkaw/hexo-theme-suka/badge)](https://www.jsdelivr.com/package/gh/sukkaw/hexo-theme-suka)
|
||||
|
||||
|
||||
<a href="https://picturepan2.github.io/spectre">
|
||||
<img src="https://picturepan2.github.io/spectre/img/spectre-logo.svg" width="72" height="72">
|
||||
</a>
|
||||
|
||||
> Spectre.css is a lightweight, responsive and modern CSS framework.
|
||||
|
||||
## Render 渲染
|
||||
|
||||
![](https://i.loli.net/2018/07/27/5b5b2b53359fc.png)
|
|
@ -0,0 +1,426 @@
|
|||
# ---------------------------------------------------------------
|
||||
# !!ATTENTION!!
|
||||
# ---------------------------------------------------------------
|
||||
# There are two config file in Hexo Project, one in the root directory of your Hexo Project and another in the theme directory.
|
||||
# For convenience of description, the former is referred to as the site config and the latter as the theme config.
|
||||
#
|
||||
# There are some pivotal config in `site_config.yml` in Suka Theme directory.
|
||||
# You should copy them and paste them to the end of your site config file!
|
||||
# Read the documents for more info.
|
||||
# ---------------------------------------------------------------
|
||||
|
||||
# ---------------------------------------------------------------
|
||||
# Site Information Settings
|
||||
# ---------------------------------------------------------------
|
||||
head:
|
||||
# Favicon
|
||||
# Put your favicons into `hexo-site/source/` directory.
|
||||
# To get or check favicons visit: https://realfavicongenerator.net
|
||||
favicon:
|
||||
# You should use a image/x-icon type icon and configure it here.
|
||||
ico: /img/suka-favicon.ico
|
||||
# 16x16 png
|
||||
small:
|
||||
# 32x32 png
|
||||
medium: # /img/suka-favicon.png
|
||||
# 180x180 png
|
||||
apple_touch_icon:
|
||||
# 192x192 png
|
||||
large:
|
||||
# svg icon
|
||||
safari_pinned_tab:
|
||||
# Color
|
||||
# It will defined color below:
|
||||
# Android Chrome Color
|
||||
# Safari Pinned Tab
|
||||
color:
|
||||
# PWA
|
||||
# You can setup your blog as pwa with a manifest.
|
||||
# https://app-manifest.firebaseapp.com where you can generate a manifest quickly
|
||||
# Leave it blank if you don't have one
|
||||
pwa_manifest:
|
||||
# Open search
|
||||
# Fill in your opensearch xml file here.
|
||||
# Leave it blank if you don't have one
|
||||
open_search:
|
||||
# Keywords
|
||||
# Define meta keywords tag
|
||||
# split with ','
|
||||
keywords:
|
||||
# Site Verification
|
||||
site_verification:
|
||||
google:
|
||||
baidu:
|
||||
|
||||
footer:
|
||||
# Copyright Since
|
||||
# Specify the date when the site was setup.
|
||||
# For example, if you set it as 2015, then footer will show something like '© 2015 - 2018'
|
||||
# If you just want to show something like '© 2018' only, simly leave it blank.
|
||||
copyright_since:
|
||||
# Footer Text
|
||||
# You can specify the text you want to show in footer, HTML tag is supported.
|
||||
# For example, you can setup ICP license number as:
|
||||
# custom_text: '<a href="http://www.miitbeian.gov.cn" rel="nofollow noopener noreferrer">某ICP备xxxxxxxx号-x</a>'
|
||||
# Another example, you can setup 'Hosted on Coding Pages' as:
|
||||
# custom_text: 'Hosted on <a href="https://pages.coding.me" rel="nofollow noopener noreferrer">Coding Pages</a>'
|
||||
# Muilt line footer text is supported.
|
||||
custom_text:
|
||||
|
||||
# ---------------------------------------------------------------
|
||||
# Customize Settings
|
||||
# ---------------------------------------------------------------
|
||||
uiux:
|
||||
# Muilt line slogan is supported.
|
||||
slogan: Hi, nice to meet you.
|
||||
# For most link color except post color
|
||||
link_color:
|
||||
primary_color:
|
||||
# Background color
|
||||
bg_color:
|
||||
|
||||
img:
|
||||
avatar: '/img/default_avatar.png'
|
||||
|
||||
# ---------------------------------------------------------------
|
||||
# Menu Settings
|
||||
# ---------------------------------------------------------------
|
||||
# Nav settings
|
||||
# Used to choose which
|
||||
nav:
|
||||
home:
|
||||
use: true
|
||||
archives:
|
||||
use: true
|
||||
rss:
|
||||
use: false
|
||||
share:
|
||||
use: true
|
||||
search:
|
||||
use: true
|
||||
link: /search
|
||||
pages:
|
||||
#About:
|
||||
#link: /about/
|
||||
#Friends:
|
||||
#link: /links/
|
||||
|
||||
# SNS Share Switch
|
||||
# Used to choose which items will be displayed in share menu.
|
||||
sns_share:
|
||||
weibo: true
|
||||
facebook: true
|
||||
twitter: true
|
||||
telegram: true
|
||||
googleplus: true
|
||||
linkedin: true
|
||||
qq: true
|
||||
|
||||
# Qrcode which will show in share menu, for redirect to other device
|
||||
qrcode:
|
||||
index_share: true
|
||||
post_share: true
|
||||
|
||||
|
||||
# ---------------------------------------------------------------
|
||||
# Post Settings
|
||||
# ---------------------------------------------------------------
|
||||
post:
|
||||
# Default Excerpt
|
||||
# Please use <!-- more --> in the post to control excerpt accurately and will override the configuration here.
|
||||
entry_excerpt: 120
|
||||
# Notify on expire of the page
|
||||
# To let the visitor know if the post hasn't been update for long.
|
||||
expire: true
|
||||
share: true
|
||||
# Post License
|
||||
# You can specify the text you want to show in the end of your posts and pages, HTML tag is supported.
|
||||
# For example, you can setup a CC license as:
|
||||
# license: 'This blog is under a <a href="/creativecommons.html" target="_blank">CC BY-NC-SA 3.0 Unported License</a>'
|
||||
# You can also use Front-Matter `license` to override this setting
|
||||
# or use Front-Matter `hide_license: true` to hide license on spefic post
|
||||
license:
|
||||
|
||||
# Table Of Contents which will be show on right side of the post
|
||||
toc:
|
||||
# You can still disable toc for each single post by setting their front-matter with 'toc: false'
|
||||
enable: true
|
||||
# Show line number for each toc list-item or not. Default is true.
|
||||
line_number: true
|
||||
|
||||
# ---------------------------------------------------------------
|
||||
# Integrated Services
|
||||
# ---------------------------------------------------------------
|
||||
# Comment Systems
|
||||
# Available value of "use":
|
||||
# disqus | disqusjs | disqus_click | changyan | livere | gitment | gitalk | valine | facebook
|
||||
# If you want to use DisqusJS for better disqus exprience in China, please read https://github.com/SukkaW/DisqusJS#readme
|
||||
# If you want to use gitment or gitalk, you should get the client_id and client_secret form https://github.com/settings/applications/new
|
||||
# If you want to use valine, you should get the app_id and app_key form https://leancloud.cn , more setting please see https://valine.js.org
|
||||
comment:
|
||||
use:
|
||||
disqus:
|
||||
shortname: # disqus shortname
|
||||
disqusjs:
|
||||
shortname:
|
||||
siteName:
|
||||
api:
|
||||
apikey:
|
||||
admin:
|
||||
adminLabel:
|
||||
changyan:
|
||||
appid:
|
||||
conf:
|
||||
thread_key_type: path # id | path. Only when you generate static id for each post before you using 'id'
|
||||
livere:
|
||||
data_uid:
|
||||
gitment:
|
||||
repo:
|
||||
owner:
|
||||
client_id:
|
||||
client_secret:
|
||||
gitalk:
|
||||
repo:
|
||||
owner:
|
||||
client_id:
|
||||
client_secret:
|
||||
valine:
|
||||
leancloud_appId: # leancloud application app id
|
||||
leancloud_appKey: # leancloud application app key
|
||||
notify: false # valine mail notify (true/false) https://github.com/xCss/Valine/wiki
|
||||
verify: false # valine verify code (true/false)
|
||||
pageSize: 10 # comment list page size
|
||||
avatar: identicon # gravatar style https://valine.js.org/#/avatar
|
||||
lang: zh-cn # i18n
|
||||
placeholder: Just go go # valine comment input placeholder(like: Please leave your footprints )
|
||||
guest_info: nick,mail,link #valine comment header info
|
||||
wildfire:
|
||||
database_provider: firebase # firebase or wilddog
|
||||
wilddog_site_id:
|
||||
firebase_api_key:
|
||||
firebase_auth_domain:
|
||||
firebase_database_url:
|
||||
firebase_project_id:
|
||||
firebase_storage_bucket:
|
||||
firebase_messaging_sender_id:
|
||||
theme: light # light or dark
|
||||
locale: en # en or zh-CN
|
||||
facebook:
|
||||
colorschme: light # light | dark
|
||||
numposts: 10
|
||||
orderby: social # social | reverse_time | time
|
||||
# You can only fill in one of them below when configuring.
|
||||
# If you fill in both of them then appid method will be used.
|
||||
# Read facebook developer documents for more info:
|
||||
# https://developers.facebook.com/docs/plugins/comments/#moderation-setup-instructions
|
||||
admin_fb_appid:
|
||||
admin_fb_username: # Currently "Suka" don't support more than one admin. You can open a new issue if you really need one.
|
||||
|
||||
# Site Analytics
|
||||
# Suka theme has a built in Baidu's, Google's website analytics and CNZZ's analytics service
|
||||
analytics:
|
||||
google_site_id:
|
||||
gtags_site_id:
|
||||
baidu_site_id:
|
||||
cnzz_site_id:
|
||||
tencent_site_id:
|
||||
tencent_mta_id:
|
||||
|
||||
# Views Analytics
|
||||
# Busuanzi
|
||||
# The counter by https://busuanzi.ibruce.info
|
||||
busuanzi:
|
||||
enable: true
|
||||
# Site views analytics support either pv or uv
|
||||
# will be show at footer
|
||||
site_uv:
|
||||
enable: true
|
||||
before: # html tag support
|
||||
after: Viewers # html tag support
|
||||
divider: '|' # html tag supported, something like '|' ',' '·' even '<br>', if you dont want any divider simply leave it blank,
|
||||
offset: 0
|
||||
site_pv:
|
||||
enable: false
|
||||
before: # html tag support
|
||||
after: Views # html tag support
|
||||
divider: # html tag supported, something like '|' ',' '·' even '<br>', if you dont want any divider simply leave it blank,
|
||||
offset: 0
|
||||
# Post views analytics
|
||||
# will be show at post header info
|
||||
post_pv:
|
||||
enable: true
|
||||
before: # html tag support
|
||||
after: Views # html tag support
|
||||
|
||||
# The counter by https://valine.js.org/visitor.html
|
||||
valine_counter:
|
||||
# ATTENTION! You should use valine comment system to enable this feature!
|
||||
enable: false
|
||||
# By use config.url as id to count all site pv
|
||||
site_pv:
|
||||
enable: false
|
||||
before: # html tag supported
|
||||
after: # html tag supported
|
||||
divider: # html tag supported, something like '|' ',' '·' even '<br>', if you dont want any divider simply leave it blank,
|
||||
# Show pv for each post on index (Exprimental)
|
||||
index_post_pv:
|
||||
enable: false
|
||||
before: # html tag supported
|
||||
after: # html tag supported
|
||||
# Show pv on post page
|
||||
post_pv:
|
||||
enable: false
|
||||
before: # html tag supported
|
||||
after: # html tag supported
|
||||
|
||||
# ---------------------------------------------------------------
|
||||
# Plugin Settings
|
||||
# ---------------------------------------------------------------
|
||||
# Search
|
||||
# Available value of "use":
|
||||
# local | google | swiftype
|
||||
search:
|
||||
use: local
|
||||
# Swiftype
|
||||
swiftype_key:
|
||||
|
||||
# Code highlight
|
||||
# You can only enable one of them to avoid issues.
|
||||
# Suka support hexo built in preprocess highlight.js, and Suka Theme has various theme for you to choose.
|
||||
# Suka Theme has also built in those code highlight: Hanabi | Prism | Prettify , you can config below.
|
||||
# Run `hexo clean` first after changing code highlight configuration.
|
||||
|
||||
# Hexo built in highlight
|
||||
# To use hexo built in highlight, you need to disable all other highlight option.
|
||||
# Then enable Hexo highlight option in site config.
|
||||
#
|
||||
# highlight:
|
||||
# enable: true
|
||||
#
|
||||
highlight:
|
||||
theme: github
|
||||
# You can only enable the Suka built in prettify theme here. Check the /source/css/highlight directories.
|
||||
# The theme name is the css file name without `.min.css`, as [theme-name].min.css
|
||||
|
||||
# Hanabi (https://github.com/egoist/hanabi)
|
||||
# To use hanabi, you need to disable all highlight option in hexo's site config:
|
||||
#
|
||||
# highlight:
|
||||
# enable: false
|
||||
# line_number: false
|
||||
# auto_detect: false
|
||||
# tab_replace: false
|
||||
#
|
||||
hanabi:
|
||||
enable: false
|
||||
|
||||
# Prism
|
||||
# To use prism, you need to disable all highlight option in hexo's site config.
|
||||
#
|
||||
# highlight:
|
||||
# enable: false
|
||||
# line_number: false
|
||||
# auto_detect: false
|
||||
# tab_replace: false
|
||||
#
|
||||
# Then you need to disable other code hightlight first, and enable prism at site config:
|
||||
#
|
||||
# suka_theme:
|
||||
# ...
|
||||
# prism:
|
||||
# enable: true
|
||||
# line_number: true # Enable line number or not
|
||||
# theme: default
|
||||
#
|
||||
# You can only enable the Suka built in prism theme here. Check the /source/lib/prism directories.
|
||||
# The theme name is the css file name without `.min.css` and `prism-`, as prism-[theme-name].min.css
|
||||
|
||||
# Google Code Prettify
|
||||
# To use prettify, you need to disable all highlight option in hexo's site config.
|
||||
#
|
||||
# highlight:
|
||||
# enable: false
|
||||
# line_number: false
|
||||
# auto_detect: false
|
||||
# tab_replace: false
|
||||
#
|
||||
prettify:
|
||||
enable: false
|
||||
linenumber: true # We prefer to enable for avoiding some pretiffy's bugs.
|
||||
# Prettify Theme
|
||||
theme: github-v2 # It will not load any theme if you leave it blank
|
||||
# You can only enable the Suka built in prettify theme here. Check the /source/lib/prettify/themes directories.
|
||||
# The theme name is the css file name without `.min.css`, as [theme-name].min.css
|
||||
#
|
||||
# If you want to use other theme, you can leave that blank, and load your own theme by adding <link> tag using custom code.
|
||||
# Learn how to use custom code here: https://theme-suka.skk.moe/docs/en/expert/#Add-custom-code
|
||||
|
||||
# ---------------------------------------------------------------
|
||||
# Expert Settings
|
||||
# ---------------------------------------------------------------
|
||||
# !!ATTENTION!!
|
||||
# Do Not Modify Below This Line, unless you know what you are doing!
|
||||
# ---------------------------------------------------------------
|
||||
|
||||
# Vendors
|
||||
# Set a CDN address for the vendor you want to customize.
|
||||
# Be aware that you should use the same version as internal ones to avoid potential problems.
|
||||
# We prefer you using the https protocol of CDN files whether you enable https on your site or not.
|
||||
vendors:
|
||||
# hexo-theme-suka
|
||||
# https://github.com/SukkaW/hexo-theme-suka
|
||||
# You can check current the Suka Version Code at the end of theme config.
|
||||
suka:
|
||||
style_css:
|
||||
local_search_js:
|
||||
hanabi_browser_js:
|
||||
highlight_theme:
|
||||
# You can fill in any suka built in highlight.js theme you want here, and it will override the prism theme config before.
|
||||
lazyload_img:
|
||||
# Spectre.css
|
||||
# https://picturepan2.github.io/spectre/
|
||||
# Version: 0.5.3
|
||||
spectre:
|
||||
spectre_css:
|
||||
# Prism & Prism Theme
|
||||
# https://github.com/PrismJS/prism/ https://github.com/PrismJS/prism-themes
|
||||
# Prism Version: 1.15.0 | Prism Theme Version: 1.0.1
|
||||
prism:
|
||||
theme:
|
||||
# You can fill in any prism theme you want here, and it will override the prism theme config in site config.
|
||||
line_number:
|
||||
# Lazyload
|
||||
# https://github.com/verlok/lazyload
|
||||
# Version: 8.9.0
|
||||
lazyload:
|
||||
# Busuanzi
|
||||
# https://busuanzi.ibruce.info
|
||||
busuanzi:
|
||||
# Hanabi
|
||||
# https://github.com/egoist/hanabi
|
||||
# Version: 0.4.0
|
||||
hanabi:
|
||||
# Prettify Core
|
||||
# Attention! It is NOT the `run_prettify.js`!
|
||||
# Version: 0.1.0
|
||||
prettify:
|
||||
# Prettify Theme
|
||||
# You can fill in any prettify theme you want here, and it will override the prettify theme config before.
|
||||
# Personally I prefer the theme here: https://github.com/jmblog/color-themes-for-google-code-prettify
|
||||
prettify_theme:
|
||||
|
||||
fragment_cache: false
|
||||
# Theme Version
|
||||
# localStorage cache version
|
||||
verison: 1.3.3
|
||||
old_verison:
|
||||
- 0.2.0
|
||||
- 0.0.1
|
||||
- 0.1.0
|
||||
- 1.0.0
|
||||
- 1.0.1
|
||||
- 1.1.0
|
||||
- 1.1.1
|
||||
- 1.2.0
|
||||
- 1.3.0
|
||||
- 1.3.2
|
|
@ -0,0 +1,40 @@
|
|||
// https://gitmagic.io/rules
|
||||
{
|
||||
"commit": {
|
||||
"subject_cannot_be_empty": true,
|
||||
"subject_must_be_in_tense": "imperative",
|
||||
"subject_must_not_end_with_dot": true,
|
||||
"subject_lines_must_be_shorter_than": 51,
|
||||
"subject_must_be_single_line": true,
|
||||
"subject_must_be_in_case": "lower",
|
||||
"subject_must_include_prefix": {
|
||||
"prefixes": ["feat", "fix", "docs", "style", "refactor", "test", "chore"],
|
||||
"require_after_prefix": "(*): "
|
||||
}
|
||||
},
|
||||
"pull_request": {
|
||||
"subject_cannot_be_empty": true,
|
||||
"subject_must_be_in_tense": "imperative",
|
||||
"subject_must_start_with_case": "lower",
|
||||
"subject_must_not_end_with_dot": true,
|
||||
"subject_must_include_prefix": {
|
||||
"prefixes": ["feat", "fix", "docs", "style", "refactor", "test", "chore"],
|
||||
"require_after_prefix": "(*): "
|
||||
},
|
||||
"body_cannot_be_empty": true,
|
||||
"body_must_include_verification_steps": true
|
||||
},
|
||||
"issue": {
|
||||
"subject_cannot_be_empty": true,
|
||||
"subject_must_start_with_case": "upper",
|
||||
"subject_must_not_end_with_dot": true,
|
||||
"body_cannot_be_empty": true,
|
||||
"body_must_include_reproduction_steps": ["bug"]
|
||||
},
|
||||
"branch": {
|
||||
"name_must_be_longer_than": 4,
|
||||
"name_must_include_prefix": {
|
||||
"prefixes": ["feat", "fix", "refactor", "chore"],
|
||||
"require_after_prefix": "/"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
const gulp = require('gulp');
|
||||
const autoprefixer = require('gulp-autoprefixer');
|
||||
const cleanCSS = require('gulp-clean-css');
|
||||
const uglify = require('gulp-uglify');
|
||||
const rename = require('gulp-rename');
|
||||
|
||||
const configs = {
|
||||
autoprefixer: {
|
||||
browsers: [
|
||||
'last 2 versions',
|
||||
'> 1%',
|
||||
'Chrome >= 30',
|
||||
'Firefox >= 30',
|
||||
'ie >= 9',
|
||||
'Safari >= 8',
|
||||
],
|
||||
},
|
||||
cleanCSS: {
|
||||
compatibility: 'ie9'
|
||||
},
|
||||
};
|
||||
|
||||
gulp.task('minify-js', () => {
|
||||
return gulp.src('src/**/*.js')
|
||||
.pipe(uglify({
|
||||
output: {
|
||||
comments: /^!/
|
||||
}
|
||||
}))
|
||||
.pipe(rename({ suffix: '.min' }))
|
||||
.pipe(gulp.dest('source'));
|
||||
});
|
||||
|
||||
gulp.task('minify-css', () => {
|
||||
return gulp.src('src/**/*.css')
|
||||
.pipe(autoprefixer(configs.autoprefixer))
|
||||
.pipe(cleanCSS(configs.cleanCSS))
|
||||
.pipe(rename({ suffix: '.min' }))
|
||||
.pipe(gulp.dest('source'));
|
||||
});
|
||||
|
||||
gulp.task('build', gulp.parallel('minify-js', 'minify-css'));
|
||||
|
||||
gulp.task('default', gulp.parallel('build'));
|
||||
|
||||
gulp.task('watch', () => {
|
||||
gulp.watch('src/**', gulp.parallel('build'));
|
||||
});
|
|
@ -0,0 +1,85 @@
|
|||
/* hexo-prism-plugin
|
||||
* author: ele828
|
||||
* license: MIT
|
||||
* patched by SukkaW for hexo-theme-suka
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
module.exports = function (hexo) {
|
||||
// Plugin settings
|
||||
const config = hexo.config.suka_theme.prism;
|
||||
|
||||
if (config.enable !== true) {
|
||||
return;
|
||||
}
|
||||
|
||||
const Prism = require('node-prismjs');
|
||||
|
||||
const map = {
|
||||
''': '\'',
|
||||
'&': '&',
|
||||
'>': '>',
|
||||
'<': '<',
|
||||
'"': '"'
|
||||
};
|
||||
|
||||
const regex = /<pre><code class="(.*)?">([\s\S]*?)<\/code><\/pre>/igm;
|
||||
const captionRegex = /<p><code>(?![\s\S]*<code)(.*?)\s(.*?)\n([\s\S]*)<\/code><\/p>/igm;
|
||||
|
||||
const line_number = config.line_number || true;
|
||||
|
||||
/**
|
||||
* Unescape from Marked escape
|
||||
* @param {String} str
|
||||
* @return {String}
|
||||
*/
|
||||
function unescape(str) {
|
||||
if (!str || str === null) return '';
|
||||
const re = new RegExp('(' + Object.keys(map).join('|') + ')', 'g');
|
||||
return String(str).replace(re, (match) => map[match]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Code transform for prism plugin.
|
||||
* @param {Object} data
|
||||
* @return {Object}
|
||||
*/
|
||||
function PrismPlugin(data) {
|
||||
// Patch for caption support
|
||||
if (captionRegex.test(data.content)) {
|
||||
// Attempt to parse the code
|
||||
data.content = data.content.replace(captionRegex, (origin, lang, caption, code) => {
|
||||
if (!lang || !caption || !code) return origin;
|
||||
return `<figcaption>${caption}</figcaption><pre><code class="${lang}">${code}</code></pre>`;
|
||||
});
|
||||
}
|
||||
|
||||
data.content = data.content.replace(regex, (origin, lang, code) => {
|
||||
const lineNumbers = line_number ? 'line-numbers' : '';
|
||||
const startTag = `<pre class="${lineNumbers} highlight language-${lang}"><code class="language-${lang}">`;
|
||||
const endTag = `</code></pre>`;
|
||||
code = unescape(code);
|
||||
let parsedCode = '';
|
||||
if (Prism.languages[lang]) {
|
||||
parsedCode = Prism.highlight(code, Prism.languages[lang]);
|
||||
} else {
|
||||
parsedCode = code;
|
||||
}
|
||||
if (line_number) {
|
||||
const match = parsedCode.match(/\n(?!$)/g);
|
||||
const linesNum = match ? match.length + 1 : 1;
|
||||
let lines = new Array(linesNum + 1);
|
||||
lines = lines.join('<span></span>');
|
||||
const startLine = '<span aria-hidden="true" class="line-numbers-rows">';
|
||||
const endLine = '</span>';
|
||||
parsedCode += startLine + lines + endLine;
|
||||
}
|
||||
return startTag + parsedCode + endTag;
|
||||
});
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
hexo.extend.filter.register('after_post_render', PrismPlugin);
|
||||
};
|
|
@ -0,0 +1,82 @@
|
|||
module.exports = function (hexo) {
|
||||
if (hexo.config.suka_theme.search.enable !== true) {
|
||||
return;
|
||||
}
|
||||
|
||||
const pathFn = require('path');
|
||||
const { stripHTML } = require('hexo-util');
|
||||
|
||||
let config = hexo.config.suka_theme.search;
|
||||
|
||||
// Set default search path
|
||||
if (!config.path) config.path = 'search.json';
|
||||
|
||||
function searchGenerator(locals = {}) {
|
||||
const url_for = hexo.extend.helper.get('url_for').bind(this);
|
||||
|
||||
const parse = (item) => {
|
||||
let _item = {};
|
||||
if (item.title) _item.title = item.title;
|
||||
if (item.date) _item.date = item.date;
|
||||
if (item.path) _item.url = url_for(item.path);
|
||||
if (item.tags && item.tags.length > 0) {
|
||||
_item.tags = [];
|
||||
item.tags.forEach((tag) => {
|
||||
_item.tags.push(tag.name);
|
||||
});
|
||||
}
|
||||
if (item.categories && item.categories.length > 0) {
|
||||
_item.categories = [];
|
||||
item.categories.forEach((cate) => {
|
||||
_item.categories.push(cate.name);
|
||||
});
|
||||
}
|
||||
if (item._content) {
|
||||
_item.content = stripHTML(item.content.trim().replace(/<pre(.*?)\<\/pre\>/gs, ''))
|
||||
.replace(/\n/g, ' ').replace(/\s+/g, ' ')
|
||||
.replace(new RegExp('(https?|ftp|file)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]', 'g'), '');
|
||||
}
|
||||
return _item;
|
||||
};
|
||||
|
||||
const searchfield = config.field;
|
||||
|
||||
let posts,
|
||||
pages;
|
||||
|
||||
if (searchfield) {
|
||||
if (searchfield === 'post') {
|
||||
posts = locals.posts.sort('-date');
|
||||
} else if (searchfield === 'page') {
|
||||
pages = locals.pages;
|
||||
} else {
|
||||
posts = locals.posts.sort('-date');
|
||||
pages = locals.pages;
|
||||
}
|
||||
} else {
|
||||
posts = locals.posts.sort('-date');
|
||||
}
|
||||
|
||||
let res = [];
|
||||
|
||||
if (posts) {
|
||||
posts.each((post) => {
|
||||
res.push(parse(post));
|
||||
});
|
||||
}
|
||||
if (pages) {
|
||||
pages.each((page) => {
|
||||
res.push(parse(page));
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
path: config.path,
|
||||
data: JSON.stringify(res)
|
||||
};
|
||||
}
|
||||
|
||||
if (pathFn.extname(config.path) === '.json') {
|
||||
hexo.extend.generator.register('json', searchGenerator);
|
||||
}
|
||||
};
|
|
@ -0,0 +1,42 @@
|
|||
const { htmlTag } = require('hexo-util');
|
||||
|
||||
module.exports = function (hexo) {
|
||||
hexo.extend.helper.register('favicon', function () {
|
||||
const url_for = hexo.extend.helper.get('url_for').bind(this);
|
||||
const { favicon } = this.theme.head;
|
||||
|
||||
let html = '';
|
||||
|
||||
if (favicon.ico) {
|
||||
html += htmlTag('link', { rel: 'icon', type: 'image/ico', href: url_for(favicon.ico) });
|
||||
}
|
||||
if (favicon.apple_touch_icon) {
|
||||
html += htmlTag('link', { rel: 'apple-touch-icon', sizes: '180x180', href: url_for(favicon.apple_touch_icon) });
|
||||
}
|
||||
if (favicon.large) {
|
||||
html += htmlTag('link', { rel: 'icon', typt: 'image/png', sizes: '192x192', href: url_for(favicon.large) });
|
||||
}
|
||||
if (favicon.medium) {
|
||||
html += htmlTag('link', { rel: 'icon', typt: 'image/png', sizes: '32x32', href: url_for(favicon.medium) });
|
||||
}
|
||||
if (favicon.small) {
|
||||
html += htmlTag('link', { rel: 'icon', typt: 'image/png', sizes: '16x16', href: url_for(favicon.small) });
|
||||
}
|
||||
|
||||
return html;
|
||||
});
|
||||
|
||||
hexo.extend.helper.register('site_logo', function () {
|
||||
const full_url_for = hexo.extend.helper.get('full_url_for').bind(this);
|
||||
const { favicon } = this.theme.head;
|
||||
const getFavicon = (type) => full_url_for(favicon[type]);
|
||||
|
||||
if (favicon.large) return getFavicon('large');
|
||||
if (favicon.apple_touch_icon) return getFavicon('apple_touch_icon');
|
||||
if (favicon.medium) return getFavicon('medium');
|
||||
if (favicon.small) return getFavicon('small');
|
||||
if (favicon.ico) return getFavicon('ico');
|
||||
|
||||
return 'https://theme-suka.skk.moe/demo/img/suka-favicon.png';
|
||||
});
|
||||
};
|
|
@ -0,0 +1,72 @@
|
|||
/**
|
||||
* Generate title string based on page type
|
||||
* @example
|
||||
* <%- page_title(page) %>
|
||||
* <%- page_descr(page) %>
|
||||
* <%- page_tags(page) %>
|
||||
*/
|
||||
|
||||
const { stripHTML } = require('hexo-util');
|
||||
|
||||
module.exports = function (hexo) {
|
||||
hexo.extend.helper.register('page_title', function (page = null) {
|
||||
page = (page === null) ? this.page : page;
|
||||
|
||||
let title = page.title;
|
||||
|
||||
if (this.is_archive()) {
|
||||
title = this.__('archive');
|
||||
if (this.is_month()) {
|
||||
title += `: ${page.year}/${page.month}`;
|
||||
} else if (this.is_year()) {
|
||||
title += `: ${page.year}`;
|
||||
}
|
||||
} else if (this.is_category()) {
|
||||
title = `${this.__('category')}: ${page.category}`;
|
||||
} else if (this.is_tag()) {
|
||||
title = `${this.__('tag')}: ${page.tag}`;
|
||||
}
|
||||
|
||||
return [title, hexo.config.title].filter((str) => typeof (str) !== 'undefined' && str.trim() !== '').join(' | ');
|
||||
});
|
||||
|
||||
hexo.extend.helper.register('page_descr', function (page = null) {
|
||||
page = (page === null) ? this.page : page;
|
||||
|
||||
let description = page.description || page.excerpt || page.content || hexo.config.description ;
|
||||
|
||||
description = stripHTML(description).trim() // Remove prefixing/trailing spaces
|
||||
.replace(/^s*/, '').replace(/s*$/, '')
|
||||
.substring(0, 200)
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/&/g, '&')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, ''')
|
||||
.replace(/\n/g, ' '); // Replace new lines by spaces
|
||||
|
||||
return [description, hexo.config.author, hexo.config.title].filter((str) => typeof (str) !== 'undefined' && str.trim() !== '').join(' - ');
|
||||
});
|
||||
|
||||
hexo.extend.helper.register('page_tags', function (page = null) {
|
||||
page = (page === null) ? this.page : page;
|
||||
const { config } = this;
|
||||
|
||||
let page_tags = page.keywords || page.tags,
|
||||
site_tags = config.keywords || this.theme.head.keywords;
|
||||
|
||||
const parse = (tags) => {
|
||||
let result = [];
|
||||
if (tags) {
|
||||
if (typeof tags === 'string') {
|
||||
result.push(tags);
|
||||
} else if (tags.length) {
|
||||
result.push(tags.map(tag => tag.name ? tag.name : tag).filter(tags => !!tags).join(', '));
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
return [parse(page_tags), parse(site_tags)].filter(tags => tags.length && tags.length !== 0).join(', ');
|
||||
});
|
||||
};
|
|
@ -0,0 +1,25 @@
|
|||
const qrImage = require('qr-image');
|
||||
|
||||
module.exports = function (hexo) {
|
||||
hexo.extend.helper.register('qrcode', (url, option) => {
|
||||
const qrConfig = Object.assign(
|
||||
{
|
||||
size: 6,
|
||||
margin: 0
|
||||
},
|
||||
option || {}
|
||||
);
|
||||
|
||||
const qrUrl = url.replace('index.html', '');
|
||||
|
||||
const buffer = qrImage.imageSync(
|
||||
qrUrl,
|
||||
{
|
||||
type: 'png',
|
||||
size: qrConfig.size,
|
||||
margin: qrConfig.margin
|
||||
}
|
||||
);
|
||||
return `data:image/png;base64,${buffer.toString('base64')}`;
|
||||
});
|
||||
};
|
|
@ -0,0 +1,135 @@
|
|||
'use strict';
|
||||
|
||||
const urlFn = require('url');
|
||||
const moment = require('moment');
|
||||
const { escapeHTML, htmlTag, stripHTML } = require('hexo-util');
|
||||
|
||||
module.exports = function (hexo) {
|
||||
const { helper } = hexo.extend;
|
||||
|
||||
helper.register('_meta_generator', () => `<meta name="generator" content="Hexo ${hexo.version}">`);
|
||||
|
||||
helper.register('css_async', (url) => `<link rel="preload" href="${url}" as="style" onload="this.onload=null;this.rel='stylesheet'"><noscript><link rel="stylesheet" href="${url}"></noscript>`);
|
||||
|
||||
helper.register('_open_graph', function (options = {}) {
|
||||
function meta(name, content, escape) {
|
||||
if (escape !== false && typeof content === 'string') {
|
||||
content = escapeHTML(content);
|
||||
}
|
||||
|
||||
return htmlTag('meta', { name, content });
|
||||
}
|
||||
|
||||
function og(name, content, escape) {
|
||||
if (escape !== false && typeof content === 'string') {
|
||||
content = escapeHTML(content);
|
||||
}
|
||||
|
||||
return htmlTag('meta', { property: name, content });
|
||||
}
|
||||
|
||||
const { config, page } = this;
|
||||
const { content } = page;
|
||||
|
||||
let images = options.image || options.images || page.photos || [];
|
||||
|
||||
const description = helper.get('page_descr').bind(this)();
|
||||
const _tags = helper.get('page_tags').bind(this)();
|
||||
|
||||
let keywords;
|
||||
|
||||
const _title = helper.get('page_title').bind(this);
|
||||
const title = (() => _title())();
|
||||
|
||||
const type = options.type || (this.is_post() ? 'article' : 'website');
|
||||
const url = (options.url || this.url).replace('index.html', '');
|
||||
const siteName = options.site_name || config.title;
|
||||
const date = options.date !== false ? options.date || page.date : false;
|
||||
const updated = options.updated !== false ? options.updated || page.updated : false;
|
||||
const thumbnail = page.thumbnail;
|
||||
const language = options.language || config.language;
|
||||
const author = config.author;
|
||||
|
||||
// Images
|
||||
if (!Array.isArray(images)) images = [images];
|
||||
|
||||
if (!images.length && content) {
|
||||
images = images.slice();
|
||||
|
||||
if (content.includes('<img')) {
|
||||
let img;
|
||||
const imgPattern = /<img [^>]*src=['"]([^'"]+)([^>]*>)/gi;
|
||||
while (img = imgPattern.exec(content)) {
|
||||
images.push(img[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
images = images.map(path => {
|
||||
if (!urlFn.parse(path).host) {
|
||||
// resolve `path`'s absolute path relative to current page's url
|
||||
// `path` can be both absolute (starts with `/`) or relative.
|
||||
return urlFn.resolve(url || config.url, path);
|
||||
}
|
||||
|
||||
return path;
|
||||
});
|
||||
|
||||
if (thumbnail) images.unshift(thumbnail);
|
||||
|
||||
|
||||
let result = '';
|
||||
|
||||
result += og('og:title', title);
|
||||
result += og('og:site_name', siteName);
|
||||
result += og('og:type', type);
|
||||
result += og('og:url', url, false);
|
||||
|
||||
if (language) result += og('og:locale', language, false);
|
||||
|
||||
if (description) result += meta('description', description, false);
|
||||
if (_tags) {
|
||||
if (typeof _tags === 'string') {
|
||||
keywords = _tags
|
||||
} else if (_tags.length) {
|
||||
keywords = _tags.map(tag => tag.name ? tag.name : tag).filter(keyword => !!keyword).join()
|
||||
}
|
||||
result += meta('keywords', keywords);
|
||||
}
|
||||
|
||||
images.forEach(path => {
|
||||
result += og('og:image', path, false);
|
||||
});
|
||||
|
||||
if (date) {
|
||||
if ((moment.isMoment(date) || moment.isDate(date)) && !isNaN(date.valueOf())) {
|
||||
result += og('article:published_time', date.toISOString());
|
||||
}
|
||||
}
|
||||
|
||||
if (updated) {
|
||||
if ((moment.isMoment(updated) || moment.isDate(updated)) && !isNaN(updated.valueOf())) {
|
||||
result += og('article:modified_time', updated.toISOString());
|
||||
result += og('og:updated_time', updated.toISOString());
|
||||
}
|
||||
}
|
||||
|
||||
if (this.is_post()) {
|
||||
if (author) {
|
||||
result += og('article:author', author);
|
||||
}
|
||||
|
||||
if (_tags) {
|
||||
result += og('article:tag', keywords);
|
||||
}
|
||||
|
||||
if (thumbnail) {
|
||||
result += meta('twitter:card', 'summary_large_image');
|
||||
result += meta('twitter:image', thumbnail, false);
|
||||
} else {
|
||||
result += meta('twitter:card', 'summary');
|
||||
}
|
||||
};
|
||||
|
||||
return result.trim();
|
||||
});
|
||||
};
|
|
@ -0,0 +1,26 @@
|
|||
const logger = require('hexo-log')();
|
||||
const pkg = require('../../package.json');
|
||||
|
||||
const depsList = Object.keys(pkg.dependencies);
|
||||
|
||||
function checkDep(name) {
|
||||
try {
|
||||
require.resolve(name);
|
||||
return true;
|
||||
} catch(e) {
|
||||
logger.error(`Package ${name} is not installed.`);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
logger.info('Checking dependencies');
|
||||
|
||||
const missingDeps = depsList.map(checkDep).some(installed => !installed);
|
||||
|
||||
if (missingDeps) {
|
||||
logger.error('Please install the missing dependencies.');
|
||||
logger.error('You can enter suka-theme directory and run following commands:');
|
||||
logger.error('$ npm i --production');
|
||||
logger.error('$ yarn --production # If you prefer yarn.');
|
||||
process.exit(-1);
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
const logger = require('hexo-log')();
|
||||
|
||||
module.exports = function (hexo) {
|
||||
if (!(/4.+?/).test(hexo.version)) {
|
||||
logger.error('Please update Hexo to v4.0.0 or greater!');
|
||||
logger.error('You can run following commands at your site directory:');
|
||||
logger.error('$ npm i hexo@4');
|
||||
logger.error('$ yarn add hexo@4 # If you prefer yarn.');
|
||||
process.exit(-1);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
const logger = require('hexo-log')();
|
||||
|
||||
logger.info(`--------------------------------------------------------
|
||||
____ _ _____ _
|
||||
/ ___| _ _| | ____ _ |_ _| |__ ___ _ __ ___ ___
|
||||
\\___ \\| | | | |/ / _\` | | | | '_ \\ / _ \\ '_ \` _ \\ / _ \\
|
||||
___) | |_| | < (_| | | | | | | | __/ | | | | | __/
|
||||
|____/ \\__,_|_|\\_\\__,_| |_| |_| |_|\\___|_| |_| |_|\\___|
|
||||
|
||||
hexo-theme-suka ( https://theme-suka.skk.moe )
|
||||
--------------------------------------------------------------`);
|
|
@ -0,0 +1 @@
|
|||
zh-CN.yml
|
|
@ -0,0 +1,36 @@
|
|||
home: "Home"
|
||||
archive: "Archives"
|
||||
category: "Category"
|
||||
tag: "Tag"
|
||||
search:
|
||||
main: "Search"
|
||||
placeholder: "Please enter a keyword..."
|
||||
num: "Total %s results found"
|
||||
noresult: "No results found. Try another keywords?"
|
||||
trygoogle: "You can also try using Google"
|
||||
nav:
|
||||
prev_page: "Previous"
|
||||
next_page: "Next"
|
||||
share:
|
||||
share: "Share"
|
||||
post: "Share the post"
|
||||
toTwitter: "Share to Twitter"
|
||||
toFacebook: "Share to Facebook"
|
||||
toLinkedIn: "Share to LinkedIn"
|
||||
toTelegram: "Share to Telegram"
|
||||
toGplus: "Share to Google+"
|
||||
toWeibo: "Share to Weibo"
|
||||
toQQ: "Share to QQ"
|
||||
post:
|
||||
continue: "Read more"
|
||||
posted: "Published at"
|
||||
edited: "Updated at"
|
||||
author: "Author"
|
||||
permalink: "Link to this article"
|
||||
expired: "This article was last updated on %s days ago, and the information described in the article may have changed."
|
||||
comment:
|
||||
load_disqus_button: "Read the comment (Make sure that disqus can load properly)"
|
||||
load_disqus_fully_button: "Load the fully comment (Make sure that disqus can load properly)"
|
||||
load_disqus_proxy_button: "Load the basic comment"
|
||||
counter:
|
||||
archive: "%d posts in total"
|
|
@ -0,0 +1,36 @@
|
|||
home: 首页
|
||||
archive: 归档
|
||||
category: 分类
|
||||
tag: 标签
|
||||
search:
|
||||
main: 搜索
|
||||
placeholder: 请输入关键字....
|
||||
num: "总共找到 %s 条结果"
|
||||
noresult: 没有找到任何结果,请更换关键字试试~
|
||||
trygoogle: 你可以试试 Google 站内搜索
|
||||
nav:
|
||||
prev_page: 上一页
|
||||
next_page: 下一页
|
||||
share:
|
||||
share: 分享
|
||||
post: 分享本文
|
||||
toTwitter: "分享到 Twitter"
|
||||
toFacebook: "分享到 Facebook"
|
||||
toLinkedIn: "分享到 LinkedIn"
|
||||
toTelegram: "分享到 Telegram"
|
||||
toGplus: "分享到 Google+"
|
||||
toWeibo: "分享到微博"
|
||||
toQQ: "分享到 QQ"
|
||||
post:
|
||||
continue: "阅读全文"
|
||||
posted: 本文发表于
|
||||
edited: 最后修改于
|
||||
author: 本文作者
|
||||
permalink: 本文链接
|
||||
expired: 本文最后更新于 %s 天前,文中所描述的信息可能已发生改变
|
||||
comment:
|
||||
load_disqus_button: "阅读评论(请确保 disqus 可以正常加载)"
|
||||
load_disqus_fully_button: "加载完整评论(请确保 disqus 可以正常加载)"
|
||||
load_disqus_proxy_button: "加载评论基本模式"
|
||||
counter:
|
||||
archive: "目前共计 %d 篇文章"
|
|
@ -0,0 +1,67 @@
|
|||
<div class="container">
|
||||
<div class="main-container">
|
||||
<main>
|
||||
|
||||
<div class="timeline">
|
||||
|
||||
<div class="timeline-item">
|
||||
<div class="timeline-left">
|
||||
<div class="timeline-icon"></div>
|
||||
</div>
|
||||
<div class="timeline-content">
|
||||
<div class="tile">
|
||||
<div class="tile-content">
|
||||
<p class="tile-title">
|
||||
<%= __('counter.archive', site.posts.length) %>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% function buildArchive(posts, year, month = null) {
|
||||
const time = moment([page.year, (page.month) ? page.month - 1 : null].filter(i => i !== null)); %>
|
||||
<div class="timeline-item">
|
||||
<div class="timeline-left">
|
||||
<div class="timeline-icon icon-lg"></div>
|
||||
</div>
|
||||
<div class="timeline-content">
|
||||
<div class="tile">
|
||||
<div class="tile-content">
|
||||
<p class="tile-title mb-0 h4"><%= (month === null) ? year : (time.locale((config.language) ? config.language : 'en').format('MMMM YYYY')) %></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% posts.each(post => { %>
|
||||
<div class="timeline-item">
|
||||
<div class="timeline-left">
|
||||
<div class="timeline-icon"></div>
|
||||
</div>
|
||||
<div class="timeline-content">
|
||||
<div class="tile">
|
||||
<div class="tile-content">
|
||||
<span class="tile-subtitle text-gray mb-1"><%= date(post.date, 'MM-DD') %></span>
|
||||
<a href="<%- url_for(post.path) %>" class="timeline-tile-title ml-1" rel="bookmark"><span class="tile-title"><%- post.title %></span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% }) %>
|
||||
<% } %>
|
||||
<% if (!page.year) {
|
||||
let years = {};
|
||||
page.posts.each(post => years[post.date.year()] = null);
|
||||
for (let year of Object.keys(years).sort((a, b) => b - a)) {
|
||||
let posts = page.posts.filter(p => p.date.year() == year); %>
|
||||
<%- buildArchive(posts, year, null) %>
|
||||
<% }
|
||||
} else { %>
|
||||
<%- buildArchive(page.posts, page.year, page.month) %>
|
||||
<% } %>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
<%- partial('_partial/pagination') %>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,17 @@
|
|||
<div class="container">
|
||||
<div class="main-container">
|
||||
<main>
|
||||
<!-- # Title # -->
|
||||
<h2 class="page-title"><%= __("category") + " : " + page.category %></h2>
|
||||
<!-- # Post List # -->
|
||||
<div class="post-stream-container">
|
||||
<% page.posts.sort('date', -1).each(function(post){ %>
|
||||
<div class="grid-item">
|
||||
<%- partial('_partial/post-entry', { post: post, index: true, pin: false }) %>
|
||||
</div>
|
||||
<% }) %>
|
||||
</div>
|
||||
</main>
|
||||
<%- partial('_partial/pagination') %>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,26 @@
|
|||
<div class="container">
|
||||
<div class="link-container">
|
||||
|
||||
<% if (site.data.links) { %>
|
||||
<div class="link-list">
|
||||
<% for (const i in site.data.links) { %>
|
||||
<div class="link-item">
|
||||
<a href="<%= site.data.links[i].url %>" title="<%= i %>" target="_blank">
|
||||
<div class="card">
|
||||
<div class="tile tile-centered">
|
||||
<div class="link-img">
|
||||
<img src="<%= site.data.links[i].img %>" alt="<%= i %>">
|
||||
</div>
|
||||
<div class="tile-content link-content">
|
||||
<div class="tile-title link-title"><%= i %></div>
|
||||
<div class="tile-subtitle link-descr text-gray"><%- site.data.links[i].text %></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<% } %>
|
||||
</div>
|
||||
<% } %>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,40 @@
|
|||
<div class="post-container">
|
||||
<div id="post-card" class="card">
|
||||
<% if (page.thumbnail) { %>
|
||||
<div class="card-image lazyload" data-bg="url('<%= page.thumbnail %>')"></div>
|
||||
<% } %>
|
||||
<div class="card-item-container">
|
||||
<div class="card-inner-cell">
|
||||
<!-- # Post Header Info # -->
|
||||
<div class="card-header">
|
||||
<%- partial('_partial/post/header-info') %>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<% if (theme.toc.enable && (page.toc !== false) ) { %>
|
||||
<% const toc_obj = toc(page.content, {
|
||||
class: 'post-toc',
|
||||
list_number: theme.toc.line_number || false
|
||||
}); %>
|
||||
<% if (toc_obj.length > 0) { %>
|
||||
<div id="post-toc"><%- toc_obj %></div>
|
||||
<% } %>
|
||||
<% } %>
|
||||
<article id="post-content">
|
||||
<%- page.content %>
|
||||
</article>
|
||||
<%- partial('_partial/post/footer-info') %>
|
||||
</div>
|
||||
<%- partial('_partial/post/footer-pagination') %>
|
||||
|
||||
<% if (page.comments !== false) { %>
|
||||
<!-- # Comment # -->
|
||||
<% if (theme.comment.use) { %>
|
||||
<div class="card-footer post-comment">
|
||||
<%- partial('_plugin/comment/' + theme.comment.use + '/main') %>
|
||||
</div>
|
||||
<% } %>
|
||||
<% } %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,28 @@
|
|||
<div class="container search-container">
|
||||
<div class="main-container">
|
||||
<!-- # Title # -->
|
||||
<h2 class="page-title"><%= __('search.main') %></h2>
|
||||
|
||||
<% if (theme.search.use === 'google') { %>
|
||||
<%- partial('_plugin/search/google/main') %>
|
||||
<% } %>
|
||||
|
||||
<% if (theme.search.use === 'local') { %>
|
||||
<%- partial('_plugin/search/local-search/main') %>
|
||||
<% } %>
|
||||
|
||||
<% if (theme.search.use === 'swiftype') { %>
|
||||
<%- partial('_plugin/search/swiftype/main') %>
|
||||
<% } %>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% if (theme.search.use === 'local') { %>
|
||||
<%- partial('_plugin/search/local-search/common') %>
|
||||
<% } %>
|
||||
|
||||
<% if (theme.search.use === 'swiftype') { %>
|
||||
<%- partial('_plugin/search/swiftype/common') %>
|
||||
<% } %>
|
|
@ -0,0 +1,15 @@
|
|||
<div class="container">
|
||||
<div class="main-container">
|
||||
<main>
|
||||
<!-- # Title # -->
|
||||
<h2 class="page-title"><%= __("tag") + " : " + page.tag %></h2>
|
||||
<!-- # Post List # -->
|
||||
<div class="post-stream-container">
|
||||
<% page.posts.sort('date', -1).each(function(post){ %>
|
||||
<%- partial('_partial/post-entry', { post: post, index: true, pin: false }) %>
|
||||
<% }) %>
|
||||
</div>
|
||||
</main>
|
||||
<%- partial('_partial/pagination') %>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,15 @@
|
|||
<div class="container">
|
||||
<main>
|
||||
<div class="tagscloud">
|
||||
<%- tagcloud({
|
||||
min_font: .75,
|
||||
max_font: 1.8,
|
||||
unit: 'rem',
|
||||
amount: 9999,
|
||||
color: true,
|
||||
start_color: '#acb3c2',
|
||||
end_color: '#454d5d',
|
||||
}) %>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
|
@ -0,0 +1,36 @@
|
|||
<footer class="text-center">
|
||||
<!-- footer copyright -->
|
||||
<%- fragment_cache('footer_copyright_text', () => {
|
||||
return `
|
||||
<p class="footer-copyright mb-0">Copyright © <span id="copyright-year"></span>
|
||||
<a class="footer-copyright-a" href="${config.url}">${config.title}</a>
|
||||
</p>`
|
||||
}) %>
|
||||
|
||||
<!-- footer custom text -->
|
||||
<p class="footer-text mb-0">
|
||||
<%- fragment_cache('footer_custom_text', () => {
|
||||
if (theme.footer.custom_text) {
|
||||
if (Array.isArray(theme.footer.custom_text)) {
|
||||
return theme.footer.custom_text.join('<br>');
|
||||
} else {
|
||||
return theme.footer.custom_text;
|
||||
}
|
||||
}
|
||||
}) %>
|
||||
</p>
|
||||
<!-- footer develop info -->
|
||||
<p class="footer-develop mb-0">
|
||||
<%- fragment_cache('footer_counter_text', () => {
|
||||
if (theme.busuanzi.enable) return partial('_plugin/busuanzi/footer_counter');
|
||||
return '';
|
||||
}) %>
|
||||
|
||||
<% if ( (theme.valine_counter.enable) && (theme.valine_counter.site_pv.enable) ) { %>
|
||||
<%- partial('_plugin/valine-counter/footer') %>
|
||||
<% } %>
|
||||
Powered by <!--
|
||||
--><a href="https://hexo.io" target="_blank" class="footer-develop-a" rel="external nofollow noopener noreferrer">Hexo</a><span class="footer-develop-divider"></span>Theme - <!--
|
||||
--><a href="https://github.com/SukkaW/hexo-theme-suka" target="_blank" class="footer-develop-a" rel="external noopener">Suka</a>
|
||||
</p>
|
||||
</footer>
|
|
@ -0,0 +1,18 @@
|
|||
<% if (theme.analytics.google_site_id) { %>
|
||||
<%- partial('_plugin/analytics/google', {}, {cache: theme.fragment_cache}) %>
|
||||
<% } %>
|
||||
<% if (theme.analytics.gtags_site_id) { %>
|
||||
<%- partial('_plugin/analytics/gtags', {}, {cache: theme.fragment_cache}) %>
|
||||
<% } %>
|
||||
<% if (theme.analytics.baidu_site_id) { %>
|
||||
<%- partial('_plugin/analytics/baidu', {}, {cache: theme.fragment_cache}) %>
|
||||
<% } %>
|
||||
<% if (theme.analytics.cnzz_site_id) { %>
|
||||
<%- partial('_plugin/analytics/cnzz', {}, {cache: theme.fragment_cache}) %>
|
||||
<% } %>
|
||||
<% if (theme.analytics.tencent_site_id) { %>
|
||||
<%- partial('_plugin/analytics/tencent', {}, {cache: theme.fragment_cache}) %>
|
||||
<% } %>
|
||||
<% if (theme.analytics.tencent_mta_id) { %>
|
||||
<%- partial('_plugin/analytics/tencent-mta', {}, {cache: theme.fragment_cache}) %>
|
||||
<% } %>
|
|
@ -0,0 +1,83 @@
|
|||
<style>
|
||||
body {
|
||||
background-color: <% if (theme.uiux.bg_color) { %><%= theme.uiux.bg_color %><% } else { %>#f8f9fa<% } %>;
|
||||
}
|
||||
|
||||
a, a:visited {
|
||||
color: <% if (theme.uiux.link_color) { %><%= theme.uiux.link_color %><% } else { %>#0070ff<% } %>;
|
||||
}
|
||||
|
||||
a:active, a:focus, a:hover {
|
||||
color: <% if (theme.uiux.link_color) { %><%= theme.uiux.link_color %><% } else { %>#0070ff<% } %>;
|
||||
opacity: .75;
|
||||
}
|
||||
|
||||
#post-content a,
|
||||
#post-content a:hover,
|
||||
#post-content a:focus,
|
||||
#post-content a:visited {
|
||||
color: <% if (theme.uiux.link_color) { %><%= theme.uiux.link_color %><% } else { %>#005eb9<% } %>;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
<% if (theme.uiux.lazy_padding_bottom) { %>
|
||||
#post-content img.lazyload {
|
||||
transition: filter .35s ease 0s;
|
||||
}
|
||||
|
||||
#post-content img.lazyload:not(.loaded) {
|
||||
-webkit-filter: blur(5px);
|
||||
filter: blur(5px);
|
||||
}
|
||||
|
||||
#post-content img.lazyload:not(.loaded):not(.loading) {
|
||||
padding-bottom: <%= theme.uiux.lazy_padding_bottom %>;
|
||||
}
|
||||
|
||||
#post-content img.lazyload.error {
|
||||
display: none
|
||||
}
|
||||
<% } %>
|
||||
|
||||
.post-entry .card-body a {
|
||||
color: <% if (theme.uiux.primary_color) { %><%= theme.uiux.primary_color %><% } else { %>#0070ff<% } %>;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
background: <% if (theme.uiux.primary_color) { %><%= theme.uiux.primary_color %><% } else { %>#444<% } %>;
|
||||
}
|
||||
|
||||
.navbar-link,
|
||||
.navbar-link:visited,
|
||||
.timeline .timeline-item .timeline-icon.icon-lg {
|
||||
color: <% if (theme.uiux.primary_color) { %><%= theme.uiux.primary_color %><% } else { %>#0070ff<% } %>;
|
||||
}
|
||||
|
||||
.navbar-link:hover {
|
||||
color: <% if (theme.uiux.primary_color) { %><%= theme.uiux.primary_color %><% } else { %>#0070ff<% } %>;
|
||||
opacity: .8;
|
||||
}
|
||||
|
||||
#search-input .btn,
|
||||
#disqus_click_btn,
|
||||
#disqus-switch-to-direct,
|
||||
#disqus-loadmore-button {
|
||||
background: <% if (theme.uiux.primary_color) { %><%= theme.uiux.primary_color %><% } else { %>#727e96<% } %>;
|
||||
border-color: <% if (theme.uiux.primary_color) { %><%= theme.uiux.primary_color %><% } else { %>#727e96<% } %>;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#post-toc a.post-toc-link,
|
||||
#post-toc a.post-toc-link:visited,
|
||||
.share-menu.menu .menu-item>a {
|
||||
color: <% if (theme.uiux.primary_color) { %><%= theme.uiux.primary_color %><% } else { %>#727e96<% } %>;
|
||||
}
|
||||
|
||||
.share-menu.menu .menu-item>a:hover,
|
||||
.share-menu.menu .menu-item>a:focus,
|
||||
.share-menu.menu .menu-item>a:visited {
|
||||
color: #50596c;
|
||||
background: <% if (theme.uiux.bg_color) { %><%= theme.uiux.bg_color %><% } else { %>#f8f9fa<% } %>;
|
||||
opacity: .85;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,50 @@
|
|||
<meta http-equiv="x-dns-prefetch-control" content="on">
|
||||
|
||||
<!-- busuanzi -->
|
||||
<% if (theme.busuanzi.enable) { %>
|
||||
<link rel="dns-prefetch" href="//busuanzi.ibruce.info">
|
||||
<% } %>
|
||||
|
||||
<!-- comment -->
|
||||
<% if (theme.comment.use === "changyan") { %>
|
||||
<link rel="dns-prefetch" href="//changyan.sohu.com">
|
||||
<% } %>
|
||||
<% if (theme.comment.use === "disqus") { %>
|
||||
<link rel="dns-prefetch" href="//disqus.com">
|
||||
<link rel="dns-prefetch" href="//<%= theme.comment.disqus.shortname %>.disqus.com">
|
||||
<% } %>
|
||||
<% if (theme.comment.use === "gitalk") { %>
|
||||
<link rel="dns-prefetch" href="//api.github.com">
|
||||
<link rel="dns-prefetch" href="//cors-anywhere.herokuapp.com">
|
||||
<% } %>
|
||||
<% if (theme.comment.use === "gitment") { %>
|
||||
<link rel="dns-prefetch" href="//imsun.github.io">
|
||||
<link rel="dns-prefetch" href="//api.github.com">
|
||||
<% } %>
|
||||
<% if (theme.comment.use === "livere") { %>
|
||||
<link rel="dns-prefetch" href="//cdn-city.livere.com">
|
||||
<% } %>
|
||||
<% if (theme.comment.use === "valine") { %>
|
||||
<link rel="dns-prefetch" href="//cdn1.lncld.net">
|
||||
<% } %>
|
||||
|
||||
<!-- analytics -->
|
||||
<% if (theme.analytics.baidu_site_id) { %>
|
||||
<link rel="dns-prefetch" href="//hm.baidu.com">
|
||||
<% } %>
|
||||
<% if (theme.analytics.google_site_id) { %>
|
||||
<link rel="dns-prefetch" href="//www.google-analytics.com">
|
||||
<% } %>
|
||||
<% if (theme.analytics.gtags_site_id) { %>
|
||||
<link rel="dns-prefetch" href="//www.googletagmanager.com">
|
||||
<link rel="dns-prefetch" href="//www.google-analytics.com">
|
||||
<% } %>
|
||||
<% if (theme.analytics.cnzz_site_id) { %>
|
||||
<link rel="dns-prefetch" href="//s95.cnzz.com">
|
||||
<% } %>
|
||||
<% if (theme.analytics.tencent_site_id) { %>
|
||||
<link rel="dns-prefetch" href="//tajs.qq.com">
|
||||
<% } %>
|
||||
<% if (theme.analytics.tencent_mta_id) { %>
|
||||
<link rel="dns-prefetch" href="//pingjs.qq.com">
|
||||
<% } %>
|
|
@ -0,0 +1,128 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<!--
|
||||
hexo-theme-suka © SukkaW
|
||||
GitHub: https://github.com/SukkaW/hexo-theme-suka
|
||||
-->
|
||||
|
||||
<!-- ### Resource Hint ### -->
|
||||
|
||||
<!-- ## DNS Prefetch ## -->
|
||||
<%- partial('_partial/head/dns-prefetch', {}, {cache: theme.fragment_cache}) %>
|
||||
<!-- ## Preload ## -->
|
||||
<%- partial('_partial/head/preload', {}, {cache: theme.fragment_cache}) %>
|
||||
|
||||
<!-- ### Meta & Title & Info ### -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, maximum-scale=5, viewport-fit=cover">
|
||||
<meta name="renderer" content="webkit">
|
||||
|
||||
<!-- Title -->
|
||||
<title><%= page_title() %></title>
|
||||
|
||||
<!-- Favicons -->
|
||||
<%- fragment_cache('head_favicon_and_theme-color', () => {
|
||||
let html = favicon();
|
||||
let theme_color = '';
|
||||
|
||||
if (theme.head.color) {
|
||||
theme_color = theme.head.color
|
||||
} else if (theme.uiux.bg_color) {
|
||||
theme_color = theme.uiux.bg_color
|
||||
}
|
||||
if (theme.head.favicon.safari_pinned_tab) {
|
||||
html += `<link rel="mask-icon" href="${url_for(theme.head.favicon.safari_pinned_tab)}" color="${theme_color}">`;
|
||||
}
|
||||
if (theme.head.color || theme.uiux.bg_color) {
|
||||
html += `<meta name="theme-color" content="${theme_color}">`;
|
||||
}
|
||||
|
||||
return html;
|
||||
}) %>
|
||||
|
||||
<!-- ### Import File ### -->
|
||||
<%- partial('_partial/source/head') %>
|
||||
|
||||
<!-- ### Site Verification ### -->
|
||||
<%- partial('_partial/head/site-verification', {}, {cache: theme.fragment_cache}) %>
|
||||
|
||||
<%- fragment_cache('head_common', () => {
|
||||
let html = '';
|
||||
/* RSS */
|
||||
if ( (config.feed) && (config.feed.path) ) {
|
||||
if (config.feed.type === 'atom') {
|
||||
html += `<link rel="alternate" type="application/atom+xml" href="${url_for(config.feed.path)}">`
|
||||
} else if (config.feed.type === 'rss2') {
|
||||
html += `<link rel="alternate" type="application/rss+xml" href="${url_for(config.feed.path)}">`
|
||||
}
|
||||
}
|
||||
|
||||
/* WebApp */
|
||||
html += '<meta name="mobile-web-app-capable" content="yes">';
|
||||
html += `<meta name="application-name" content="${config.title}">`;
|
||||
html += `<meta name="msapplication-starturl" content="${config.url}">`;
|
||||
if (theme.head.color) {
|
||||
html += `<meta name="msapplication-navbutton-color" content="${theme.head.color}">`;
|
||||
} else if (theme.uiux.bg_color) {
|
||||
html += `<meta name="msapplication-navbutton-color" content="${theme.uiux.bg_color}">`;
|
||||
}
|
||||
html += '<meta name="apple-mobile-web-app-capable" content="yes">';
|
||||
html += `<meta name="apple-mobile-web-app-title" content="${config.title}">`
|
||||
html += '<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">'
|
||||
|
||||
/* PWA Manifest */
|
||||
if (theme.head.pwa_manifest) {
|
||||
html += `<link rel="manifest" href="${theme.head.pwa_manifest}">`
|
||||
}
|
||||
|
||||
/* Open Search */
|
||||
if (theme.head.open_search) {
|
||||
html += `<link rel="search" type="application/opensearchdescription+xml" href="${theme.head.open_search}" title="${config.title}">`
|
||||
}
|
||||
|
||||
return html;
|
||||
}) %>
|
||||
|
||||
<!-- ### The Open Graph & Twitter Card Protocol ### -->
|
||||
<%- _open_graph() %>
|
||||
|
||||
<%- fragment_cache('head_facebook_admin', () => {
|
||||
let html = '';
|
||||
|
||||
if (theme.comment.use === 'facebook') {
|
||||
if (theme.comment.facebook.admin_fb_appid) {
|
||||
html += `<meta property="fb:app_id" content="${theme.comment.facebook.admin_fb_appid}">`
|
||||
} else if (theme.comment.facebook.admin_fb_username) {
|
||||
html += `<meta property="fb:admins" content="${theme.comment.facebook.admin_fb_username}">`
|
||||
}
|
||||
}
|
||||
|
||||
return html;
|
||||
}) %>
|
||||
|
||||
<!-- ### Canonical link ### -->
|
||||
<link rel="canonical" href="<%= full_url_for(page.path).replace('index.html', '') %>">
|
||||
|
||||
<%- fragment_cache('head_meta_generator', _meta_generator) %>
|
||||
|
||||
<!-- ### Analytics ### -->
|
||||
<%- partial('_partial/head/analytics', {}, {cache: theme.fragment_cache}) %>
|
||||
|
||||
<!-- ### Structured Data ### -->
|
||||
<%- partial('_partial/head/structured-data') %>
|
||||
|
||||
<!-- ### Custom Head ### -->
|
||||
<%- fragment_cache('head_custom_code', () => {
|
||||
let html = '';
|
||||
if (site.data.head) {
|
||||
for (const i in site.data.head) {
|
||||
if (Array.isArray(site.data.head[i])) {
|
||||
html += site.data.head[i].join('');
|
||||
} else if (site.data.head[i] !== null) {
|
||||
html += site.data.head[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
return html;
|
||||
}) %>
|
||||
</head>
|
|
@ -0,0 +1,12 @@
|
|||
<script>
|
||||
window.lsVersion = "<%= theme.verison %>",
|
||||
window.oldVersion = [
|
||||
<% if(theme.old_verison) { %>
|
||||
<% if(Array.isArray(theme.old_verison)) { %>
|
||||
"<%- theme.old_verison.join('\",\"') %>"
|
||||
<% } else { %>
|
||||
"<%- theme.old_verison %>"
|
||||
<% } %>
|
||||
<% } %>
|
||||
]
|
||||
</script>
|
|
@ -0,0 +1,9 @@
|
|||
<% if (theme.busuanzi.enable) { %>
|
||||
<!-- Busuanzi -->
|
||||
<%- partial('_plugin/busuanzi/preload') %>
|
||||
<% } %>
|
||||
|
||||
<% if (theme.hanabi.enable) { %>
|
||||
<!-- Hanabi -->
|
||||
<%- partial('_plugin/highlight/hanabi/preload') %>
|
||||
<% } %>
|
|
@ -0,0 +1,6 @@
|
|||
<% if (theme.head.site_verification.google) { %>
|
||||
<meta name="google-site-verification" content="<%= theme.head.site_verification.google %>" />
|
||||
<% } %>
|
||||
<% if (theme.head.site_verification.baidu) { %>
|
||||
<meta name="baidu-site-verification" content="<%= theme.head.site_verification.baidu %>" />
|
||||
<% } %>
|
|
@ -0,0 +1,100 @@
|
|||
<% if ( is_home() ) { %>
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "http://schema.org",
|
||||
"@type": "Blog",
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": "<%= config.author %>",
|
||||
"image": {
|
||||
"@type": "ImageObject",
|
||||
"url": "<%= full_url_for(theme.img.avatar) %>"
|
||||
},
|
||||
"description": "<%- theme.uiux.slogan %>"
|
||||
},
|
||||
"publisher": {
|
||||
"@type": "Organization",
|
||||
"name": "<%= config.title %>",
|
||||
"logo": {
|
||||
"@type": "ImageObject",
|
||||
"url": "<%= site_logo() %>"
|
||||
}
|
||||
},
|
||||
"url": "<%- config.url %>",
|
||||
"logo": "<%= site_logo() %>",
|
||||
"image": {
|
||||
"@type": "ImageObject",
|
||||
"url": "<%= site_logo() %>"
|
||||
},
|
||||
"mainEntityOfPage": {
|
||||
"@type": "WebPage",
|
||||
"@id": "<%= config.url %>"
|
||||
},
|
||||
<% if ( (theme.search.use === "local") || (theme.nav.search.link) ) { %>
|
||||
"potentialAction": {
|
||||
"@type": "SearchAction",
|
||||
"target": "<%= full_url_for(theme.nav.search.link) %>?s={search_term_string}",
|
||||
"query-input": "required name=search_term_string"
|
||||
},
|
||||
<% } %>
|
||||
"keywords": "<%= page_tags() %>",
|
||||
"description": "<%= page_descr() %>"
|
||||
}
|
||||
</script>
|
||||
<% } %>
|
||||
|
||||
<% if( (is_post()) ) { %>
|
||||
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "http://schema.org",
|
||||
"url": "<%= page.permalink %>",
|
||||
"@type": "BlogPosting",
|
||||
"logo": "<%= site_logo() %>",
|
||||
"mainEntityOfPage": {
|
||||
"@type": "WebPage",
|
||||
"@id": "<%= page.permalink %>"
|
||||
},
|
||||
"headline": "<%= page_title() %>",
|
||||
<% if(page.thumbnail) { %>
|
||||
"image": {
|
||||
"@type": "ImageObject",
|
||||
"url": "<%= full_url_for(page.thumbnail) %>"
|
||||
},
|
||||
<% } else { %>
|
||||
"image": {
|
||||
"@type": "ImageObject",
|
||||
"url": "<%= site_logo() %>"
|
||||
},
|
||||
<% } %>
|
||||
"datePublished": "<%= date_xml(page.date) %>",
|
||||
"dateModified": "<%= date_xml(page.updated) %>",
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": "<%= config.author %>",
|
||||
"image": {
|
||||
"@type": "ImageObject",
|
||||
"url": "<%= full_url_for(theme.img.avatar) %>"
|
||||
},
|
||||
"description": "<%- theme.uiux.slogan %>"
|
||||
},
|
||||
"publisher": {
|
||||
"@type": "Organization",
|
||||
"name": "<%= config.title %>",
|
||||
"logo": {
|
||||
"@type": "ImageObject",
|
||||
"url": "<%= site_logo() %>"
|
||||
}
|
||||
},
|
||||
<% if ( (theme.search.use === "local") || (theme.nav.search.link) ) { %>
|
||||
"potentialAction": {
|
||||
"@type": "SearchAction",
|
||||
"target": "<%= full_url_for(theme.nav.search.link) %>?s={search_term_string}",
|
||||
"query-input": "required name=search_term_string"
|
||||
},
|
||||
<% } %>
|
||||
"keywords": "<%= page_tags() %>",
|
||||
"description": "<%= page_descr() %>"
|
||||
}
|
||||
</script>
|
||||
<% } %>
|
|
@ -0,0 +1,16 @@
|
|||
<!-- ## Header ##-->
|
||||
<header>
|
||||
<h1 class="header-title text-center"><a href="<%= config.root %>"><%= config.title %></a></h1>
|
||||
|
||||
<p class="text-center header-slogan">
|
||||
<% if (theme.uiux.slogan) { %>
|
||||
<% if (Array.isArray(theme.uiux.slogan)) { %>
|
||||
<%- theme.uiux.slogan.join('<br>') %>
|
||||
<% } else { %>
|
||||
<%- theme.uiux.slogan %>
|
||||
<% } %>
|
||||
<% } %>
|
||||
</p>
|
||||
|
||||
<%- partial('_partial/index-nav') %>
|
||||
</header>
|
|
@ -0,0 +1,22 @@
|
|||
<nav class="navbar-section text-center">
|
||||
<% if (theme.nav.home.use) { %>
|
||||
<a href="<%= url_for('/') %>" class="navbar-link"><%= __('home') %></a>
|
||||
<% } %>
|
||||
<% if (theme.nav.archives.use) {
|
||||
let archiveDir = config.archive_dir;
|
||||
if (archiveDir[archiveDir.length - 1] !== '/') archiveDir += '/'; %>
|
||||
<a href="<%= url_for(archiveDir) %>" class="navbar-link"><%= __('archive') %></a>
|
||||
<% } %>
|
||||
<% if (theme.nav.search.use) { %>
|
||||
<a href="<%= theme.nav.search.link %>" class="navbar-link"><%= __('search.main') %></a>
|
||||
<% } %>
|
||||
<% for (const i in theme.nav.pages){ %>
|
||||
<a href="<%= theme.nav.pages[i].link %>" class="navbar-link"><%= i %></a>
|
||||
<% } %>
|
||||
<% if (theme.nav.share.use) { %>
|
||||
<%- partial('_partial/menu/index-share', {}, {cache: theme.fragment_cache}) %>
|
||||
<% } %>
|
||||
<% if (theme.nav.rss.use) { %>
|
||||
<a href="<%= url_for(config.feed.path) %>" target="_blank" class="navbar-link">RSS</a>
|
||||
<% } %>
|
||||
</nav>
|
|
@ -0,0 +1,62 @@
|
|||
<div class="dropdown dropdown-right">
|
||||
<a class="navbar-link dropdown-toggle" tabindex="0"><%= __('share.share') %></a>
|
||||
<ul class="menu share-menu">
|
||||
|
||||
<!-- Share Weibo -->
|
||||
<% if(theme.sns_share.weibo) { %>
|
||||
<li class="menu-item">
|
||||
<a href="http://service.weibo.com/share/share.php?appkey=&title=<%- config.title %>&url=<%- config.url %>&pic=<% if (page.thumbnail) { %><%= page.thumbnail %><% } else { %><%= site_logo() %><% } %>&searchPic=false&style=simple" target="_blank" rel="external noopener noreferrer nofollow"><%= __('share.toWeibo') %></a>
|
||||
</li>
|
||||
<% } %>
|
||||
|
||||
<!-- Share Twitter -->
|
||||
<% if(theme.sns_share.twitter) { %>
|
||||
<li class="menu-item">
|
||||
<a href="https://twitter.com/intent/tweet?text=<%- config.title %>&url=<%- config.url %>&via=<%= config.author %>" target="_blank" rel="external noopener noreferrer nofollow"><%= __('share.toTwitter') %></a>
|
||||
</li>
|
||||
<% } %>
|
||||
|
||||
<!-- Share Facebook -->
|
||||
<% if(theme.sns_share.facebook) { %>
|
||||
<li class="menu-item">
|
||||
<a href="https://www.facebook.com/sharer/sharer.php?u=<%= config.url %>" target="_blank" rel="external noopener noreferrer nofollow"><%= __('share.toFacebook') %></a>
|
||||
</li>
|
||||
<% } %>
|
||||
|
||||
<!-- Share Google+ -->
|
||||
<% if(theme.sns_share.googleplus) { %>
|
||||
<li class="menu-item">
|
||||
<a href="https://plus.google.com/share?url=<%- config.url %>" target="_blank" rel="external noopener noreferrer nofollow"><%= __('share.toGplus') %></a>
|
||||
</li>
|
||||
<% } %>
|
||||
|
||||
<!-- Share LinkedIn -->
|
||||
<% if(theme.sns_share.linkedin) { %>
|
||||
<li class="menu-item">
|
||||
<a href="https://www.linkedin.com/shareArticle?mini=true&url=<%- config.url %>&title=<%= page.title %>" target="_blank" rel="external noopener noreferrer nofollow"><%= __('share.toLinkedIn') %></a>
|
||||
</li>
|
||||
<% } %>
|
||||
|
||||
<!-- Share QQ -->
|
||||
<% if(theme.sns_share.qq) { %>
|
||||
<li class="menu-item">
|
||||
<a href="http://connect.qq.com/widget/shareqq/index.html?site=<%- config.title %>&title=<%= page.title %>&summary=<%= config.description %>&pics=<% if (page.thumbnail) { %><%= page.thumbnail %><% } else { %><%= site_logo() %><% } %>&url=<%- config.url %>" target="_blank" rel="external noopener noreferrer nofollow"> <%= __('share.toQQ') %></a>
|
||||
</li>
|
||||
<% } %>
|
||||
|
||||
<!-- Share Telegram -->
|
||||
<% if(theme.sns_share.telegram) { %>
|
||||
<li class="menu-item">
|
||||
<a href="https://t.me/share/url?url=<%- config.url %>&text=<%= page.title %>" target="_blank" rel="external noopener noreferrer nofollow"><%= __('share.toTelegram') %></a>
|
||||
</li>
|
||||
<% } %>
|
||||
|
||||
<!-- QRCode -->
|
||||
<% if(theme.qrcode.post_share) { %>
|
||||
<li class="menu-item">
|
||||
<img src="<%- qrcode(url, {margin: 2, size: 4}) %>" alr="QRCode">
|
||||
</li>
|
||||
<% } %>
|
||||
|
||||
</ul>
|
||||
</div>
|
|
@ -0,0 +1,61 @@
|
|||
<div class="dropdown dropdown-right">
|
||||
<a class="dropdown-toggle" tabindex="0"><%= __('share.post') %></a>
|
||||
<ul class="menu share-menu">
|
||||
<!-- Share Weibo -->
|
||||
<% if(theme.sns_share.weibo) { %>
|
||||
<li class="menu-item">
|
||||
<a href="http://service.weibo.com/share/share.php?appkey=&title=<%= page.title %>&url=<%= full_url_for(page.path).replace('index.html', '') %>&pic=<% if (page.thumbnail) { %><%= page.thumbnail %><% } else { %><%= site_logo() %><% } %>&searchPic=false&style=simple" target="_blank" rel="external noopener noreferrer nofollow"><%= __('share.toWeibo') %></a>
|
||||
</li>
|
||||
<% } %>
|
||||
|
||||
<!-- Share Twitter -->
|
||||
<% if(theme.sns_share.twitter) { %>
|
||||
<li class="menu-item">
|
||||
<a href="https://twitter.com/intent/tweet?text=<%= page.title %>&url=<%= full_url_for(page.path).replace('index.html', '') %>&via=<%= config.author %>" target="_blank" rel="external noopener noreferrer nofollow"><%= __('share.toTwitter') %></a>
|
||||
</li>
|
||||
<% } %>
|
||||
|
||||
<!-- Share Facebook -->
|
||||
<% if(theme.sns_share.facebook) { %>
|
||||
<li class="menu-item">
|
||||
<a href="https://www.facebook.com/sharer/sharer.php?u=<%= full_url_for(page.path).replace('index.html', '') %>" target="_blank" rel="external noopener noreferrer nofollow"><%= __('share.toFacebook') %></a>
|
||||
</li>
|
||||
<% } %>
|
||||
|
||||
<!-- Share Google+ -->
|
||||
<% if(theme.sns_share.googleplus) { %>
|
||||
<li class="menu-item">
|
||||
<a href="https://plus.google.com/share?url=<%= full_url_for(page.path).replace('index.html', '') %>" target="_blank" rel="external noopener noreferrer nofollow"><%= __('share.toGplus') %></a>
|
||||
</li>
|
||||
<% } %>
|
||||
|
||||
<!-- Share LinkedIn -->
|
||||
<% if(theme.sns_share.linkedin) { %>
|
||||
<li class="menu-item">
|
||||
<a href="https://www.linkedin.com/shareArticle?mini=true&url=<%= full_url_for(page.path).replace('index.html', '') %>&title=<%- config.title %>" target="_blank" rel="external noopener noreferrer nofollow"><%= __('share.toLinkedIn') %></a>
|
||||
</li>
|
||||
<% } %>
|
||||
|
||||
<!-- Share QQ -->
|
||||
<% if(theme.sns_share.qq) { %>
|
||||
<li class="menu-item">
|
||||
<a href="http://connect.qq.com/widget/shareqq/index.html?site=<%- config.title %>&title=<%- config.title %>&summary=<%= config.description %>&pics=<% if (page.thumbnail) { %><%= page.thumbnail %><% } else { %><%= site_logo() %><% } %>&url=<%= full_url_for(page.path).replace('index.html', '') %>" target="_blank" rel="external noopener noreferrer nofollow"> <%= __('share.toQQ') %></a>
|
||||
</li>
|
||||
<% } %>
|
||||
|
||||
<!-- Share Telegram -->
|
||||
<% if(theme.sns_share.telegram) { %>
|
||||
<li class="menu-item">
|
||||
<a href="https://t.me/share/url?url=<%= full_url_for(page.path).replace('index.html', '') %>&text=<%- config.title %>" target="_blank" rel="external noopener noreferrer nofollow"><%= __('share.toTelegram') %></a>
|
||||
</li>
|
||||
<% } %>
|
||||
|
||||
<!-- QRCode -->
|
||||
<% if(theme.qrcode.post_share) { %>
|
||||
<li class="menu-item">
|
||||
<img src="<%- qrcode(url, {margin: 2, size: 4}) %>" alt="QRCode">
|
||||
</li>
|
||||
<% } %>
|
||||
|
||||
</ul>
|
||||
</div>
|
|
@ -0,0 +1,22 @@
|
|||
<% if (page.total > 1) { %>
|
||||
<nav>
|
||||
<ul class="pagination">
|
||||
<% if (page.prev) { %>
|
||||
<li class="page-item page-prev">
|
||||
<a href="<%- url_for(page.prev_link) %>" rel="prev">
|
||||
<span class="page-item-subtitle"><i class="icon icon-back" aria-hidden="true"></i></span>
|
||||
<span class="page-item-title"><%= __('nav.prev_page') %></span>
|
||||
</a>
|
||||
</li>
|
||||
<% } %>
|
||||
<% if (page.next) { %>
|
||||
<li class="page-item page-next">
|
||||
<a href="<%- url_for(page.next_link) %>" rel="next">
|
||||
<span class="page-item-title"><%= __('nav.next_page') %></span>
|
||||
<span class="page-item-subtitle"><i class="icon icon-forward" aria-hidden="true"></i></span>
|
||||
</a>
|
||||
</li>
|
||||
<% } %>
|
||||
</ul>
|
||||
</nav>
|
||||
<% } %>
|
|
@ -0,0 +1,34 @@
|
|||
<% if (post.title) { %>
|
||||
<h2 class="h5 mb-0 card-header"><a class="card-title" href="<%= url_for(post.path) %>" rel="bookmark"><%- post.title %></a></h2>
|
||||
<% } %>
|
||||
|
||||
<p class="mb-0 card-body">
|
||||
<% if (post.excerpt) {%>
|
||||
<%- strip_html(post.excerpt) %>
|
||||
<% } else { %>
|
||||
<%- strip_html(truncate(post.content, { length: theme.post.entry_excerpt })) %>
|
||||
<% } %><a href="<%= url_for(post.path) %>"><%= __('post.continue') %></a>
|
||||
</p>
|
||||
|
||||
<%
|
||||
const lazyloadImgSrc = (theme.vendors.lazyload_img) ? theme.vendors.lazyload_img : url_for('img/suka-lazyload.gif');
|
||||
%>
|
||||
|
||||
|
||||
<!-- Date & Category -->
|
||||
<div class="card-footer post-entry-info text-gray">
|
||||
<img class="author-thumb lazyload" data-src="<%= url_for(theme.img.avatar) %>" src="<%= lazyloadImgSrc %>" alt="<%= config.author %>'s Avatar">
|
||||
<time><%= date(post.date, config.date_format) %></time>
|
||||
<% if (post.categories && post.categories.length) { %>
|
||||
<span class="suka-devide-dot"></span>
|
||||
<%- list_categories(post.categories, {
|
||||
show_count: false,
|
||||
separator: '<span class="suka-devide-dot"></span>',
|
||||
style: 'none'
|
||||
}) %>
|
||||
<% } %>
|
||||
<% if ( (theme.valine_counter.enable) && (theme.valine_counter.index_post_pv.enable) ) { %>
|
||||
<span class="suka-devide-dot"></span>
|
||||
<%- partial('_plugin/valine-counter/index_post', {}, {cache: theme.fragment_cache}) %>
|
||||
<% } %>
|
||||
</div>
|
|
@ -0,0 +1,18 @@
|
|||
<article class="post-entry container px-0 card">
|
||||
<div class="columns col-gapless">
|
||||
<% if (post.thumbnail) { %>
|
||||
<div class="column column-thumbnail col-4 col-lg-12">
|
||||
<a href="<%= url_for(post.path) %>">
|
||||
<div class="post-thumbnail lazyload" data-bg="url(<%= post.thumbnail %>)"></div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="column column-body col-8 col-lg-12">
|
||||
<%- partial('_partial/post-entry-content') %>
|
||||
</div>
|
||||
<% } else { %>
|
||||
<div class="column col-12">
|
||||
<%- partial('_partial/post-entry-content') %>
|
||||
</div>
|
||||
<% } %>
|
||||
</div>
|
||||
</article>
|
|
@ -0,0 +1,58 @@
|
|||
<% if (page.hide_license !== true && theme.post.license || page.license) { %>
|
||||
<blockquote class="post-license">
|
||||
<p>
|
||||
<strong><%- __('post.author') %> : <%= config.author %></strong>
|
||||
<br>
|
||||
<strong>
|
||||
<% if (page.license) { %>
|
||||
<%- page.license %>
|
||||
<% } else { %>
|
||||
<%- theme.post.license %>
|
||||
<% } %></strong>
|
||||
<br>
|
||||
<strong><%- __('post.permalink') %> : </strong><a href="<%= page.permalink %>"><%= page.permalink %></a>
|
||||
</p>
|
||||
</blockquote>
|
||||
<% } %>
|
||||
|
||||
<% if (theme.post.expire) { %>
|
||||
<blockquote id="date-expire-notification" class="post-expired-notify"><%- __('post.expired', '<span id="date-expire-num"></span>') %></blockquote>
|
||||
<script>
|
||||
(function() {
|
||||
var dateUpdate = Date.parse("<%= date(page.updated, 'YYYY-MM-DD') %>");
|
||||
var nowDate = new Date();
|
||||
var a = nowDate.getTime();
|
||||
var b = a - dateUpdate;
|
||||
var daysUpdateExpire = Math.floor(b/(24*3600*1000));
|
||||
if (daysUpdateExpire >= 120) {
|
||||
document.getElementById('date-expire-num').innerHTML = daysUpdateExpire;
|
||||
} else {
|
||||
document.getElementById('date-expire-notification').style.display = 'none';
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<% } %>
|
||||
|
||||
<p class="post-footer-info mb-0 pt-0"><%= __('post.posted') %> <time datetime="<%= date_xml(page.date) %>" itemprop="datePublished"><%= date(page.date, config.date_format) %></time>
|
||||
<% if (date(page.date, 'MMM DD, YYYY') !== date(page.updated, 'MMM DD, YYYY')) { %>
|
||||
, <%= __('post.edited') %> <time datetime="<%= date_xml(page.updated) %>" itemprop="dateModified"><%= date(page.updated, config.date_format) %></time>
|
||||
<% } %>
|
||||
</p>
|
||||
<p class="post-footer-info mb-0 pt-2">
|
||||
<% if (page.categories && page.categories.length) { %>
|
||||
<span class="post-categories-list mt-2">
|
||||
<% page.categories.forEach(function(category, index) { %>
|
||||
<a class="post-categories-list-item" href='<%= url_for(category.path) %>'><%= category.name %></a>
|
||||
<% }); %>
|
||||
</span>
|
||||
<% } %>
|
||||
|
||||
<% if (page.tags && page.tags.length){ %>
|
||||
<span class="post-tags-list mt-2">
|
||||
<% page.tags.forEach(function(tag, index) { %>
|
||||
<a class="post-tags-list-item" href="<%= url_for(tag.path) %>" rel="tag"># <%= tag.name %></a>
|
||||
<% }); %>
|
||||
</span>
|
||||
<% } %>
|
||||
|
||||
</p>
|
|
@ -0,0 +1,23 @@
|
|||
<div class="post-nav px-2 bg-gray">
|
||||
<ul class="pagination">
|
||||
<!-- Prev Nav -->
|
||||
<% if (page.prev) { %>
|
||||
<li class="page-item page-prev">
|
||||
<a href="<%- url_for(page.prev.path) %>" rel="prev">
|
||||
<div class="page-item-title"><i class="icon icon-back" aria-hidden="true"></i></div>
|
||||
<div class="page-item-subtitle"><%= page.prev.title %></div>
|
||||
</a>
|
||||
</li>
|
||||
<% } %>
|
||||
|
||||
<!-- Next Nav -->
|
||||
<% if (page.next) { %>
|
||||
<li class="page-item page-next">
|
||||
<a href="<%- url_for(page.next.path) %>" rel="next">
|
||||
<div class="page-item-title"><i class="icon icon-forward" aria-hidden="true"></i></div>
|
||||
<div class="page-item-subtitle"><%= page.next.title %></div>
|
||||
</a>
|
||||
</li>
|
||||
<% } %>
|
||||
</ul>
|
||||
</div>
|
|
@ -0,0 +1,33 @@
|
|||
<% if (page.title) { %>
|
||||
<h1 class="card-title h3 mb-2"><%- page.title %></h1>
|
||||
<% } %>
|
||||
|
||||
<%
|
||||
const lazyloadImgSrc = (theme.vendors.lazyload_img) ? theme.vendors.lazyload_img : url_for('img/suka-lazyload.gif');
|
||||
%>
|
||||
|
||||
<div class="post-header-info">
|
||||
<p class="post-header-info-left text-gray">
|
||||
<img class="author-thumb lazyload" data-src="<%= url_for(theme.img.avatar) %>" src="<%= lazyloadImgSrc %>" alt="<%= config.author %>'s Avatar">
|
||||
<span><%= date(page.date, config.date_format) %></span>
|
||||
<% if (page.categories && page.categories.length) { %>
|
||||
<span class="suka-devide-dot"></span>
|
||||
<%- list_categories(page.categories, {
|
||||
show_count: false,
|
||||
separator: '<span class="suka-devide-dot"></span>',
|
||||
style: 'none'
|
||||
}) %>
|
||||
<% } %>
|
||||
<% if ( (theme.busuanzi.enable) && (theme.busuanzi.post_pv.enable) ) { %>
|
||||
<%- partial('_plugin/busuanzi/post-counter', {}, {cache: theme.fragment_cache}) %>
|
||||
<% } %>
|
||||
<% if ( (theme.valine_counter.enable) && (theme.valine_counter.post_pv.enable) ) { %>
|
||||
<%- partial('_plugin/valine-counter/post', {}, {cache: theme.fragment_cache}) %>
|
||||
<% } %>
|
||||
</p>
|
||||
<div class="post-header-info-right">
|
||||
<% if (theme.post.share) { %>
|
||||
<%- partial('_partial/menu/post-share') %>
|
||||
<% } %>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,84 @@
|
|||
<!-- ### Footer JS Import ### -->
|
||||
|
||||
<script>
|
||||
|
||||
<%- fragment_cache('footer_inline_js', () => {
|
||||
let js = [];
|
||||
|
||||
/* Vanilla Lazyload Config */
|
||||
js.push(`
|
||||
window.lazyLoadOptions = {
|
||||
elements_selector: ".lazyload",
|
||||
threshold: 50
|
||||
};`);
|
||||
|
||||
/* Copyright */
|
||||
if (theme.footer.copyright_since > 0) {
|
||||
js.push(`
|
||||
(function() {
|
||||
var copyrightNow = new Date().getFullYear();
|
||||
var copyrightContent = document.getElementById('copyright-year');
|
||||
var copyrightSince = ${theme.footer.copyright_since};
|
||||
if (copyrightSince === copyrightNow) {
|
||||
copyrightContent.textContent = copyrightNow;
|
||||
} else {
|
||||
copyrightContent.textContent = copyrightSince + ' - ' + copyrightNow;
|
||||
}
|
||||
})();`);
|
||||
} else {
|
||||
js.push(`document.getElementById('copyright-year').textContent = new Date().getFullYear();`);
|
||||
}
|
||||
|
||||
/* Suka Theme Console.Log */
|
||||
js.push(`console.log('\\n %c Suka Theme (hexo-theme-suka) | © SukkaW | Verision ${theme.verison} %c https://github.com/SukkaW/hexo-theme-suka \\n', 'color: #fff; background: #444; padding:5px 0;', 'background: #bbb; padding:5px 0;');`);
|
||||
|
||||
return js.join('\n');
|
||||
}) %>
|
||||
|
||||
</script>
|
||||
|
||||
<%- fragment_cache('footer_common_js', () => {
|
||||
let html = '';
|
||||
|
||||
/* vanilla-lazyload */
|
||||
if (theme.vendors.lazyload) {
|
||||
html += `<script src="${theme.vendors.lazyload}" async></script>`
|
||||
} else {
|
||||
html += `<script src="${url_for('lib/vanilla-lazyload/lazyload.min.js')}" async></script>`
|
||||
}
|
||||
|
||||
/* Busuanzi */
|
||||
if (theme.busuanzi.enable) html += partial('_plugin/busuanzi/import_js');
|
||||
|
||||
/* theme.hanabi.enable */
|
||||
if (theme.hanabi.enable) html += partial('_plugin/highlight/hanabi/import_js');
|
||||
|
||||
return html
|
||||
}) %>
|
||||
|
||||
<% if (theme.prettify.enable) { %>
|
||||
<!-- prettify -->
|
||||
<%- partial('_plugin/highlight/prettify/import_js') %>
|
||||
<% } %>
|
||||
|
||||
<!-- Comment -->
|
||||
<% if (theme.comment.use) { %>
|
||||
<% if ( (is_post()) ) { %>
|
||||
<%- partial('_plugin/comment/' + theme.comment.use + '/common', {}, {cache: theme.fragment_cache}) %>
|
||||
<% } %>
|
||||
<% } %>
|
||||
|
||||
<!-- ### Custom Footer ### -->
|
||||
<%- fragment_cache('footer_custom_code', () => {
|
||||
let html = '';
|
||||
if (site.data.footer) {
|
||||
for (const i in site.data.footer) {
|
||||
if (Array.isArray(site.data.footer[i])) {
|
||||
html += site.data.footer[i].join('');
|
||||
} else if (site.data.footer[i] !== null) {
|
||||
html += site.data.footer[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
return html;
|
||||
}) %>
|
|
@ -0,0 +1,49 @@
|
|||
<%- fragment_cache('head_source_common', () => {
|
||||
let html = '';
|
||||
|
||||
/* spectre.css */
|
||||
if (theme.vendors.spectre.spectre_css) {
|
||||
html += `<link rel="stylesheet" href="${theme.vendors.spectre.spectre_css}">`;
|
||||
} else {
|
||||
html += `<link rel="stylesheet" href="${url_for('lib/spectre/spectre.min.css')}">`;
|
||||
}
|
||||
|
||||
html += partial('_partial/head/config_style');
|
||||
|
||||
/* style.css */
|
||||
if (theme.vendors.suka.style_css) {
|
||||
html += `<link rel="stylesheet" href="${theme.vendors.suka.style_css}">`;
|
||||
} else {
|
||||
html += `<link rel="stylesheet" href="${url_for('css/style.min.css')}">`;
|
||||
}
|
||||
|
||||
return html;
|
||||
}) %>
|
||||
|
||||
<% if (theme.comment.use === 'disqusjs') { %>
|
||||
<% if ( (is_post()) ) { %>
|
||||
<!-- Import DisqusJS Default Theme -->
|
||||
<%- partial('_plugin/comment/disqusjs/common_head', {}, {cache: theme.fragment_cache}) %>
|
||||
<% } %>
|
||||
<% } %>
|
||||
|
||||
<% if (config.suka_theme.prism.enable) { %>
|
||||
<!-- prism.css -->
|
||||
<%- partial('_plugin/highlight/prism/common') %>
|
||||
<% } %>
|
||||
|
||||
<% if (theme.prettify.enable) { %>
|
||||
<!-- Prettify Theme -->
|
||||
<%- partial('_plugin/highlight/prettify/theme') %>
|
||||
<% } %>
|
||||
|
||||
<% if (config.highlight.enable) { %>
|
||||
<!-- Prettify Theme -->
|
||||
<%- partial('_plugin/highlight/hexo-hljs/theme') %>
|
||||
<% } %>
|
||||
|
||||
|
||||
<script>
|
||||
/*! loadCSS. [c]2017 Filament Group, Inc. MIT License */
|
||||
!function(t){"use strict";t.loadCSS||(t.loadCSS=function(){});var e=loadCSS.relpreload={};if(e.support=function(){var e;try{e=t.document.createElement("link").relList.supports("preload")}catch(t){e=!1}return function(){return e}}(),e.bindMediaToggle=function(t){var e=t.media||"all";function a(){t.addEventListener?t.removeEventListener("load",a):t.attachEvent&&t.detachEvent("onload",a),t.setAttribute("onload",null),t.media=e}t.addEventListener?t.addEventListener("load",a):t.attachEvent&&t.attachEvent("onload",a),setTimeout(function(){t.rel="stylesheet",t.media="only x"}),setTimeout(a,3e3)},e.poly=function(){if(!e.support())for(var a=t.document.getElementsByTagName("link"),n=0;n<a.length;n++){var o=a[n];"preload"!==o.rel||"style"!==o.getAttribute("as")||o.getAttribute("data-loadcss")||(o.setAttribute("data-loadcss",!0),e.bindMediaToggle(o))}},!e.support()){e.poly();var a=t.setInterval(e.poly,500);t.addEventListener?t.addEventListener("load",function(){e.poly(),t.clearInterval(a)}):t.attachEvent&&t.attachEvent("onload",function(){e.poly(),t.clearInterval(a)})}"undefined"!=typeof exports?exports.loadCSS=loadCSS:t.loadCSS=loadCSS}("undefined"!=typeof global?global:this);
|
||||
</script>
|
|
@ -0,0 +1,8 @@
|
|||
<script>
|
||||
var _hmt = _hmt || [];
|
||||
(function() {var hm = document.createElement('script');
|
||||
hm.src = 'https://hm.baidu.com/hm.js?<%= theme.analytics.baidu_site_id %>';
|
||||
var s = document.getElementsByTagName('script')[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
})();
|
||||
</script>
|
|
@ -0,0 +1,3 @@
|
|||
<div hidden>
|
||||
<script src="//s95.cnzz.com/z_stat.php?id=<%= theme.analytics.cnzz_site_id %>&web_id=<%= theme.analytics.cnzz_site_id %>" language="JavaScript"></script>
|
||||
</div>
|
|
@ -0,0 +1,7 @@
|
|||
<!-- Google Analytics -->
|
||||
<script>
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', '<%= theme.analytics.google_site_id %>', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script>
|
||||
<script async src="https://www.google-analytics.com/analytics.js"></script>
|
|
@ -0,0 +1,8 @@
|
|||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=<%= theme.analytics.gtags_site_id %>"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
gtag('config', '<%= theme.analytics.gtags_site_id %>');
|
||||
</script>
|
|
@ -0,0 +1,12 @@
|
|||
<script>
|
||||
var _mtac = {};
|
||||
(function() {
|
||||
var mta = document.createElement("script");
|
||||
mta.src = "https://pingjs.qq.com/h5/stats.js?v2.0.4";
|
||||
mta.setAttribute("name", "MTAH5");
|
||||
mta.setAttribute("sid", "theme.analytics.tencent_mta_id");
|
||||
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(mta, s);
|
||||
})();
|
||||
</script>
|
|
@ -0,0 +1,8 @@
|
|||
<script>
|
||||
(function() {
|
||||
var hm = document.createElement("script");
|
||||
hm.src = "//tajs.qq.com/stats?sId=<%= theme.analytics.tencent_site_id %>";
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
})();
|
||||
</script>
|
|
@ -0,0 +1,22 @@
|
|||
<% if(theme.busuanzi.site_uv.enable) { %>
|
||||
<!-- Busuanzi User Views -->
|
||||
<span id="busuanzi_container_site_uv" hidden>
|
||||
<span><%- theme.busuanzi.site_uv.before %></span>
|
||||
<span id="busuanzi_value_site_uv"></span>
|
||||
<span><%- theme.busuanzi.site_uv.after %></span>
|
||||
<% if(theme.busuanzi.site_uv.divider) { %>
|
||||
<span><%- theme.busuanzi.site_uv.divider %></span>
|
||||
<% } %>
|
||||
</span>
|
||||
<% } %>
|
||||
<% if(theme.busuanzi.site_pv.enable) { %>
|
||||
<!-- Busuanzi Post Views -->
|
||||
<span id="busuanzi_container_site_pv" hidden>
|
||||
<span><%- theme.busuanzi.site_pv.before %></span>
|
||||
<span id="busuanzi_value_site_pv"></span>
|
||||
<span><%- theme.busuanzi.site_pv.after %></span>
|
||||
<% if(theme.busuanzi.site_pv.divider) { %>
|
||||
<span><%- theme.busuanzi.site_pv.divider %></span>
|
||||
<% } %>
|
||||
</span>
|
||||
<% } %>
|
|
@ -0,0 +1,43 @@
|
|||
<% if (theme.vendors.busuanzi) { %>
|
||||
<script src="<%= theme.vendors.busuanzi %>" async></script>
|
||||
<% } else { %>
|
||||
<script src="https://cdn.jsdelivr.net/npm/busuanzi@2.3.0/bsz.pure.mini.js" async></script>
|
||||
<% } %>
|
||||
|
||||
<!-- Offset -->
|
||||
<% if (theme.busuanzi.site_uv.offset || theme.busuanzi.site_pv.offset || page.busuanzi_offset) { %>
|
||||
<script>
|
||||
var int = setInterval(fixCount, 50);
|
||||
function fixCount() {
|
||||
<% if (theme.busuanzi.site_uv.offset) { %>
|
||||
var $$bsz_site_container_uv = document.getElementById('busuanzi_container_site_uv');
|
||||
var $$bsz_site_value_uv = document.getElementById('busuanzi_value_site_uv');
|
||||
var busuanziSiteUVOffset = parseInt('<%= theme.busuanzi.site_uv.offset %>');
|
||||
if ($$bsz_site_container_uv.ownerDocument.defaultView.getComputedStyle($$bsz_site_container_uv, null).display === 'inline') {
|
||||
clearInterval(int);
|
||||
$$bsz_site_value_uv.innerHTML = parseInt($$bsz_site_value_uv.innerHTML) + busuanziSiteUVOffset;
|
||||
}
|
||||
<% } %>
|
||||
|
||||
<% if (theme.busuanzi.site_pv.offset) { %>
|
||||
var $$bsz_site_container_pv = document.getElementById('busuanzi_container_site_pv');
|
||||
var $$bsz_site_value_pv = document.getElementById('busuanzi_value_site_pv');
|
||||
var busuanziSitePVOffset = parseInt('<%= theme.busuanzi.site_pv.offset %>');
|
||||
if ($$bsz_site_container_pv.ownerDocument.defaultView.getComputedStyle($$bsz_site_container_pv, null).display === 'inline') {
|
||||
clearInterval(int);
|
||||
$$bsz_site_value_pv.innerHTML = parseInt($$bsz_site_value_pv.innerHTML) + busuanziSitePVOffset;
|
||||
}
|
||||
<% } %>
|
||||
|
||||
<% if (page.busuanzi_offset) { %>
|
||||
var $$bsz_post_container_pv = document.getElementById('busuanzi_container_page_pv');
|
||||
var $$bsz_post_value_pv = document.getElementById('busuanzi_value_page_pv');
|
||||
var busuanziPostPVOffset = parseInt('<%= page.busuanzi_offset %>');
|
||||
if ($$bsz_post_container_pv.ownerDocument.defaultView.getComputedStyle($$bsz_post_container_pv, null).display === 'inline') {
|
||||
clearInterval(int);
|
||||
$$bsz_post_value_pv.innerHTML = parseInt($$bsz_post_value_pv.innerHTML) + busuanziPostPVOffset;
|
||||
}
|
||||
<% } %>
|
||||
}
|
||||
</script>
|
||||
<% } %>
|
|
@ -0,0 +1,7 @@
|
|||
<!-- Busuanzi Post Views -->
|
||||
<span id="busuanzi_container_page_pv" hidden>
|
||||
<span class="suka-devide-dot"></span>
|
||||
<span><%- theme.busuanzi.post_pv.before %></span>
|
||||
<span id="busuanzi_value_page_pv"></span>
|
||||
<span><%- theme.busuanzi.post_pv.after %></span>
|
||||
</span>
|
|
@ -0,0 +1,5 @@
|
|||
<% if (theme.vendors.busuanzi) { %>
|
||||
<link rel="preload" href="<%= theme.vendors.busuanzi %>" as="script">
|
||||
<% } else { %>
|
||||
<link rel="preload" href="https://cdn.jsdelivr.net/npm/busuanzi@2.3.0/bsz.pure.mini.js" as="script">
|
||||
<% } %>
|
|
@ -0,0 +1,4 @@
|
|||
<!-- 畅言公共 js 代码 start -->
|
||||
<script id="cy_cmt_num" src="https://changyan.sohu.com/upload/plugins/plugins.list.count.js?clientId=<%=theme.comment.changyan.appid%>">
|
||||
</script>
|
||||
<!-- 畅言公共 js 代码 end -->
|
|
@ -0,0 +1,10 @@
|
|||
<!--PC和WAP自适应版-->
|
||||
<div id="SOHUCS" sid="<% if(theme.comment.changyan.thread_key_type == "id"){ %><%= page.id %><% } else { %><%= page.path %><% } %>"></div>
|
||||
<script>
|
||||
(function(){
|
||||
var appid = '<%= theme.comment.changyan.appid %>';
|
||||
var conf = '<%= theme.comment.changyan.conf %>';
|
||||
var width = window.innerWidth || document.documentElement.clientWidth;
|
||||
if (width < 960) {
|
||||
window.document.write('<script id="changyan_mobile_js" charset="utf-8" src="https://changyan.sohu.com/upload/mobile/wap-js/changyan_mobile.js?client_id=' + appid + '&conf=' + conf + '"><\/script>'); } else { var loadJs=function(d,a){var c=document.getElementsByTagName("head")[0]||document.head||document.documentElement;var b=document.createElement("script");b.setAttribute("type","text/javascript");b.setAttribute("charset","UTF-8");b.setAttribute("src",d);if(typeof a==="function"){if(window.attachEvent){b.onreadystatechange=function(){var e=b.readyState;if(e==="loaded"||e==="complete"){b.onreadystatechange=null;a()}}}else{b.onload=a}}c.appendChild(b)};loadJs("https://changyan.sohu.com/upload/changyan.js",function(){window.changyan.api.config({appid:appid,conf:conf})}); } })();
|
||||
</script>
|
|
@ -0,0 +1 @@
|
|||
<script id="dsq-count-scr" src="https://<%= theme.comment.disqus.shortname %>.disqus.com/count.js" async></script>
|
|
@ -0,0 +1,16 @@
|
|||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function () {
|
||||
this.page.url = '<%= page.permalink %>'; // Replace PAGE_URL with your page's canonical URL variable
|
||||
this.page.identifier = '<%= page.permalink %>'; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
|
||||
};
|
||||
</script>
|
||||
<script id="disqus-thread-script">
|
||||
(function() { // DON'T EDIT BELOW THIS LINE
|
||||
var d = document;
|
||||
var s = d.createElement('script');
|
||||
s.src = '//<%= theme.comment.disqus.shortname %>.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', + new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
|
@ -0,0 +1,45 @@
|
|||
<div id="disqus_thread"></div>
|
||||
|
||||
<div class="btn_click_load">
|
||||
<button id="disqus_click_btn" class="btn"><%= __('post.comment.load_disqus_button') %></button>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var disqus_config = function () {
|
||||
this.page.url = '<%= page.permalink %>'; // Replace PAGE_URL with your page's canonical URL variable
|
||||
this.page.identifier = '<%= page.permalink %>'; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
|
||||
};
|
||||
</script>
|
||||
|
||||
<script id="disqus-lazy-load-script">
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', 'https://disqus.com/next/config.json', true);
|
||||
xhr.timeout = 4000;
|
||||
xhr.send();
|
||||
xhr.onload = function() {
|
||||
if(this.status == 200||this.status == 304){
|
||||
var d = document;
|
||||
var s = d.createElement('script');
|
||||
s.src = '//<%= theme.comment.disqus.shortname %>.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', + new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
document.getElementById('disqus_click_btn').setAttribute("style", "display:none")
|
||||
}
|
||||
};
|
||||
xhr.ontimeout = function(e) {
|
||||
document.getElementById('disqus_click_btn').setAttribute("style", "display:block");
|
||||
};
|
||||
xhr.onerror = function(e) {
|
||||
document.getElementById('disqus_click_btn').setAttribute("style", "display:block");
|
||||
};
|
||||
document.getElementById('disqus_click_btn').onclick=function() { //click to load comments
|
||||
(function() { // DON'T EDIT BELOW THIS LINE
|
||||
var d = document;
|
||||
var s = d.createElement('script');
|
||||
s.src = '//<%= theme.comment.disqus.shortname %>.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', + new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
document.getElementById('disqus_click_btn').setAttribute("style", "display:none")
|
||||
};
|
||||
</script>
|
|
@ -0,0 +1 @@
|
|||
<!-- No need for DisqusJS -->
|
|
@ -0,0 +1 @@
|
|||
<%- css_async(url_for('https://cdn.jsdelivr.net/npm/disqusjs@1.2.5/dist/disqusjs.css')) %>
|
|
@ -0,0 +1,30 @@
|
|||
<div id="disqus_thread"></div>
|
||||
|
||||
<script id="js-disqusjs" src="https://cdn.jsdelivr.net/npm/disqusjs@1.2.5/dist/disqus.js" async></script>
|
||||
<script>
|
||||
document.getElementById('js-disqusjs').addEventListener('load', function () {
|
||||
function loadDisqusJS() {
|
||||
new DisqusJS({
|
||||
shortname: '<%= theme.comment.disqusjs.shortname %>',
|
||||
<% if (theme.comment.disqusjs.siteName) { %>
|
||||
siteName: '<%= theme.comment.disqusjs.siteName %>',
|
||||
<% } %>
|
||||
identifier: '<%= page.permalink %>',
|
||||
url: '<%= page.permalink %>',
|
||||
api: '<%= theme.comment.disqusjs.api %>',
|
||||
apikey: '<%= theme.comment.disqusjs.apikey %>',
|
||||
<% if (theme.comment.disqusjs.admin) { %>
|
||||
admin: '<%= theme.comment.disqusjs.admin %>',
|
||||
<% } %>
|
||||
<% if (theme.comment.disqusjs.adminLabel) { %>
|
||||
adminLabel: '<%= theme.comment.disqusjs.adminLabel %>'
|
||||
<% } %>
|
||||
})
|
||||
}
|
||||
if (document.readyState === 'complete') {
|
||||
loadDisqusJS();
|
||||
} else {
|
||||
window.addEventListener('load', loadDisqusJS);
|
||||
}
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1 @@
|
|||
<!-- Nothing. Include common head right after open bodu tag -->
|
|
@ -0,0 +1,16 @@
|
|||
<!-- This should be right after open body tag -->
|
||||
<div id="fb-root"></div>
|
||||
<script>(function(d, s, id) {
|
||||
var js, fjs = d.getElementsByTagName(s)[0];
|
||||
if (d.getElementById(id)) return;
|
||||
js = d.createElement(s); js.id = id;
|
||||
|
||||
<% if(config.language) { %>
|
||||
var js_lang = "<%- config.language %>";
|
||||
<% } else { %>
|
||||
var js_lang = "en_US";
|
||||
<% } %>
|
||||
|
||||
js.src = 'https://connect.facebook.net/' + js_lang + '/sdk.js#xfbml=1&version=v3.1';
|
||||
fjs.parentNode.insertBefore(js, fjs);
|
||||
}(document, 'script', 'facebook-jssdk'));</script>
|
|
@ -0,0 +1 @@
|
|||
<span class="fb-comments-count" data-href=""></span>
|
|
@ -0,0 +1,6 @@
|
|||
<div class="fb-comments"
|
||||
data-href="<%= url_for(page.path) %>"
|
||||
data-numposts="<%= theme.comment.facebook.numposts %>"
|
||||
data-colorscheme="<%= theme.comment.facebook.colorschme %>"
|
||||
data-order-by="<%= theme.comment.facebook.orderby %>">
|
||||
</div>
|
|
@ -0,0 +1 @@
|
|||
<!-- GitTalk -->
|
|
@ -0,0 +1,20 @@
|
|||
<!-- Gitalk Container -->
|
||||
<div id="gitalk-container"></div>
|
||||
|
||||
<%- css_async('https://cdn.jsdelivr.net/npm/gitalk@1.3.3/dist/gitalk.min.css') %>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/gitalk@1.3.3/dist/gitalk.min.js"></script>
|
||||
|
||||
<script>
|
||||
var gitalk = new Gitalk({
|
||||
clientID: '<%= theme.comment.gitalk.client_id %>',
|
||||
clientSecret: '<%= theme.comment.gitalk.client_secret %>',
|
||||
repo: '<%= theme.comment.gitalk.repo %>',
|
||||
owner: '<%= theme.comment.gitalk.owner %>',
|
||||
admin: ['<%= theme.comment.gitalk.owner %>'],
|
||||
// facebook-like distraction free mode
|
||||
distractionFreeMode: false,
|
||||
id: window.location.pathname
|
||||
})
|
||||
gitalk.render('gitalk-container')
|
||||
</script>
|
|
@ -0,0 +1 @@
|
|||
<!-- Gitment -->
|
|
@ -0,0 +1,23 @@
|
|||
<div id="gitment-comment">
|
||||
<%- partial('_widget/comment/' + theme.comment.use + '/main') %>
|
||||
</div>
|
||||
<style>
|
||||
#gitment-comment{
|
||||
background-color: #eee;
|
||||
padding: 2pc;
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="https://imsun.github.io/gitment/style/default.css">
|
||||
<script src="https://imsun.github.io/gitment/dist/gitment.browser.js"></script>
|
||||
<script>
|
||||
var gitment = new Gitment({
|
||||
id: window.location.pathname,
|
||||
owner: '<%= theme.comment.gitment.owner %>',
|
||||
repo: '<%= theme.comment.gitment.repo %>',
|
||||
oauth: {
|
||||
client_id: '<%= theme.comment.gitment.client_id %>',
|
||||
client_secret: '<%= theme.comment.gitment.client_secret %>',
|
||||
},
|
||||
})
|
||||
gitment.render('container')
|
||||
</script>
|
|
@ -0,0 +1,12 @@
|
|||
<div id="lv-container" data-id="city" data-uid="<%= theme.comment.livere.data_uid %>">
|
||||
<script id="livere-comment-js">
|
||||
(function(d, s) {
|
||||
var j, e = d.getElementsByTagName(s)[0];
|
||||
if (typeof LivereTower === 'function') { return; }
|
||||
j = d.createElement(s);
|
||||
j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
|
||||
j.async = true;
|
||||
e.parentNode.insertBefore(j, e);
|
||||
})(document, 'script');
|
||||
</script>
|
||||
</div>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue