Skip to content

Commit

Permalink
docs: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kitian616 committed Jun 12, 2018
1 parent d8470c2 commit e3bd695
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 17 deletions.
1 change: 1 addition & 0 deletions README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ TeXt 是针对博客的一款简洁的主题,它虽然简洁但并不简单。
- [配置](https://tianqi.name/jekyll-TeXt-theme/docs/zh/configuration)
- [导航栏](https://tianqi.name/jekyll-TeXt-theme/docs/zh/navigation)
- [布局](https://tianqi.name/jekyll-TeXt-theme/docs/zh/layouts)
- [Logo 和 Favicon](https://tianqi.name/jekyll-TeXt-theme/docs/zh/logo-and-favicon)

### 内容

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ You can choose these 6 built-in color themes below:
- [Configuration](https://tianqi.name/jekyll-TeXt-theme/docs/en/configuration)
- [Navigation](https://tianqi.name/jekyll-TeXt-theme/docs/en/navigation)
- [Layouts](https://tianqi.name/jekyll-TeXt-theme/docs/en/layouts)
- [Logo and Favicon](https://tianqi.name/jekyll-TeXt-theme/docs/en/logo-and-favicon)

### Content

Expand Down
9 changes: 2 additions & 7 deletions _sass/layout/_all.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,14 @@
@include transform(translateY(-50%));
display: inline-block;
vertical-align: middle;
& > svg {
display: block;
fill: $text-color-l;
height: 1.2rem;
width: 1.2rem;
}
font-size: map-get($base , font-size-sm);
}
&.not-empty > .icon-clear {
display: block;
}
& > .icon-clear {
display: none;
right: .5rem;
right: .8rem;
@include link-colors($text-color-l, $text-color-d);
}
& > .icon-search {
Expand Down
6 changes: 4 additions & 2 deletions docs/_data/navigation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ docs-en:
url: /docs/en/navigation
- title: Layouts
url: /docs/en/layouts
- title: Favicon
url: /docs/en/favicon
- title: Logo and Favicon
url: /docs/en/logo-and-favicon
- title: Content
children:
- title: Writing Posts
Expand All @@ -59,6 +59,8 @@ docs-zh:
url: /docs/zh/navigation
- title: 布局
url: /docs/zh/layouts
- title: Logo 和 Favicon
url: /docs/zh/logo-and-favicon
- title: 内容
children:
- title: 撰写博客
Expand Down
19 changes: 14 additions & 5 deletions docs/en/2.4-favicon.md → docs/en/2.4-logo-and-favicon.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,30 @@
---
layout: article
title: Favicon
permalink: /docs/en/favicon
key: docs-layouts
title: Logo and Favicon
permalink: /docs/en/logo-and-favicon
key: docs-logo-and-favicon
sidebar:
nav: docs-en
aside:
toc: true
---

## Logo

<p>TeXt use <span>{% include svg/logo.svg %}</span> as logo, you can change it by replacing _includes/svg/logo.svg with your own logo.</p>

## Favicon

TeXt recommend [RealFaviconGenerator](https://realfavicongenerator.net/) for generating favicon.

Open [RealFaviconGenerator](https://realfavicongenerator.net/) and click "Select your Favicon picture".
Open [RealFaviconGenerator](https://realfavicongenerator.net/), click "Select your Favicon picture" and then choose your favicon picture.

![Select your Favicon picture](https://raw.githubusercontent.com/kitian616/jekyll-TeXt-theme/master/docs/assets/images/realfavicongenerator-select-favicon-picture.jpg)

After settings you need tell the generator where you would place favicon files. TeXt default put them to `/assets`.
After settings you need tell the generator where you would place favicon files, TeXt default put them to `/assets`.

It's recommended to put favicon files at the root of your site.
{:.warning}

![Select your Favicon path](https://raw.githubusercontent.com/kitian616/jekyll-TeXt-theme/master/docs/assets/images/realfavicongenerator-path.jpg)

Expand Down
35 changes: 35 additions & 0 deletions docs/zh/2.4-logo-and-favicon.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
layout: article
title: Logo 和 Favicon
permalink: /docs/zh/logo-and-favicon
key: docs-logo-and-favicon-zh
sidebar:
nav: docs-zh
aside:
toc: true
---

## Logo

<p>TeXt 使用 <span>{% include svg/logo.svg %}</span> 作为它的 Logo,你可以通过替换 _includes/svg/logo.svg 来设置你的 Logo。</p>

## Favicon

TeXt 推荐使用 [RealFaviconGenerator](https://realfavicongenerator.net/) 来生成 Favicon。

打开 [RealFaviconGenerator](https://realfavicongenerator.net/) 后点击“Select your Favicon picture”,选择图片进入下一步。

![Select your Favicon picture](https://raw.githubusercontent.com/kitian616/jekyll-TeXt-theme/master/docs/assets/images/realfavicongenerator-select-favicon-picture.jpg)

图标设置完成后,你需要告诉生成器 Favicon 文件的网站路径,TeXt 将他们放在了 /assets 目录。

推荐将 Favicon 文件放在网站的根目录下。
{:.warning}

![Select your Favicon path](https://raw.githubusercontent.com/kitian616/jekyll-TeXt-theme/master/docs/assets/images/realfavicongenerator-path.jpg)

完成后点击“Generate your Favicons and HTML code”进入到最后一步。

![Result](https://raw.githubusercontent.com/kitian616/jekyll-TeXt-theme/master/docs/assets/images/realfavicongenerator-result.jpg)

下载生成的 favicon 包,解压文件到你方才填写的路径,将 HTML 代码替换到 _includes/head.html 文件 `<!-- begin favicon -->``<!-- end favicon -->` 之间的地方。
4 changes: 1 addition & 3 deletions docs/zh/3.2-markdown-enhancements.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ aside:
toc: true
---

### Markdown 增强

你需要在 `_config.yml` 或 YAML 头信息中设置相关的属性为 `true` 来开启对应的功能。

| 增强项 | 描述 |
Expand Down Expand Up @@ -73,7 +71,7 @@ graph TB;

- [Gant Diagram](https://mermaidjs.github.io/gantt.html)

你可以在 [这里](https://tianqi.name/jekyll-TeXt-theme/test/2017/06/06/mermaid.html)找到更多的示例。
你可以在[这里](https://tianqi.name/jekyll-TeXt-theme/test/2017/06/06/mermaid.html)找到更多的示例。

## Chart

Expand Down
Binary file added favicon.ico
Binary file not shown.

0 comments on commit e3bd695

Please sign in to comment.