Browse Source

init

master
186526 11 months ago
commit
ddecaf82dd
Signed by: 186526 GPG Key ID: C7EB1E6B8CC5E51D
406 changed files with 28378 additions and 0 deletions
  1. 8
      .gitignore
  2. 0
      _config.landscape.yml
  3. 125
      _config.yml
  4. 27
      package.json
  5. 4
      scaffolds/draft.md
  6. 4
      scaffolds/page.md
  7. 5
      scaffolds/post.md
  8. 414
      source/_posts/debootstrap.md
  9. 39
      source/_posts/hello-world.md
  10. 97
      source/_posts/onemanager-php-cache.md
  11. 0
      themes/.gitkeep
  12. 6
      themes/suka/.eslintrc.json
  13. 90
      themes/suka/.github/ISSUE_TEMPLATE.md
  14. 86
      themes/suka/.github/ISSUE_TEMPLATE/bug_report.md
  15. 15
      themes/suka/.github/ISSUE_TEMPLATE/feature_request.md
  16. 45
      themes/suka/.github/PULL_REQUEST_TEMPLATE.md
  17. 11
      themes/suka/.gitignore
  18. 31
      themes/suka/.travis.yml
  19. 150
      themes/suka/CONTRIBUTING.md
  20. 154
      themes/suka/CONTRIBUTING.zh-cn.md
  21. 674
      themes/suka/LICENSE
  22. 129
      themes/suka/README.md
  23. 426
      themes/suka/_config.yml
  24. 40
      themes/suka/contributing.json
  25. 48
      themes/suka/gulpfile.js
  26. 85
      themes/suka/includes/filter/prism.js
  27. 82
      themes/suka/includes/generator/search.js
  28. 42
      themes/suka/includes/helpers/favicon.js
  29. 72
      themes/suka/includes/helpers/page.js
  30. 25
      themes/suka/includes/helpers/qrcode.js
  31. 135
      themes/suka/includes/helpers/tags.js
  32. 26
      themes/suka/includes/tasks/check_deps.js
  33. 11
      themes/suka/includes/tasks/check_hexo.js
  34. 11
      themes/suka/includes/tasks/welcome.js
  35. 1
      themes/suka/languages/default.yml
  36. 36
      themes/suka/languages/en.yml
  37. 36
      themes/suka/languages/zh-CN.yml
  38. 67
      themes/suka/layout/_pages/archive.ejs
  39. 17
      themes/suka/layout/_pages/category.ejs
  40. 26
      themes/suka/layout/_pages/links.ejs
  41. 40
      themes/suka/layout/_pages/post.ejs
  42. 28
      themes/suka/layout/_pages/search.ejs
  43. 15
      themes/suka/layout/_pages/tag.ejs
  44. 15
      themes/suka/layout/_pages/tagcloud.ejs
  45. 42
      themes/suka/layout/_partial/footer.ejs
  46. 18
      themes/suka/layout/_partial/head/analytics.ejs
  47. 83
      themes/suka/layout/_partial/head/config_style.ejs
  48. 50
      themes/suka/layout/_partial/head/dns-prefetch.ejs
  49. 128
      themes/suka/layout/_partial/head/index.ejs
  50. 12
      themes/suka/layout/_partial/head/lsversion.ejs
  51. 9
      themes/suka/layout/_partial/head/preload.ejs
  52. 6
      themes/suka/layout/_partial/head/site-verification.ejs
  53. 100
      themes/suka/layout/_partial/head/structured-data.ejs
  54. 16
      themes/suka/layout/_partial/header.ejs
  55. 22
      themes/suka/layout/_partial/index-nav.ejs
  56. 62
      themes/suka/layout/_partial/menu/index-share.ejs
  57. 61
      themes/suka/layout/_partial/menu/post-share.ejs
  58. 22
      themes/suka/layout/_partial/pagination.ejs
  59. 34
      themes/suka/layout/_partial/post-entry-content.ejs
  60. 18
      themes/suka/layout/_partial/post-entry.ejs
  61. 58
      themes/suka/layout/_partial/post/footer-info.ejs
  62. 23
      themes/suka/layout/_partial/post/footer-pagination.ejs
  63. 33
      themes/suka/layout/_partial/post/header-info.ejs
  64. 84
      themes/suka/layout/_partial/source/footer.ejs
  65. 49
      themes/suka/layout/_partial/source/head.ejs
  66. 8
      themes/suka/layout/_plugin/analytics/baidu.ejs
  67. 3
      themes/suka/layout/_plugin/analytics/cnzz.ejs
  68. 7
      themes/suka/layout/_plugin/analytics/google.ejs
  69. 8
      themes/suka/layout/_plugin/analytics/gtags.ejs
  70. 12
      themes/suka/layout/_plugin/analytics/tencent-mta.ejs
  71. 8
      themes/suka/layout/_plugin/analytics/tencent.ejs
  72. 22
      themes/suka/layout/_plugin/busuanzi/footer_counter.ejs
  73. 43
      themes/suka/layout/_plugin/busuanzi/import_js.ejs
  74. 7
      themes/suka/layout/_plugin/busuanzi/post-counter.ejs
  75. 5
      themes/suka/layout/_plugin/busuanzi/preload.ejs
  76. 4
      themes/suka/layout/_plugin/comment/changyan/common.ejs
  77. 10
      themes/suka/layout/_plugin/comment/changyan/main.ejs
  78. 1
      themes/suka/layout/_plugin/comment/disqus/common.ejs
  79. 16
      themes/suka/layout/_plugin/comment/disqus/main.ejs
  80. 0
      themes/suka/layout/_plugin/comment/disqus_click/common.ejs
  81. 45
      themes/suka/layout/_plugin/comment/disqus_click/main.ejs
  82. 1
      themes/suka/layout/_plugin/comment/disqusjs/common.ejs
  83. 1
      themes/suka/layout/_plugin/comment/disqusjs/common_head.ejs
  84. 30
      themes/suka/layout/_plugin/comment/disqusjs/main.ejs
  85. 1
      themes/suka/layout/_plugin/comment/facebook/common.ejs
  86. 16
      themes/suka/layout/_plugin/comment/facebook/common_head.ejs
  87. 1
      themes/suka/layout/_plugin/comment/facebook/counter.ejs
  88. 6
      themes/suka/layout/_plugin/comment/facebook/main.ejs
  89. 1
      themes/suka/layout/_plugin/comment/gitalk/common.ejs
  90. 20
      themes/suka/layout/_plugin/comment/gitalk/main.ejs
  91. 1
      themes/suka/layout/_plugin/comment/gitment/common.ejs
  92. 23
      themes/suka/layout/_plugin/comment/gitment/main.ejs
  93. 0
      themes/suka/layout/_plugin/comment/livere/common.ejs
  94. 12
      themes/suka/layout/_plugin/comment/livere/main.ejs
  95. 0
      themes/suka/layout/_plugin/comment/valine/common.ejs
  96. 32
      themes/suka/layout/_plugin/comment/valine/main.ejs
  97. 2
      themes/suka/layout/_plugin/comment/wildfire/common.ejs
  98. 25
      themes/suka/layout/_plugin/comment/wildfire/main.ejs
  99. 13
      themes/suka/layout/_plugin/highlight/hanabi/import_js.ejs
  100. 13
      themes/suka/layout/_plugin/highlight/hanabi/preload.ejs

