Skip to content

Commit

Permalink
docs: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kitian616 committed May 27, 2018
1 parent 26d5814 commit dd2b030
Show file tree
Hide file tree
Showing 26 changed files with 626 additions and 255 deletions.
13 changes: 1 addition & 12 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,10 @@ repository: someone/someone.github.io
repository_tree: master


## => Navigation
## => Paths
##############################
paths:
base: /
home: /
all: /archive.html
rss: /feed.xml

nav_lists:
- titles:
en: About
zh: 关于
zh-Hans: 关于
zh-Hant: 關於
url: /about.html


## => Post
Expand Down
32 changes: 13 additions & 19 deletions _data/navigation.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
docs-en:
- title: "Start"
children:
- title: "Quick Start"
url: /docs/en/quick-start
- title: "Configuration"
url: /docs/en/configuration
- title: "Writing Posts"
url: /docs/en/writing-posts

docs-zh:
- title: "开始"
children:
- title: "快速开始"
url: /docs/zh/quick-start
- title: "配置"
url: /docs/zh/configuration
- title: "撰写博客"
url: /docs/zh/writing-posts
header:
- titles:
en: Archive
zh: 归档
zh-Hans: 归档
zh-Hant: 歸檔
url: /archive.html
- titles:
en: About
zh: 关于
zh-Hans: 关于
zh-Hant: 關於
url: /about.html
25 changes: 8 additions & 17 deletions _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,27 @@
<a title="{%- if site.description -%}{{ site.description }}{%- endif -%}" href="{{ __return }}">{{ site.title }}</a>
{%- endif -%}
</div>
{%- assign list = site.data.navigation.header -%}
{%- if list -%}
<nav>
<ul>
{%- assign __path = site.paths.home | default: site.data.variables.default.paths.home -%}
{%- include snippets/get-nav-url.html -%}
{%- assign href = __return -%}
{%- assign __locale = site.data.locale.NAV.HOME -%}
{%- include snippets/locale-to-string.html -%}
<li><a href="{{ href }}">{{ __return }}</a></li>
{%- assign __path = site.paths.all | default: site.data.variables.default.paths.all -%}
{%- include snippets/get-nav-url.html -%}
{%- assign href = __return -%}
{%- assign __locale = site.data.locale.NAV.ALL -%}
{%- include snippets/locale-to-string.html -%}
<li><a href="{{ href }}">{{ __return }}</a></li>
{%- for list in site.nav_lists -%}
{%- assign __path = list.url -%}
{%- for item in list -%}
{%- assign __path = item.url -%}
{%- include snippets/get-nav-url.html -%}
{%- assign _nav_url = __return -%}
{%- assign __path = page.url -%}
{%- include snippets/get-nav-url.html -%}
{%- assign _page_url = __return -%}
{%- assign __locale = list.titles -%}
{%- assign __locale = item.titles -%}
{%- include snippets/locale-to-string.html -%}
{%- if _nav_url == _page_url -%}
<li class="active"><a href="{{ _nav_url }}">{%- if list.title -%}{{ list.title }}{%- else -%}{{ __return }}{%- endif -%}</a></li>
<li class="active"><a href="{{ _nav_url }}">{%- if item.title -%}{{ item.title }}{%- else -%}{{ __return }}{%- endif -%}</a></li>
{%- else -%}
<li><a href="{{ _nav_url }}">{%- if list.title -%}{{ list.title }}{%- else -%}{{ __return }}{%- endif -%}</a></li>
<li><a href="{{ _nav_url }}">{%- if item.title -%}{{ item.title }}{%- else -%}{{ __return }}{%- endif -%}</a></li>
{%- endif -%}
{%- endfor -%}
</ul>
</nav>
{%- endif -%}
</div>
</header>
2 changes: 1 addition & 1 deletion _sass/common/components/_toc.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ul.toc {

.toc-h1 {
@include split-line(bottom);
padding: .6rem 0 .3rem 0;
padding: .8rem 0 .3rem 0;
margin-bottom: .6rem;
&, a {
color: $text-color-d;
Expand Down
23 changes: 4 additions & 19 deletions _config.dev.yml → docs/_config.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,27 +50,10 @@ repository: someone/someone.github.io
repository_tree: master


## => Navigation
## => Paths
##############################
paths:
base: /
home: /
all: /archive.html
rss: /feed.xml

nav_lists:
- title: Documentation
url: /docs/en/quick-start
- title: 文档
url: /docs/zh/quick-start
- titles:
en: About
zh: 关于
zh-Hans: 关于
zh-Hant: 關於
url: /about.html
- title: Jekyll
url: https://jekyllrb.com/


## => Post
Expand Down Expand Up @@ -181,4 +164,6 @@ plugins:
- jekyll-feed
- jekyll-paginate
- jekyll-sitemap
- jemoji
- jemoji

data_dir: /docs/_data
39 changes: 11 additions & 28 deletions _config.demo.yml → docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ url: https://tianqi.name # the base hostname & protocol for your site e.g. https
baseurl: /jekyll-TeXt-theme # does not include hostname
title: TeXt Theme
description: > # this means to ignore newlines until "Language & timezone"
TeXt Theme Demo
A customizable Jekyll theme for your blog or site
# => Language and Timezone
Expand All @@ -33,15 +33,12 @@ timezone: Asia/Shanghai # see https://en.wikipedia.org/wiki/List_of_tz_database_
## => Author and Social
##############################
author:
name: Someone
email: someone@somemail.com # your Email address e.g. someone@site.com
facebook: someone # your Facebook username
twitter: someone # your Twitter username
github: someone # your GitHub username
googleplus: someone # your Google+ username
weibo: someone # your Weibo username
douban: someone # your Douban username
linkedin: someone # your Linkedin username
name: Tian Qi
email: kitian616@outlook.com # your Email address e.g. someone@site.com
twitter: kitian616 # your Twitter username
github: kitian616/jekyll-TeXt-theme # your GitHub username
googleplus: 101827554735084402671 # your Google+ username
weibo: 234695683


## => GitHub Repository (if the site is hosted by GitHub)
Expand All @@ -50,26 +47,10 @@ repository: kitian616/jekyll-TeXt-theme
repository_tree: master


## => Navigation
## => Paths
##############################
paths:
base: /
home: https://github.com/kitian616/jekyll-TeXt-theme/
# all: /archive.html
# rss: /feed.xml

nav_lists:
- title: Documentation
url: /docs/en/quick-start
- title: 文档
url: /docs/zh/quick-start
- titles:
en: About
zh: 关于
zh-Hans: 关于
zh-Hant: 關於
url: /about.html


## => Post
##############################
Expand Down Expand Up @@ -179,4 +160,6 @@ plugins:
- jekyll-feed
- jekyll-paginate
- jekyll-sitemap
- jemoji
- jemoji

data_dir: /docs/_data
96 changes: 96 additions & 0 deletions docs/_data/locale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
NAV:
HOME:
en: "Home"
zh: "主页"
zh-Hans: "主页"
zh-Hant: "主頁"
ALL:
en: "Archive"
zh: "归档"
zh-Hans: "归档"
zh-Hant: "歸檔"
RSS:
en: "RSS"
zh: "RSS"
zh-Hans: "RSS"
zh-Hant: "RSS"

READMORE:
en: "Click to read more ..."
zh: "点我阅读更多..."
zh-Hans: "点我阅读更多..."
zh-Hant: "「點我閱讀更多」"

VIEWS:
en: "views"
zh: "阅读"
zh-Hans: "阅读"
zh-Hant: "閱讀"

LAST_UPDATED:
en: "Last updated"
zh: "更新于"
zh-Hans: "更新于"
zh-Hant: "更新於"

PREVIOUS:
en: "PREVIOUS"
zh: "上篇"
zh-Hans: "上篇"
zh-Hant: "上篇"

NEXT:
en: "NEXT"
zh: "下篇"
zh-Hans: "下篇"
zh-Hant: "下篇"

ARTICLE_DATE_FORMAT:
en: "%b %d, %Y"
zh: "%Y年 %m月%d日"
zh-Hans: "%Y年 %m月%d日"
zh-Hant: "%Y年 %m月%d日"

ARTICLE_LIST_DATE_FORMAT:
en: "%b %d"
zh: "%m月%d日"
zh-Hans: "%m月%d日"
zh-Hant: "%m月%d日"

STATISTICS:
en: "[POST_COUNT] post articles, [PAGE_COUNT] pages."
zh: "共计 [POST_COUNT] 篇文章,[PAGE_COUNT] 页。"
zh-Hans: "共计 [POST_COUNT] 篇文章,[PAGE_COUNT] 页。"
zh-Hant: "共計 [POST_COUNT] 篇文章,[PAGE_COUNT] 頁。"

LICENSE_ANNOUNCE:
en: "This work is licensed under a [LICENSE] license."
zh: "本文遵守 [LICENSE] 许可协议。"
zh-Hans: "本文遵守 [LICENSE] 许可协议。"
zh-Hant: "本文遵守 [LICENSE] 許可協議。"

LICENSE_INTRO:
en:
zh: "欢迎转载,转载需注明出处,且禁止用于商业目的。"
zh-Hans: "欢迎转载,转载需注明出处,且禁止用于商业目的。"
zh-Hant: "歡迎轉載,轉載需註明出處,且禁止用於商業目的。"

POST_ON_GITHUB:
en: "View this POST on Github."
zh: "在 Github 上查阅此文。"
zh-Hans: "在 Github 上查阅此文。"
zh-Hant: "在 Github 上查閱此文。"

FOLLOW_ME:
en: "Follow me on [NAME]."
zh: "在 [NAME] 上关注我。"
zh-Hans: "在 [NAME] 上关注我。"
zh-Hant: "在 [NAME] 上關注我。"

EMAIL_ME:
en: "Send me Email."
zh: "给我发邮件。"
zh-Hans: "给我发邮件。"
zh-Hant: "給我發郵件。"

COPYRIGHT_DATES: "2018"
66 changes: 66 additions & 0 deletions docs/_data/navigation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
header:
- title: Docs
url: /docs/en/quick-start
- title: 文档
url: /docs/zh/quick-start
- titles:
en: Archive
zh: 归档
zh-Hans: 归档
zh-Hant: 歸檔
url: /archive.html
- titles:
en: About
zh: 关于
zh-Hans: 关于
zh-Hant: 關於
url: /about.html
- title: GitHub
url: https://github.com/kitian616/jekyll-TeXt-theme


docs-en:
- title: Start
children:
- title: Quick Start
url: /docs/en/quick-start
- title: Customization
children:
- title: Configuration
url: /docs/en/configuration
- title: Navigation
url: /docs/en/navigation
- title: Layouts
url: /docs/en/layouts
- title: Content
children:
- title: Writing Posts
url: /docs/en/writing-posts
- title: Markdown Enhancements
url: /docs/en/markdown-enhancements
- title: Additional styles
url: /docs/en/additional-styles
- title: Dev

docs-zh:
- title: 开始
children:
- title: 快速开始
url: /docs/zh/quick-start
- title: 定制
children:
- title: 配置
url: /docs/zh/configuration
- title: 导航栏
url: /docs/zh/navigation
- title: 布局
url: /docs/zh/layouts
- title: 内容
children:
- title: 撰写博客
url: /docs/zh/writing-posts
- title: Markdown 增强
url: /docs/zh/markdown-enhancements
- title: 附加样式
url: /docs/zh/additional-styles
- title: 开发
Loading

0 comments on commit dd2b030

Please sign in to comment.