Skip to content

Commit 35ac882

Browse files
authored
Merge pull request #4 from NightRain233/master
1. 添加代码框里的行号 2. 添加百度统计 3. 修改readme
2 parents f4f0704 + 413c28c commit 35ac882

File tree

100 files changed

+380
-1287
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+380
-1287
lines changed

README-zh.md

Lines changed: 0 additions & 106 deletions
This file was deleted.

README.md

Lines changed: 4 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,7 @@
1-
# [TeXt Theme](https://github.com/kitian616/jekyll-TeXt-theme)
1+
# UCloud 对象存储US3 文档中心
22

3-
[![license](https://img.shields.io/github/license/kitian616/jekyll-TeXt-theme.svg)](https://github.com/kitian616/jekyll-TeXt-theme/blob/master/LICENSE)
4-
[![Gem Version](https://img.shields.io/gem/v/jekyll-text-theme.svg)](https://github.com/kitian616/jekyll-TeXt-theme/releases)
5-
[![Travis](https://img.shields.io/travis/kitian616/jekyll-TeXt-theme.svg)](https://travis-ci.org/kitian616/jekyll-TeXt-theme)
6-
[![Tip Me via PayPal](https://img.shields.io/badge/PayPal-tip%20me-1462ab.svg?logo=paypal)](https://www.paypal.me/kitian616)
7-
[![Tip Me via Bitcoin](https://img.shields.io/badge/Bitcoin-tip%20me-f7931a.svg?logo=bitcoin)](https://raw.githubusercontent.com/kitian616/jekyll-TeXt-theme/master/docs/assets/images/3Fkufxcw2xd8HnaRJBNK4ccdtkUDyyNu4V.jpg)
3+
对象存储(US3)是UCloud为互联网应用提供非结构化数据存储的服务。相对于传统硬盘存储,对象存储具有存储无上限、支持高并发访问、成本更低等优势。其数据持久性不低于 99.999999999%,标准型存储服务可用性不低于 99.95%。
84

9-
![TeXt Theme](https://raw.githubusercontent.com/kitian616/jekyll-TeXt-theme/master/screenshots/TeXt-home.jpg)
5+
文档中心现在拥有US3 Python、Golang以及C的SDK文档,详细说明了开发者如何通过SDK使用US3。未来我们将继续完善(包括但不限于其他语言的SDK文档),请持续关注。
106

11-
![TeXt Theme Details](https://raw.githubusercontent.com/kitian616/jekyll-TeXt-theme/master/screenshots/TeXt-layouts.png)
12-
13-
TeXt is a super customizable Jekyll theme for personal site, team site, blog, project, documentation, etc. Similar to iOS 11 style, it has large and prominent titles, round buttons and cards.
14-
15-
**[Change Log](https://github.com/kitian616/jekyll-TeXt-theme/blob/master/CHANGELOG.md)** | **[中文](https://github.com/kitian616/jekyll-TeXt-theme/blob/master/README-zh.md)**
16-
17-
## Features
18-
19-
- Responsive
20-
- Semantic HTML
21-
- Skins
22-
- Highlight Theme
23-
- Internationalization
24-
- Search
25-
- Table of contents
26-
- Authors
27-
- Additional styles (alert, tag, image, icon, button, grid, etc)
28-
- Extensions (audios, videos, slides, demos)
29-
- Markdown enhancements ([MathJax](https://www.mathjax.org/), [mermaid](https://mermaidjs.github.io/), [chartjs](http://www.chartjs.org/))
30-
- Sharing ([AddToAny](https://www.addtoany.com/), [AddThis](https://www.addthis.com/))
31-
- Comments ([Disqus](https://disqus.com/), [Gitalk](https://gitalk.github.io/), [Valine](https://valine.js.org/en/))
32-
- Pageview ([LeanCloud](https://leancloud.cn/))
33-
- Analytics ([Google Analytics](https://analytics.google.com/analytics/web/))
34-
- RSS ([jekyll-feed](https://github.com/jekyll/jekyll-feed))
35-
36-
## Skins
37-
38-
TeXt has 6 built-in skins, you can also set up your own skin.
39-
40-
| `default` | `dark` | `forest` |
41-
| --- | --- | --- |
42-
| ![Default](https://raw.githubusercontent.com/kitian616/jekyll-TeXt-theme/master/screenshots/skins_default.jpg) | ![Dark](https://raw.githubusercontent.com/kitian616/jekyll-TeXt-theme/master/screenshots/skins_dark.jpg) | ![Forest](https://raw.githubusercontent.com/kitian616/jekyll-TeXt-theme/master/screenshots/skins_forest.jpg) |
43-
44-
| `ocean` | `chocolate` | `orange` |
45-
| --- | --- | --- |
46-
| ![Ocean](https://raw.githubusercontent.com/kitian616/jekyll-TeXt-theme/master/screenshots/skins_ocean.jpg) | ![Chocolate](https://raw.githubusercontent.com/kitian616/jekyll-TeXt-theme/master/screenshots/skins_chocolate.jpg) | ![Orange](https://raw.githubusercontent.com/kitian616/jekyll-TeXt-theme/master/screenshots/skins_orange.jpg) |
47-
48-
### Highlight Theme
49-
50-
TeXt use [Tomorrow](https://github.com/chriskempson/tomorrow-theme) as the highlight theme.
51-
52-
| `tomorrow` | `tomorrow-night` | `tomorrow-night-eighties` | `tomorrow-night-blue` | `tomorrow-night-bright` |
53-
| --- | --- | --- | --- | --- |
54-
| ![Tomorrow](https://raw.githubusercontent.com/kitian616/jekyll-TeXt-theme/master/screenshots/highlight_tomorrow.png) | ![Tomorrow Night](https://raw.githubusercontent.com/kitian616/jekyll-TeXt-theme/master/screenshots/highlight_tomorrow-night.png) | ![Tomorrow Night Eighties](https://raw.githubusercontent.com/kitian616/jekyll-TeXt-theme/master/screenshots/highlight_tomorrow-night-eighties.png) | ![Tomorrow Night Blue](https://raw.githubusercontent.com/kitian616/jekyll-TeXt-theme/master/screenshots/highlight_tomorrow-night-blue.png) | ![Tomorrow Night Bright](https://raw.githubusercontent.com/kitian616/jekyll-TeXt-theme/master/screenshots/highlight_tomorrow-night-bright.png) |
55-
56-
## Documentation
57-
58-
### Start
59-
60-
- [Quick Start](https://tianqi.name/jekyll-TeXt-theme/docs/en/quick-start)
61-
- [Update from 1.x to 2.x](https://tianqi.name/jekyll-TeXt-theme/docs/en/update-from-1-to-2)
62-
63-
### Customization
64-
65-
- [Configuration](https://tianqi.name/jekyll-TeXt-theme/docs/en/configuration)
66-
- [Navigation](https://tianqi.name/jekyll-TeXt-theme/docs/en/navigation)
67-
- [Layouts](https://tianqi.name/jekyll-TeXt-theme/docs/en/layouts)
68-
- [Logo and Favicon](https://tianqi.name/jekyll-TeXt-theme/docs/en/logo-and-favicon)
69-
- [Authors](https://tianqi.name/jekyll-TeXt-theme/docs/en/authors)
70-
- [Internationalization](https://tianqi.name/jekyll-TeXt-theme/docs/en/i18n)
71-
72-
### Content
73-
74-
- [Writing Posts](https://tianqi.name/jekyll-TeXt-theme/docs/en/writing-posts)
75-
- [Additional styles](https://tianqi.name/jekyll-TeXt-theme/docs/en/additional-styles)
76-
- [Extensions](https://tianqi.name/jekyll-TeXt-theme/docs/en/extensions)
77-
- [Markdown Enhancements](https://tianqi.name/jekyll-TeXt-theme/docs/en/markdown-enhancements)
78-
79-
## Demo Pages
80-
81-
| Name | Description |
82-
| --- | --- |
83-
| [Home](https://tianqi.name/jekyll-TeXt-theme/test/) | Home page |
84-
| [Archive](https://tianqi.name/jekyll-TeXt-theme/archive.html) | Archive page |
85-
| [Layout Examples](https://tianqi.name/jekyll-TeXt-theme/samples.html) | Examples for different layouts |
86-
87-
## License
88-
89-
TeXt Theme is [MIT licensed](https://github.com/kitian616/jekyll-TeXt-theme/blob/master/LICENSE).
7+
如有问题或建议请联系我们:[email protected]

_config.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ search:
169169
## => Analytics
170170
##############################
171171
analytics:
172-
provider: false # false (default), "google", "custom"
172+
provider: custom # false (default), "google", "custom"
173173

174174
## Google Analytics
175175
google:
@@ -187,7 +187,11 @@ highlighter : rouge
187187
permalink : date
188188

189189
kramdown:
190-
smart_quotes: ["apos", "apos", "quot", "quot"]
190+
smart_quotes: ["apos", "apos", "quot", "quot"] #关闭 smart quotes(将英文引号转为中文引号)
191+
#代码添加行号
192+
syntax_highlighter_opts: # Rouge Options › https\://github.com/jneen/rouge#full-options
193+
block:
194+
line_numbers: true
191195

192196
exclude:
193197
- CHANGELOG.md

_includes/baidu-analysis.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<script>
2+
var _hmt = _hmt || [];
3+
(function() {
4+
var hm = document.createElement("script");
5+
hm.src = "https://hm.baidu.com/hm.js?4e6f9af579b843e5d89790505be99d96";
6+
var s = document.getElementsByTagName("script")[0];
7+
s.parentNode.insertBefore(hm, s);
8+
})();
9+
</script>

_includes/scripts/article.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@
88
var scroll = hasSidebar ? '.js-page-main' : 'html, body';
99
$scroll = $(scroll);
1010

11-
$articleContent.find('.highlight').each(function() {
12-
$this = $(this);
13-
$this.attr('data-lang', $this.find('code').attr('data-lang'));
14-
});
11+
//去除代码高亮中的language字样
12+
// $articleContent.find('.highlight').each(function() {
13+
// $this = $(this);
14+
// //
15+
// // $this.attr('data-lang', $this.find('code').attr('data-lang'));
16+
// });
1517
$articleContent.find('h1[id], h2[id], h3[id], h4[id], h5[id], h6[id]').each(function() {
1618
$this = $(this);
1719
$this.append($('<a class="anchor d-print-none" aria-hidden="true"></a>').html('<i class="fas fa-anchor"></i>'));

_includes/scripts/lib/copy-to-clipboard.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
(function() {
2-
var snippets = document.querySelectorAll('pre');
2+
// 选择合适的位置插入copy按钮
3+
var snippets = document.querySelectorAll('tr');
34
[].forEach.call(snippets, function(snippet) {
45
if (snippet.closest('.copyable') !== null) {
5-
snippet.firstChild.insertAdjacentHTML('beforebegin', '<button class="btn" data-clipboard-snippet><i class="far fa-copy"></i></button>');
6+
snippet.lastChild .insertAdjacentHTML('beforebegin', '<button class="btn" data-clipboard-snippet><i class="far fa-copy"></i></button>');
67
}
78
});
89
var clipboardSnippets = new ClipboardJS('[data-clipboard-snippet]', {
910
target: function(trigger) {
11+
// 将copy按钮的下一个列表选项的HTML内容 传入剪贴板
1012
return trigger.nextElementSibling;
1113
}
1214
});

_includes/sidebar/toc.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
<!-- 二级目录 -->
99
{%- if _item.children -%}
1010
{%- for _child in _item.children -%}
11-
12-
11+
<!-- 根据是否为当前页面判断要高亮 -->
1312
{%- if _child.title == page.title -%}
1413
{%- unless _child.url -%}
1514
<li class="toc-h2 active">{{ _child.title }}</a></li>
1615
{%- else -%}
1716
<li class="toc-h2 active"><a href="{{ _child.url }}">{{ _child.title }}</a></li>
1817
{%- endunless -%}
1918
{%- else -%}
19+
<!-- 判断二级目录是否有url属性 -->
2020
{%- if _child.url == null -%}
2121
<li class="toc-h2">{{ _child.title }}</a></li>
2222
{%- else -%}

_layouts/base.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<html lang="{{ __return }}">
77
<head>
88
{%- include analytics.html -%}
9+
{%- include baidu-analysis.html -%}
910
{%- include head.html -%}
1011
<script>
1112
{%- include scripts/utils/utils.js -%}

_sass/common/components/_toc.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ ul.toc--ellipsis {
9898
}
9999
}
100100

101+
// 左侧侧边栏
101102
ul.toc--navigator {
102103
& > li {
103104
a {

about.md

Lines changed: 0 additions & 74 deletions
This file was deleted.

0 commit comments

Comments
 (0)