8
.gitignore

@ -0,0 +1,8 @@
.DS_Store
Thumbs.db
db.json
*.log
node_modules/
public/
.deploy*/
.vercel

0
_config.landscape.yml

125
_config.yml

@ -0,0 +1,125 @@
# Hexo Configuration
## Docs: https://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/
# Site
title: 186526's Blog
subtitle: "Just a blog"
description: ""
keywords: "Blog,Frontend,node.js"
author: "186526"
language: zh-CN
timezone: "Asia/Shanghai"
# URL
## If your site is put in a subdirectory, set url as 'http://example.com/child' and root as '/child/'
url: https://blog.186526.xyz
root: /
permalink: post/:title/
permalink_defaults:
pretty_urls:
trailing_index: true # Set to false to remove trailing 'index.html' from permalinks
trailing_html: true # Set to false to remove trailing '.html' from permalinks
# Directory
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:
# Writing
new_post_name: :title.md # File name of new posts
default_layout: post
titlecase: false # Transform title into titlecase
external_link:
enable: true # Open external links in new tab
field: site # Apply to the whole site
exclude: ""
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
highlight:
enable: false
line_number: false
auto_detect: false
tab_replace: false
wrap: false
hljs: false
prismjs:
enable: false
preprocess: true
line_number: true
tab_replace: ""
# Home page setting
# path: Root path for your blogs index page. (default = '')
# per_page: Posts displayed per page. (0 = disable pagination)
# order_by: Posts order. (Order by date descending by default)
index_generator:
path: ""
per_page: 10
order_by: -date
# Category & Tag
default_category: uncategorized
category_map:
tag_map:
# Metadata elements
## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
meta_generator: true
# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format as defined in
## http://momentjs.com/docs/#/displaying/format/
date_format: YYYY-MM-DD
time_format: HH:mm:ss
## updated_option supports 'mtime', 'date', 'empty'
updated_option: "mtime"
# Pagination
## Set per_page to 0 to disable pagination
per_page: 10
pagination_dir: page
# Include / Exclude file(s)
## include:/exclude: options only apply to the 'source/' folder
include:
exclude:
ignore:
# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: suka
# Deployment
## Docs: https://hexo.io/docs/one-command-deployment
deploy:
type: ""
suka_theme:
search:
enable: true
path: search.json
field: post # Page | Post | All. Default post
prism:
enable: true
line_number: true
theme: default
feed:
type: atom
path: atom.xml
limit: 20
hub:
content:
content_limit:
content_limit_delim: " "

27
package.json

@ -0,0 +1,27 @@
{
"name": "hexo-site",
"version": "0.0.0",
"private": true,
"scripts": {
"build": "yarn --cwd ./themes/suka --production;hexo generate",
"clean": "hexo clean",
"deploy": "hexo deploy",
"server": "hexo server"
},
"hexo": {
"version": "5.3.0"
},
"dependencies": {
"hexo": "^5.0.0",
"hexo-generator-archive": "^1.0.0",
"hexo-generator-category": "^1.0.0",
"hexo-generator-feed": "^3.0.0",
"hexo-generator-index": "^2.0.0",
"hexo-generator-tag": "^1.0.0",
"hexo-renderer-ejs": "^1.0.0",
"hexo-renderer-marked": "^3.0.0",
"hexo-renderer-stylus": "^2.0.0",
"hexo-server": "^2.0.0",
"hexo-theme-landscape": "^0.0.3"
}
}

4
scaffolds/draft.md

@ -0,0 +1,4 @@
---
title: {{ title }}
tags:
---

4
scaffolds/page.md

@ -0,0 +1,4 @@
---
title: {{ title }}
date: {{ date }}
---

5
scaffolds/post.md

@ -0,0 +1,5 @@
---
title: {{ title }}
date: {{ date }}
tags:
---

414
source/_posts/debootstrap.md

@ -0,0 +1,414 @@
---
title: 如何使用debootstrap构建一个最小化的Ubuntu
date: 2020-12-19 22:39:33
tags:
- Ubuntu
- Linux
- Debootstrap
---
> debootstrap是debian及其附属分支下的一个工具,用来构建一套基本的系统(根文件系统)。生成的目录符合Linux文件系统标准(FHS),即包含了/boot、/etc、/bin、/usr等等目录,但它比发行版本的Linux体积小很多
<!--more-->
## 0.0 debootstrap介绍
### 0.1 啥是debootstrap
debootstrap是debian及其附属分支下的一个工具,用来构建一套基本的系统(根文件系统)。生成的目录符合Linux文件系统标准(FHS),即包含了/boot、/etc、/bin、/usr等等目录,但它比发行版本的Linux体积小很多
~~似曾相识燕归来~~
### 0.2 debootstrap有啥用
debootstrap可以用来快速 简便的构建一个最小化的debian及其附属分支的最小化rootfs
我们可以用其构建一个最小化的rootfs (主要是这个相较于 Ubuntu Server版本还是小得多)
### 0.3 如何使用debootstrap
其实 使用debootstrap很简单 他已经被放入到默认源了 我们只需要apt install即可
``` bash
sudo apt install debootstrap
```
如何使用呢 ~~自己看~~ 详情wiki
```bash
sudo debootstrap [--arch 架构(可选项)][发行版本] [目录] [映像源(可选项)]
```
## 1.0 开始动手构建自己的Ubuntu
我们这里使用Ubuntu Server 20.04作为Live CD来进行构建
### 1.1 进入Shell并安装debootstrap
![Ubuntu ISO shell](https://cdn.jsdelivr.net/gh/186526/[email protected]/img/Ubuntu%20ISO.png)
1. 点击Help
2. Enter Shell
3. (可选)修改sources.list
4. update sourcelist并安装debootstrap
``` bash
$ sudo apt update && apt install debootstrap
Ign:1 cdrom://Ubuntu-Server 20.04 LTS _Focal Fossa_ - Release amd64 (20200423) focal InRelease
Hit:2 cdrom://Ubuntu-Server 20.04 LTS _Focal Fossa_ - Release amd64 (20200423) focal Release
Get:4 http://mirrors.aliyun.com/ubuntu focal InRelease [265 kB]
Get:5 http://mirrors.aliyun.com/ubuntu focal-updates InRelease [107 kB]
Get:6 http://mirrors.aliyun.com/ubuntu focal-backports InRelease [98.3 kB]
Get:7 http://mirrors.aliyun.com/ubuntu focal-security InRelease [107 kB]
Get:8 http://mirrors.aliyun.com/ubuntu focal/main amd64 Packages [970 kB]
Get:9 http://mirrors.aliyun.com/ubuntu focal/main Translation-en [506 kB]
Get:10 http://mirrors.aliyun.com/ubuntu focal/main amd64 c-n-f Metadata [29.5 kB]
Get:11 http://mirrors.aliyun.com/ubuntu focal/restricted amd64 Packages [22.0 kB]
Get:12 http://mirrors.aliyun.com/ubuntu focal/restricted Translation-en [6212 B]
Get:13 http://mirrors.aliyun.com/ubuntu focal/restricted amd64 c-n-f Metadata [392 B]
Get:14 http://mirrors.aliyun.com/ubuntu focal/universe amd64 Packages [8628 kB]
Get:15 http://mirrors.aliyun.com/ubuntu focal/universe Translation-en [5124 kB]
Get:16 http://mirrors.aliyun.com/ubuntu focal/universe amd64 c-n-f Metadata [265 kB]
Get:17 http://mirrors.aliyun.com/ubuntu focal/multiverse amd64 Packages [144 kB]
Get:18 http://mirrors.aliyun.com/ubuntu focal/multiverse Translation-en [104 kB]
Get:19 http://mirrors.aliyun.com/ubuntu focal/multiverse amd64 c-n-f Metadata [9136 B]
Get:20 http://mirrors.aliyun.com/ubuntu focal-updates/main amd64 Packages [197 kB]
Get:21 http://mirrors.aliyun.com/ubuntu focal-updates/main Translation-en [77.7 kB]
Get:22 http://mirrors.aliyun.com/ubuntu focal-updates/main amd64 c-n-f Metadata [5676 B]
Get:23 http://mirrors.aliyun.com/ubuntu focal-updates/restricted amd64 Packages [11.0 kB]
Get:24 http://mirrors.aliyun.com/ubuntu focal-updates/restricted Translation-en [3000 B]
Get:25 http://mirrors.aliyun.com/ubuntu focal-updates/restricted amd64 c-n-f Metadata [116 B]
Get:26 http://mirrors.aliyun.com/ubuntu focal-updates/universe amd64 Packages [110 kB]
Get:27 http://mirrors.aliyun.com/ubuntu focal-updates/universe Translation-en [51.9 kB]
Get:28 http://mirrors.aliyun.com/ubuntu focal-updates/universe amd64 c-n-f Metadata [4092 B]
Get:29 http://mirrors.aliyun.com/ubuntu focal-updates/multiverse amd64 Packages [1172 B]
Get:30 http://mirrors.aliyun.com/ubuntu focal-updates/multiverse Translation-en [540 B]
Get:31 http://mirrors.aliyun.com/ubuntu focal-updates/multiverse amd64 c-n-f Metadata [116 B]
Get:32 http://mirrors.aliyun.com/ubuntu focal-backports/main amd64 c-n-f Metadata [112 B]
Get:33 http://mirrors.aliyun.com/ubuntu focal-backports/restricted amd64 c-n-f Metadata [116 B]
Get:34 http://mirrors.aliyun.com/ubuntu focal-backports/universe amd64 Packages [2784 B]
Get:35 http://mirrors.aliyun.com/ubuntu focal-backports/universe Translation-en [1272 B]
Get:36 http://mirrors.aliyun.com/ubuntu focal-backports/universe amd64 c-n-f Metadata [192 B]
Get:37 http://mirrors.aliyun.com/ubuntu focal-backports/multiverse amd64 c-n-f Metadata [116 B]
Get:38 http://mirrors.aliyun.com/ubuntu focal-security/main amd64 Packages [106 kB]
Get:46 http://mirrors.aliyun.com/ubuntu focal-security/universe amd64 c-n-f Metadata [1612 B]
Get:47 http://mirrors.aliyun.com/ubuntu focal-security/multiverse amd64 Packages [1172 B]
Get:48 http://mirrors.aliyun.com/ubuntu focal-security/multiverse Translation-en [540 B]
Get:49 http://mirrors.aliyun.com/ubuntu focal-security/multiverse amd64 c-n-f Metadata [116 B]
Fetched 17.1 MB in 6s (3096 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
65 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
arch-test squid-deb-proxy-client
The following NEW packages will be installed:
debootstrap
0 upgraded, 1 newly installed, 0 to remove and 65 not upgraded.
Need to get 39.4 kB of archives.
After this operation, 299 kB of additional disk space will be used.
Get:1 http://mirrors.aliyun.com/ubuntu focal-updates/main amd64 debootstrap all 1.0.118ubuntu1.1 [39.4 kB]
Fetched 39.4 kB in 0s (221 kB/s)
Selecting previously unselected package debootstrap.
(Reading database ... 33860 files and directories currently installed.)
Preparing to unpack .../debootstrap_1.0.118ubuntu1.1_all.deb ...
Unpacking debootstrap (1.0.118ubuntu1.1) ...
Setting up debootstrap (1.0.118ubuntu1.1) ...
Processing triggers for man-db (2.9.1-1) ...
$ debootstrap
I: usage: [OPTION]... <suite> <target> [<mirror> [<script>]]
I: Try `debootstrap --help' for more information.
E: You must specify a suite and a target.
```
### 1.2 给硬盘分区
这步没啥好说的 用cfdisk进行分区 使用mkfs.ext4来格式化硬盘(请记住如何分区的!!!!(后面编写fstab会涉及到))
| /dev路径 | 挂载位置 | 分区模式 | 作用 |
| --------- | -------- | -------- | ----------- |
| /dev/sda1 | /boot | fat32 | 负责efi引导 |
| /dev/sda2 | swap | swap | 内存交换 |
| /dev/sda3 | / | ext4 | 根目录 |
```bash
$ mkfs.ext4 /dev/sda3
mke2fs 1.45.5 (07-Jan-2020)
Creating filesystem with 9311995 4k blocks and 2330160 inodes
Filesystem UUID: fbe7f7fe-1997-4ab3-929f-52aa73aa72eb
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624
Allocating group tables: done
Writing inode tables: done
Creating journal (65536 blocks): done
Writing superblocks and filesystem accounting information: done
$ mkswap /dev/sda2
Setting up swapspace version 1, size = 4 GiB (4294963200 bytes)s
no label, UUID=9fe83e8e-cd78-4a25-8a1e-ab305181c46d
$ swapon /dev/sda2
$ mkfs.vfat /dev/sda1
mkfs.fat 4.1 (2017-01-24)
```
### 1.3 挂载分区并释放rootfs
这里构建选择最新的Focal X86_64位
```bash
$ mkdir /target
$ mount /dev/sda3 /target
$ debootstrap focal /target http://mirrors.aliyun.com/ubuntu
I: Retrieving InRelease
I: Checking Release signature
I: Valid Release signature (key id F6ECB3762474EDA9D21B7022871920D1991BC93C)
I: Retrieving Packages
I: Validating Packages
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...
I: Checking component main on http://mirrors.aliyun.com/ubuntu...
I: Retrieving adduser 3.118ubuntu2
I: Validating adduser 3.118ubuntu2
I: Retrieving apt 2.0.2
I: Validating apt 2.0.2
…………………………………………………………
I: Configuring console-setup...
I: Configuring kbd...
I: Configuring ubuntu-minimal...
I: Configuring libc-bin...
I: Configuring systemd...
I: Configuring ca-certificates...
I: Base system installed successfully. ##当你看到这句时 说明你的操作没有问题
```
### 1.4 chroot并进行基本设置
#### 1.4.1 修改软件源
默认rootfs中的软件源不完整 我们这里cp一下live cd的软件源
``` bash
cp /etc/apt/sources.list /target/etc/apt/sources.list;sed -i 3d /target/etc/apt/sources.list
```
``` bash
$ cat >> /target/etc/apt/sources.list << EOF
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted
# deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted
# deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://mirrors.aliyun.com/ubuntu/ focal universe
# deb-src http://mirrors.aliyun.com/ubuntu/ focal universe
deb http://mirrors.aliyun.com/ubuntu/ focal-updates universe
# deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://mirrors.aliyun.com/ubuntu/ focal multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ focal multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu focal partner
# deb-src http://archive.canonical.com/ubuntu focal partner
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted
# deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted
deb http://mirrors.aliyun.com/ubuntu/ focal-security universe
# deb-src http://mirrors.aliyun.com/ubuntu/ focal-security universe
deb http://mirrors.aliyun.com/ubuntu/ focal-security multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ focal-security multiverse
```
#### 1.4.2 编写fstab
这里推荐一下这篇文章 [linux之fstab文件详解 来自csdn richerg85](https://blog.csdn.net/richerg85/article/details/17917129)
fstab主要由这几部分组成
``` text
<file system> <dir> <type> <options> <dump> <pass>
(/dev下的位置)(挂载位置)(文件系统)(挂载参数)(dump 工具通过它决定何时作备份)(fsck 读取 <pass> 的数值来决定需要检查的文件系统的检查顺序。)
```
这里以我的fstab文件作为实例
```bash
$ cat >> /target/etc/fstab << EOF
tmpfs /tmp tmpfs nodev,nosuid 0 0
/dev/sda2 none swap defaults 0 0
/dev/sda3 / ext4 defaults,noatime 0 0
```
#### 1.4.3 chroot进入系统
先挂载efi分区
```bash
mkdir /target/boot/efi && \
mount /dev/sda1 /target/boot/efi
```
挂载proc等分区
```bash
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /target$i; done
```
挂载并安装grub和kernel(这里安装的是虚拟化内核)
```bash
$ sudo chroot /target
$ sudo passwd ##配置passwd
New password:
Retype new password:
passwd: password updated successfully
$ sudo apt install grub-efi-amd64 linux-virtual -y ##安装grub和kernel
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
efibootmgr gettext-base grub-common grub-efi-amd64-bin grub-efi-amd64-signed grub2-common libefiboot1 libefivar1
libfreetype6 libfuse2 libpng16-16 linux-headers-generic linux-headers-virtual os-prober sbsigntool secureboot-db
Suggested packages:
rvice.
Running in chroot, ignoring request: daemon-reload
Running in chroot, ignoring request: is-active
Running in chroot, ignoring request: start
Setting up libefiboot1:amd64 (37-2ubuntu2) ...
Setting up linux-virtual (5.4.0.26.32) ...
Setting up libfreetype6:amd64 (2.10.1-2) ...
Setting up efibootmgr (17-1) ...
Setting up grub-common (2.04-1ubuntu26) ...
Running in chroot, ignoring request: daemon-reload
Running in chroot, ignoring request: daemon-reload
Running in chroot, ignoring request: is-active
Running in chroot, ignoring request: restart
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
Running in chroot, ignoring request: daemon-reload
Running in chroot, ignoring request.
Running in chroot, ignoring request: daemon-reload
Running in chroot, ignoring request: is-active
Running in chroot, ignoring request: restart
Setting up os-prober (1.74ubuntu2) ...
Setting up grub-efi-amd64-bin (2.04-1ubuntu26) ...
Setting up grub2-common (2.04-1ubuntu26) ...
Setting up grub-efi-amd64 (2.04-1ubuntu26) ...
Setting up grub-efi-amd64-signed (1.142+2.04-1ubuntu26) ...
Processing triggers for systemd (245.4-4ubuntu3) ...
Running in chroot, ignoring request: daemon-reload
Processing triggers for libc-bin (2.31-0ubuntu9) ...
```
#### 1.4.4 安装grub2
```bash
$ grub-install /dev/sda
update-grub Installing for x86_64-efi platform.
Installation finished. No error reported.
$ update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.0-26-generic
Found initrd image: /boot/initrd.img-5.4.0-26-generic
Adding boot menu entry for UEFI Firmware Settings
done
```
#### 1.4.5 设置网络
Ubuntu 18.04及其上的Server版本默认使用systemd-networkd联网
先使用ip a获取设备
```bash
$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000 ## ens33就是网络设备
link/ether 00:0c:29:9d:a0:73 brd ff:ff:ff:ff:ff:ff
inet 192.168.57.140/24 brd 192.168.57.255 scope global dynamic ens33
valid_lft 5433596sec preferred_lft 5433596sec
inet6 fe80::20c:29ff:fe9d:a073/64 scope link
valid_lft forever preferred_lft forever
```
配置所有网卡DHCP联网
```bash
$ cat >> /etc/systemd/network/ens33.network << EOF
[Match]
Name=*
[Network]
DHCP=both
```
#### 1.4.6 重启
```bash
$ exit
exit
reboot
```
PS: 第一次开机会有一点点慢(就亿点点)
### 1.5 重启并配置网络
启动systemd-networkd
```bash
$ systemctl enable --now systemd-networkd
Created symlink /etc/systemd/system/dbus-org.freedesktop.network1.service → /lib/systemd/system/systemd-networkd.service.
Created symlink /etc/systemd/system/multi-user.target.wants/systemd-networkd.service → /lib/systemd/system/systemd-networkd.service.
Created symlink /etc/systemd/system/sockets.target.wants/systemd-networkd.socket → /lib/systemd/system/systemd-networkd.socket.
Created symlink /etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service → /lib/systemd/system/systemd-networkd-wait-online.service.
```
修改hostname并添加hosts
```bash
$ hostnamectl set-hostname vm-ubuntu-test
$ cat >> /etc/hosts << EOF
127.0.0.1 vm-ubuntu-test localhost
::1 vm-ubuntu-test localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
```
最后reboot生效
享受全新的ubuntu体验吧

39
source/_posts/hello-world.md

@ -0,0 +1,39 @@
---
title: Hello World
---
Welcome to [Hexo](https://hexo.io/)! This is your very first post. Check [documentation](https://hexo.io/docs/) for more info. If you get any problems when using Hexo, you can find the answer in [troubleshooting](https://hexo.io/docs/troubleshooting.html) or you can ask me on [GitHub](https://github.com/hexojs/hexo/issues).
<!--more-->
## Quick Start
### Create a new post
``` bash
$ hexo new "My New Post"
```
More info: [Writing](https://hexo.io/docs/writing.html)
### Run server
``` bash
$ hexo server
```
More info: [Server](https://hexo.io/docs/server.html)
### Generate static files
``` bash
$ hexo generate
```
More info: [Generating](https://hexo.io/docs/generating.html)
### Deploy to remote sites
``` bash
$ hexo deploy
```
More info: [Deployment](https://hexo.io/docs/one-command-deployment.html)

97
source/_posts/onemanager-php-cache.md

@ -0,0 +1,97 @@
---
title: Onemanager-php 缓存0->1
date: 2020-12-19 22:32:27
tags:
- Onemanager-php
- Cloudflare
- Worker
---
因为一些众所周知的原因 你需要将OneManager-php站点使用 `Cloudflare` 那么这篇文章貌似就有用了(
<!--more-->
## 目录
1. [可自定义域名](#VPS、网站空间、Heroku-绑卡及其他可自定义域名情况下)
2. [不可自定义](#Heroku-不绑定卡等不可自定义域名)
3. [检查缓存](#Check-Cache)
## VPS、网站空间、Heroku 绑卡及其他可自定义域名情况下
在这种情况下 只需要配置 Cloudflare 的页面规则即可
1. 第一条规则 配置到`<OM域名>/*`上:
- 缓存级别请使用缓存全部内容
- 浏览器缓存看心情设置
- 边缘缓存建议设置 8 小时(该项即为索引的 cf cdn 缓存时间)
- 若已经配置网站空间缓存规则可开缓存控制 否则不开启
- 可开启 Always Online 以及 Auto Minify
2. 第二条规则 配置到`<OM域名>/*?*`上:
- 浏览器缓存配置看心情设置
- 边缘缓存建议配置 8 小时
- 缓存级别请使用没有查询字符串
- 若已经配置网站空间缓存规则可开缓存控制 否则不开启
- 可开启 Always Online 以及 Auto Minify
3. 第三条缓存 配置到`<OM页面>/*nocache*`上:
- 缓存级别请选择绕过
- 其他同第二条
索引将会被缓存 管理后台以及文件路径中包含`nocache`的 url 将不会被缓存
请跳转至[查询缓存是否生效](#Check_Cache)
## Heroku 不绑定卡等不可自定义域名
我们需要使用`Cloudflare Worker`以及`Booster.js`
> [`Cloudflare Worker`](https://workers.dev)是一个`Serverless`函数 Platform 运行于`Cloudflare`边缘节点上
>
> [`Booster.js`](https://github.com/xiaoyang-liu-cs/booster.js/)是一个运行于`Cloudflare Worker`的反向代理项目
你需要打开[`Cloudflare Worker`](https://workers.dev) 注册 Worker 账户
在[此处](https://github.com/186526/Boomer.js/blob/main/index-min.js)复制代码 并部署(Star后上车)
请跳转至[查询缓存是否生效](#Check_Cache)
## Check_Cache
1. 方法一:
- 打开 CMD
- 输入 `curl -I <your domain>`
- 当出现类似一下情况 即表示配置成功
```text
C:\Users\186526>curl -I https://imagedl.186526.xyz
HTTP/1.1 200 OK
Date: Sun, 04 Oct 2020 06:14:48 GMT
Content-Type: text/html;charset=UTF-8
Connection: keep-alive
Set-Cookie: __cfduid=d785548bd40d709c98c06a349988227d71601792088; expires=Tue, 03-Nov-20 06:14:48 GMT; path=/; domain=.186526.xyz; HttpOnly; SameSite=Lax; Secure
Vary: Accept-Encoding
Cache-Control: max-age=86400
CF-Cache-Status: HIT //该项表示命中
Age: 54321
cf-request-id: 0593d8b2f80000d346c4af3200000001
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report?lkg-colo=12&lkg-time=1601792089"}],"group":"cf-nel","max_age":604800}
NEL: {"report_to":"cf-nel","max_age":604800}
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
X-Content-Type-Options: nosniff
Server: cloudflare
CF-RAY: 5dccc3cb2d69d346-LAX
alt-svc: h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400
```
2. 方法二:
- 打开 Chrome Devtool
- 选择 Network
- 点击第一项
- 若`Response Header`中`cf-cache-status`值为`HIT` 表明缓存成功
又水完一篇文章 溜了溜了

0
themes/.gitkeep

6
themes/suka/.eslintrc.json

@ -0,0 +1,6 @@
{
"extends": "airbnb-base",
"plugins": [
"import"
]
}

90
themes/suka/.github/ISSUE_TEMPLATE.md

@ -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)
### 相关源码或有用资源的入口
<!-- ----------- -->

86
themes/suka/.github/ISSUE_TEMPLATE/bug_report.md

@ -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)
### 相关源码或有用资源的入口
<!-- ----------- -->

15
themes/suka/.github/ISSUE_TEMPLATE/feature_request.md

@ -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)
### 相关源码或有用资源的入口

45
themes/suka/.github/PULL_REQUEST_TEMPLATE.md

@ -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

11
themes/suka/.gitignore

@ -0,0 +1,11 @@
.DS_Store
*.log
node_modules
.idea
.directory
package-lock.json

31
themes/suka/.travis.yml

@ -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

150
themes/suka/CONTRIBUTING.md

@ -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

154
themes/suka/CONTRIBUTING.zh-cn.md

@ -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

674
themes/suka/LICENSE

@ -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>.

129
themes/suka/README.md

@ -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-4.0+-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-10%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)