From 0ca65fbca510400bb91e5ac9797a687f908b2a61 Mon Sep 17 00:00:00 2001
From: Mivinci <1366723936@qq.com>
Date: Tue, 8 Nov 2022 23:10:57 +0800
Subject: [PATCH] breaking change in configuration
---
assets/css/md.scss | 4 +
assets/js/friends.js | 57 ------
assets/js/main.js | 1 -
assets/js/style.js | 4 +-
exampleSite/config.toml | 157 -----------------
exampleSite/config.yaml | 125 +++++++++++++
exampleSite/content/instruction.md | 70 --------
exampleSite/content/instruction.zh.md | 10 --
exampleSite/content/link.md | 6 +-
exampleSite/content/markdown-syntax.md | 3 +-
exampleSite/content/markdown-syntax.zh-cn.md | 176 +++++++++++++++++++
exampleSite/content/math-typesetting.md | 2 +-
exampleSite/content/mermaid-graphs.md | 4 +-
exampleSite/content/placeholder-text.md | 45 -----
i18n/en.yaml | 22 +++
i18n/zh-cn.yaml | 22 +++
layouts/_default/single.html | 4 +-
layouts/index.html | 8 +-
layouts/partials/header.html | 6 +-
layouts/partials/item.html | 8 +-
20 files changed, 373 insertions(+), 361 deletions(-)
delete mode 100644 assets/js/friends.js
delete mode 100644 exampleSite/config.toml
create mode 100644 exampleSite/config.yaml
delete mode 100644 exampleSite/content/instruction.md
delete mode 100644 exampleSite/content/instruction.zh.md
create mode 100644 exampleSite/content/markdown-syntax.zh-cn.md
delete mode 100644 exampleSite/content/placeholder-text.md
create mode 100644 i18n/en.yaml
create mode 100644 i18n/zh-cn.yaml
diff --git a/assets/css/md.scss b/assets/css/md.scss
index 12a98ab..fd313ec 100644
--- a/assets/css/md.scss
+++ b/assets/css/md.scss
@@ -9,6 +9,10 @@ $heading: (h1, 2.25, 800), (h2, 2, 700), (h3, 1.75, 600), (h4, 1.5, 600),
}
}
+.md p {
+ margin: .75rem 0;
+}
+
.md pre {
font-size: 13px;
line-height: 1.3;
diff --git a/assets/js/friends.js b/assets/js/friends.js
deleted file mode 100644
index 6807d7e..0000000
--- a/assets/js/friends.js
+++ /dev/null
@@ -1,57 +0,0 @@
-const dom = document.getElementById('friends')
-
-const topk = '{{.Site.Params.friends.topk}}'
-const raw = '{{.Site.Params.friends.feeds}}'
-
-const feeds = raw.replace(/^\[|\]$/g, '').split(' ')
-
-feeds.forEach(v => fetch(v).then(r => r.text()).then(r => rss(r)))
-
-/**
- * @param {string} xml
- */
-function rss(xml) {
- xml = xml.trim().replace(/\n/g, '')
- const g = xml.matchAll(/<(item|entry)>.*?<\/(item|entry)>/g)
- let n = +topk || 2;
- while (n) {
- const next = g.next()
- if (next.done) {
- break
- }
-
- // title
- const title = next.value[0].match(/(?<=
).*(?=<\/title>)/)[0]
-
- // link
- const link = next.value[0].match(/(?<=<(link|id)>).*(?=<\/(link|id)>)/)[0]
-
- // date
- const date = next.value[0].match(/(?<=<(pubDate|updated)>).*(?=<\/(pubDate|updated)>)/)[0]
-
- // innsert dom
- const div = document.createElement('div')
- div.className = 'flex justify-between'
- div.innerHTML = template(link, title, date)
- dom.appendChild(div)
-
- n--;
- }
-}
-
-/**
- * @param {string} date
- */
-function format(date) {
- const d = new Date(date)
- return d.toDateString()
-}
-
-
-function template() {
- const a = arguments
- return `
- ${a[1]}
- ${format(a[2])}
- `.trim()
-}
\ No newline at end of file
diff --git a/assets/js/main.js b/assets/js/main.js
index 5243f52..d17a258 100644
--- a/assets/js/main.js
+++ b/assets/js/main.js
@@ -1,4 +1,3 @@
import "./theme";
import "./style";
import "./selectable";
-import "./friends";
\ No newline at end of file
diff --git a/assets/js/style.js b/assets/js/style.js
index 6cc6b90..c185aec 100644
--- a/assets/js/style.js
+++ b/assets/js/style.js
@@ -1,9 +1,11 @@
-// fix style of checkboxes in posts.
+// fix style of checked/unchecked list items
document.querySelectorAll('.md ul').forEach(v => {
if (/ .+<\/li>/.test(v.innerHTML)) {
+ console.log(v);
v.classList.add('ul-checkbox');
}
});
+
// // use custom font family
// document.querySelector('body').style.setProperty('--global-font-family', '{{ .Site.Params.globalFontFamily }}');
\ No newline at end of file
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
deleted file mode 100644
index 867b06f..0000000
--- a/exampleSite/config.toml
+++ /dev/null
@@ -1,157 +0,0 @@
-baseURL = "https://mivinci.github.io/hugo-theme-minima"
-languageCode = "en-us"
-title = "Hi Folks"
-copyright = "© 2022 Mivinci"
-googleAnalytics = ""
-
-# paginate decides the number of the newest posts
-# that'll be shown on the home page.
-paginate = 12
-
-# theme is the name of the hugo theme you're gonna use,
-# `hugo-theme-minima` is put here only for debuging,
-# just name it what's under your theme directory.
-theme = "hugo-theme-minima"
-
-# Author has some of your information to be shown on the home page.
-[author]
-name = "Mivinci"
-slogon = "Living on Earth 🌍"
-description = "This is Minima, a clean and minimal Hugo theme porting from [Hexo Minima](https://github.com/adisaktijrs/hexo-theme-minima). It has supported multiple color themes, math formulas, flowcharts, syntax highlighting, and of course taxonomies like categories, tags, and series."
-
-
-[params]
-# iam is the beginning words of your self-introduction.
-iam = "I am"
-# The subtitle will be shown after the title of your blog site.
-# e.g. "title - subtitle".
-subtitle = ""
-# Comment decides the comment plugin to be used on your blog site,
-# e.g. disqus, utterances, ovo.
-comment = "utterances"
-# Timeformat, no matter what format to use, make it the second day of Jan. 2006
-timeformat = "Jan 02, 2006"
-# switch for turning on/off lights.
-switch = ["🌚", "🌝"]
-# default theme. e.g. light, dark, system
-defaultTheme = "system"
-# If set true, date of posts will be shown in the homepage.
-displayDate = true
-#
-displayDescription = true
-# If set true, users can select text from your post.
-selectable = true
-# If set true, all your posts will use the chosen comment plugin
-# except those with a `comment: false` specified in their front-matter
-commentOnAllPosts = true
-
-recent = "Recent Posts"
-older = "Older Posts"
-
-# Disqus configuration
-[params.disqus]
-shortname = "hugo-minima"
-
-# Utterances configuration
-# Full doc's at https://utteranc.es
-# **notice**: if you're going to use utterances, you must change the
-# `repo` to your own repo address that stores comments on your site
-[params.utterances]
-repo = "mivinci/hugo-theme-minima"
-issueTerm = "pathname"
-label = "comment"
-
-# **deprecated**
-# OvO is a comment plugin written by the author of Minima.
-# It is enabled when params.comment is set "ovo". You can
-# have a live view on https://ovo.js.org. If you are using
-# disqus or utterance, just ignore this.
-[params.ovo]
-server = ""
-placeholder = ""
-
-
-# Params.social is an array containing your social network accounts,
-# Each has a lowercase name, a svg formatted icon and a url to the
-# webpage of your account. They will be shown at the bottom of every
-# page of your blog.
-# Be sure the svgs you use must have both its width and its height
-# set 18. If you don't wanna put the svg code in this config file,
-# since they are too long, you can instead save them to the
-# `data/svg.toml` file under the root directory of your blog.
-# in that file, each line must be formatted as `name = ''`
-# where `` is the svg code.
-[[params.social]]
-name = "twitter"
-url = "https://twitter.com/realmivinci"
-svg = ""
-[[params.social]]
-name = "email"
-url = "mailto:mivinci@qq.com"
-svg = ""
-[[params.social]]
-name = "github"
-url = "https://github.com/mivinci/hugo-theme-minima"
-svg = ""
-[[params.social]]
-name = "rss"
-url = "/index.xml"
-svg = ""
-
-# If set, titles and links of the topk newest posts extracted from
-# the feeds will be displayed in the home page. Note that the feeds
-# providers have to make their 'Access-Control-Allow-Origin' contain
-# your domain, otherwise the feeds cannot be fetched.
-[params.friends]
-feeds = []
-topk = 3
-title = "Friends' Posts"
-proxy = "" # reserved
-
-
-# Menu.main is an array that's used to decide what entries can be shown
-# on the navigator of yur blog. You can use a weight to make them ordered.
-[[menu.main]]
-name = "Home"
-url = "/"
-weight = 1
-[[menu.main]]
-name = "Tags"
-url = "/tags"
-weight = 2
-[[menu.main]]
-name = "Series"
-url = "/series"
-weight = 3
-[[menu.main]]
-name = "About"
-url = "/about"
-weight = 4
-
-
-# You can classify your posts by setting taxanomies in the front matter
-# e.g.
-# categories = ["dev"]
-# series = ["Building an RPC server"]
-# tags = ["hugo", "golang"]
-# A little suggestion: one post belongs to one series or one category or multiple tags.
-[taxonomies]
-category = "categories"
-tag = "tags"
-series = "series"
-
-
-# Fields below make sure all the codes in a post are
-# highlighted correctly, so better not edit them.
-[markup.highlight]
-lineNos = true
-noClasses = false
-
-
-defaultContentLanguage = "en"
-[languages.en]
-languageName = "EN"
-weight = 1
-[languages.zh]
-languageName = "ZH"
-weight = 2
\ No newline at end of file
diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml
new file mode 100644
index 0000000..4602eeb
--- /dev/null
+++ b/exampleSite/config.yaml
@@ -0,0 +1,125 @@
+baseURL: https://mivinci.github.io/hugo-theme-minima
+languageCode: en-us
+title: Hugo on Minima
+copyright: © 2022 Mivinci
+googleAnalytics:
+# paginate specifies the maximum number of posts displayed on the home page.
+paginate: 12
+# theme specifies the name of the theme to be used.
+theme: hugo-theme-minima
+# defaultContentLanguage specifies the default language to use.
+defaultContentLanguage: en
+# language.x setup
+languages:
+ en:
+ languageName: EN
+ weight: 1
+ zh-cn:
+ languageName: ZH
+ weight: 2
+ author:
+ status: 目前住在地球 🌍
+ description: |
+ 这是 Minima, 一个简洁的 Hugo 主题,移植自 [Hexo Minima](https://github.com/adisaktijrs/hexo-theme-minima)。
+ 支持深色模式、多语言、数学公式、流程图、代码语法高亮,当然还有分类、标签、系列等等。
+ params:
+ greet: 你好 :)
+
+# author specifies your name, a slogon and your brief self-introduction.
+author:
+ name: Mivinci
+ status: Am currently living on Earth 🌍
+ description: |
+ This is Minima, a clean and minimal Hugo theme porting from
+ [Hexo Minima](https://github.com/adisaktijrs/hexo-theme-minima). It has supports
+ for dark mode, multilingual mode, math formulas, flowcharts, syntax highlighting,
+ and of course taxonomies like categories, tags, and series.
+
+params:
+ # greet specifies greeting words.
+ greet: Hello :)
+ # subtitle speficies a subtitle displayed right after the site title.
+ subtitle:
+ # comment specifies which comment plugin to be used.
+ # currently available ones: disqus, utterances, giscus.
+ comment: utterances
+ # switch specifies two emojis to be used as the button toggling color themes.
+ switch: ["🌚", "🌝"]
+ # defaultTheme specifies a default theme to be used.
+ # currently available options: light, dark, system.
+ defaultTheme: system
+ # displayDate speficies whether or not to display post date on the home page.
+ displayDate: true
+ # displayDescription specifies whether or not to display post description on
+ # the hoem page.
+ displayDescription: true
+ # selectable specifies if your post content can be selected.
+ selectable: true
+ # commentOnAllPosts specifies if the chosen comment plugin to be enabled on all
+ # post pages. If enabled, those you don't want a comment plugin to work on just
+ # set `comment` to false in their front matters.
+ commentOnAllPosts: true
+
+ # disqus specifies the configuration for Disqus.
+ disqus:
+ shortname: hugo-minima
+
+ # utterances specifies the configuration for Utterances.
+ # What is Utterances? Check this out: https://utteranc.es
+ utterances:
+ repo: "mivinci/hugo-theme-minima"
+ issueTerm: "pathname"
+ label: "comment"
+
+ # **DEPRECATED**
+ # ovo(https://ovo.js.org) is a comment plugin written by the author of Minima but
+ # is now deprecated out of security issues.
+ ovo:
+ server: ""
+ placeholder: ""
+
+ # social is an array containing as many as social accounts to be displayed
+ # in the buttom of every page.
+ social:
+ - name: "twitter"
+ url: "https://twitter.com/realmivinci"
+ - name: "email"
+ url: "mailto:mivinci@qq.com"
+ - name: "github"
+ url: "https://github.com/mivinci/hugo-theme-minima"
+ - name: "rss"
+ url: "/index.xml"
+
+# menu.main is an array containing what is used as the navigator.
+menu:
+ main:
+ - identifier: home
+ name: "Home"
+ url: "/"
+ weight: 1
+ - identifier: tags
+ name: "Tags"
+ url: "/tags"
+ weight: 2
+ - identifier: series
+ name: "Series"
+ url: "/series"
+ weight: 3
+ - identifier: about
+ name: "About"
+ url: "/about"
+ weight: 4
+
+# taxonomies defines ways to classify yout posts. Below are some presets that
+# most bloggers use, so you can replace them with whatever you like.
+taxonomies:
+ category: categories
+ tag: tags
+ series: series
+
+# markup.highlight has two keys set to make sure that the syntax highlighting
+# in your posts are rendered correctly, so do not edit them.
+markup:
+ highlight:
+ lineNos: true
+ noClasses: false
diff --git a/exampleSite/content/instruction.md b/exampleSite/content/instruction.md
deleted file mode 100644
index fda6fb0..0000000
--- a/exampleSite/content/instruction.md
+++ /dev/null
@@ -1,70 +0,0 @@
----
-author: Mivinci
-title: Instruction
-date: 2021-07-19T10:52:59+08:00
-description: A Clean and minimal Hugo theme porting from the [Hexo Minima](https://github.com/adisaktijrs/hexo-theme-minima). [Click me](https://h.xjj.pub/) to take a look.
-tags:
- - Hugo
- - Minima
-math: true
-comment: true
----
-
-> The main branch is in development stage, UI or configurations may vary. You can use the latest stable version [here](https://github.com/Mivinci/hugo-theme-minima/releases/tag/v1.1.0).
-
-## Features
-
-- [x] Clean
-- [x] Light/dark mode
-- [x] VSCode-style code hightlighting (the most alike among all Hugo themes)
-- [x] KaTeX
-- [x] Mermaid diagrams
-- [x] Google analytics
-- [x] Disqus/Utterances
-- [x] Optional ToC
-
-## Usage
-
-Before using Minima, make sure you've got Hugo (extended version) installed on your device.
-
-### Installation
-
-Suppose `blog` is where you place your sources.
-
-```bash
-cd blog
-git init
-git submodule add --depth 1 https://github.com/mivinci/hugo-theme-minima.git themes/minima
-```
-
-Or `clone` directly if you don't wanna use the Git submodule.
-
-```bash
-git clone https://github.com/mivinci/hugo-theme-minima.git themes/minima
-```
-
-Anyways, you just need to put Minima under the `blog/themes` directory.
-
-### Configuration
-
-Follow [exampleSite/config.toml](https://github.com/Mivinci/hugo-theme-minima/blob/main/exampleSite/config.toml) and edit your own `blog/config.toml` file.
-
-### Supported Front Matters
-
-| Field | Type | Explanation |
-|:----------- |:------ |:------------------------------------------------------ |
-| title | string | Title of the post |
-| description | string | Description of the post |
-| date | string | Datetime when the post is written |
-| categories | array | Array of categories the posts belongs to |
-| series | array | Array of series the post belongs to |
-| tags | array | Array of tags the posts is related to |
-| math | bool | True if the post needs to render math formulas |
-| mermaid | bool | True if the post needs to render mermaid diagrams |
-| comment | bool | True if the post allows people to make comments |
-| draft | bool | True if the post isn't already for publishing |
-| toc | bool | True if the post needs a ToC |
-
-### Feedback
-
-Feedbacks are welcome [here](https://github.com/Mivinci/hugo-theme-minima/issues).
diff --git a/exampleSite/content/instruction.zh.md b/exampleSite/content/instruction.zh.md
deleted file mode 100644
index 52caf4c..0000000
--- a/exampleSite/content/instruction.zh.md
+++ /dev/null
@@ -1,10 +0,0 @@
----
-author: Hugo Authors
-title: 使用说明
-date: 2021-07-19T10:52:59+08:00
-description:
-math: true
-comment: true
----
-
-你好
\ No newline at end of file
diff --git a/exampleSite/content/link.md b/exampleSite/content/link.md
index 4079c14..63bba3c 100644
--- a/exampleSite/content/link.md
+++ b/exampleSite/content/link.md
@@ -1,7 +1,7 @@
---
-author: XJJ
-title: External Link Post
+author: Mivinci
+title: An External Link
date: 2021-07-17T10:52:59+08:00
-description:
+description: This is a link to an external resource.
link: https://gohugo.io
---
\ No newline at end of file
diff --git a/exampleSite/content/markdown-syntax.md b/exampleSite/content/markdown-syntax.md
index fb52e3c..82fbb62 100644
--- a/exampleSite/content/markdown-syntax.md
+++ b/exampleSite/content/markdown-syntax.md
@@ -3,7 +3,8 @@ author: "Hugo Authors"
title: "Markdown Syntax Guide"
date: "2021-07-18T10:52:59+08:00"
description: "Sample article showcasing basic Markdown syntax and formatting for HTML elements."
-categories: ["Markdown"]
+categories: ["markdown"]
+tags: ["markdown"]
---
This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme.
diff --git a/exampleSite/content/markdown-syntax.zh-cn.md b/exampleSite/content/markdown-syntax.zh-cn.md
new file mode 100644
index 0000000..175e92a
--- /dev/null
+++ b/exampleSite/content/markdown-syntax.zh-cn.md
@@ -0,0 +1,176 @@
+---
+author: "Mivinci"
+title: "Markdown 语法指北"
+date: "2021-07-18T10:52:59+08:00"
+description: "一篇 Markdown 示例文章,翻译自官方示例。"
+categories: ["markdown"]
+tags: ["markdown"]
+---
+
+本文提供了一个可以在 Hugo 内容文件中使用的基本 Markdown 语法示例,还展示了基本 HTML 元素是否在 Hugo 主题中使用 CSS 进行修饰。
+
+
+
+## 标题
+
+下面的 HTML ``—`` 元素代表了六个级别的章节标题。 `` 是最高的部分级别,而 `` 是最低的。
+
+# 一级标题
+
+## 二级标题
+
+### 三级标题
+
+#### 四级标题
+
+##### 五级标题
+
+###### 六级标题
+
+## 段落
+
+Xerum,我可以和他解释谁在痛苦中。 当我来到你身边,当我充满快乐时,我被快乐所折磨,或者他是天生的,或者是一个骗子,因为那个让我快乐痛苦的人是事情的专家,或者他撕裂和撕破自己的意志,仿佛他值得被遮盖,他是不是走到了心坎上,以同样的心去追随同样的事情? 为什么毛孔会竖起来,当它被放置在一个不知道老鼠意志或一切的地方时? 我会安静的。 就我而言,我的心以一种或另一种方式受到干扰,我把它们撕下来擦干,这样我要么杀了它们,要么让它们逃跑。 他憎恨真相,因为 veliamenim 的浪潮是起因和面子本身,而版本的痛苦又重演了。
+
+是旅行吗? 因为每一件事都有一些你讨厌或讨厌的东西,所以你会吃东西,以免让你的智慧隐藏这样一个事实,即心脏和心脏或有趣的东西会从中出来。
+
+## 块引用
+
+blockquote 元素表示从另一个来源引用的内容,可选地带有必须在“footer”或“cite”元素内的引用,以及可选的内联更改,例如注释和缩写。
+
+#### 不注明出处的块引用
+
+> 然后,为了铸币安德普,要给予的知识相应地减少。
+> **注意**您可以在块引用中使用 *Markdown 语法*。
+
+#### 带出处的块引用
+
+> 不要通过共享内存来通信,通过通信来共享内存。
+> — Rob Pike[^1]
+
+[^1]: 上述引述摘自 Rob Pike 在 2015 年 11 月 18 日 Gopherfest 期间的 [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c)。
+
+## 表格
+
+表格不是核心 Markdown 规范的一部分,但 Hugo 支持开箱即用地支持它们。
+
+| 姓名 | 年龄 |
+|:----:|:---:|
+| 小明 | 27 |
+| 大壮 | 23 |
+
+#### 表格内的内联 Markdown
+
+| 斜体 | 粗体 | 代码 |
+|:---------:|:--------:|:------:|
+| *斜体* | **粗体** | `code` |
+
+## 代码块
+
+#### 带反引号的代码块
+
+```html
+
+
+
+
+ Example HTML5 Document
+
+
+ Test
+
+
+```
+
+#### 缩进四个空格的代码块
+
+
+
+
+
+ Example HTML5 Document
+
+
+ Test
+
+
+
+#### Golang 的代码块
+
+```go {hl_lines=[3]}
+type Registry interface {
+ Register(*Service, ...RegisterOption) error
+ Deregister(*Service, ...DeregisterOption) error
+ GetService(string, ...GetOption) ([]*Service, error)
+}
+```
+
+#### C艹 的代码块
+
+```c++
+#include
+
+class Animal {
+ string name;
+public:
+ void eat();
+}
+
+void Animal::eat() {
+ std::cout << "eat something" << std::endl;
+}
+```
+
+#### Jvav 的代码块
+
+```java
+class Animal {
+ void speak() { /* speak */ }
+}
+
+class Dog extends Animal {
+ @override
+ void speak() { /* bark */ }
+}
+
+class Cat extends Animal {
+ @override
+ void speak() { /* mew */ }
+}
+```
+
+#### Python 的代码块
+
+```python
+class Dog(Animal):
+ def __init__(self):
+ super.__init__()
+
+ def eat():
+ pass
+```
+
+## 列表类型
+
+#### 有序列表
+
+1. 第一项
+2. 第二项
+3. 第三项
+- [x] 已勾选
+- [ ] 未勾选
+
+#### 无序列表
+
+* 第一项
+* 另一项
+* 另另一项
+
+#### 嵌套列表
+
+* 水果
+ * 苹果
+ * 橘子
+ * 香蕉
+* 乳制品
+ * 牛奶
+ * 奶酪
diff --git a/exampleSite/content/math-typesetting.md b/exampleSite/content/math-typesetting.md
index 638a82c..1fbbc53 100644
--- a/exampleSite/content/math-typesetting.md
+++ b/exampleSite/content/math-typesetting.md
@@ -2,7 +2,7 @@
author: Hugo Authors
title: Math Typesetting
date: 2021-07-18T10:52:59+08:00
-description: A brief guide to setup KaTeX
+description: A brief guide to setup KaTeX.
math: true
categories: ["Markdown", "KaTeX"]
---
diff --git a/exampleSite/content/mermaid-graphs.md b/exampleSite/content/mermaid-graphs.md
index a56f499..59b5c61 100644
--- a/exampleSite/content/mermaid-graphs.md
+++ b/exampleSite/content/mermaid-graphs.md
@@ -2,7 +2,7 @@
author: Hugo Authors
title: Mermaid Graphs
date: 2021-07-18T10:52:59+08:00
-description: A brief guide to setup Mermaid
+description: A brief guide to setup Mermaid.
mermaid: true
draft: false
categories: ["Markdown", "Mermaid"]
@@ -15,4 +15,4 @@ graph LR
Start --> Stop
{{}}
-For more documentations on Mermaid, view [mermaid](https://mermaid-js.github.io/mermaid).
+For more documentations on Mermaid, check out [mermaid](https://mermaid-js.github.io/mermaid).
diff --git a/exampleSite/content/placeholder-text.md b/exampleSite/content/placeholder-text.md
deleted file mode 100644
index cf8700f..0000000
--- a/exampleSite/content/placeholder-text.md
+++ /dev/null
@@ -1,45 +0,0 @@
-+++
-author = "Hugo Authors"
-title = "Placeholder Text"
-date = "2021-07-11T10:52:59+08:00"
-description = "Lorem Ipsum Dolor Si Amet"
-toc = true
-categories = ["Markdown"]
-+++
-
-Lorem est tota propiore conpellat pectoribus de pectora summo. Redit teque digerit hominumque toris verebor lumina non cervice subde tollit usus habet Arctonque, furores quas nec ferunt. Quoque montibus nunc caluere tempus inhospita parcite confusaque translucet patri vestro qui optatis lumine cognoscere flos nubis! Fronde ipsamque patulos Dryopen deorum.
-
-1. Exierant elisi ambit vivere dedere
-2. Duce pollice
-3. Eris modo
-4. Spargitque ferrea quos palude
-
-Rursus nulli murmur; hastile inridet ut ab gravi sententia! Nomine potitus silentia flumen, sustinet placuit petis in dilapsa erat sunt. Atria tractus malis.
-
-1. Comas hunc haec pietate fetum procerum dixit
-2. Post torum vates letum Tiresia
-3. Flumen querellas
-4. Arcanaque montibus omnes
-5. Quidem et
-
-# Vagus elidunt
-
-
-
-[The Van de Graaf Canon](https://en.wikipedia.org/wiki/Canons_of_page_construction#Van_de_Graaf_canon)
-
-## Mane refeci capiebant unda mulcebat
-
-Victa caducifer, malo vulnere contra dicere aurato, ludit regale, voca! Retorsit colit est profanae esse virescere furit nec; iaculi matertera et visa est, viribus. Divesque creatis, tecta novat collumque vulnus est, parvas. **Faces illo pepulere** tempus adest. Tendit flamma, ab opes virum sustinet, sidus sequendo urbis.
-
-Iubar proles corpore raptos vero auctor imperium; sed et huic: manus caeli Lelegas tu lux. Verbis obstitit intus oblectamina fixis linguisque ausus sperare Echionides cornuaque tenent clausit possit. Omnia putatur. Praeteritae refert ausus; ferebant e primus lora nutat, vici quae mea ipse. Et iter nil spectatae vulnus haerentia iuste et exercebat, sui et.
-
-Eurytus Hector, materna ipsumque ut Politen, nec, nate, ignari, vernum cohaesit sequitur. Vel **mitis temploque** vocatus, inque alis, *oculos nomen* non silvis corpore coniunx ne displicet illa. Crescunt non unus, vidit visa quantum inmiti flumina mortis facto sic: undique a alios vincula sunt iactata abdita! Suspenderat ego fuit tendit: luna, ante urbem Propoetides **parte**.
-
-{{< css.inline >}}
-
-
-
-{{< /css.inline >}}
diff --git a/i18n/en.yaml b/i18n/en.yaml
new file mode 100644
index 0000000..7bcb893
--- /dev/null
+++ b/i18n/en.yaml
@@ -0,0 +1,22 @@
+recent:
+ other: Recent Posts
+older:
+ other: Older Posts
+
+home:
+ other: Home
+about:
+ other: About
+categories:
+ other: Categories
+tags:
+ other: Tags
+series:
+ other: Series
+
+timeformat:
+ other: Jan 02, 2006
+
+post:
+ at:
+ other: Post at
\ No newline at end of file
diff --git a/i18n/zh-cn.yaml b/i18n/zh-cn.yaml
new file mode 100644
index 0000000..2ea9e96
--- /dev/null
+++ b/i18n/zh-cn.yaml
@@ -0,0 +1,22 @@
+recent:
+ other: 近期文章
+older:
+ other: 历史文章
+
+home:
+ other: 首页
+about:
+ other: 关于
+categories:
+ other: 分类
+tags:
+ other: 标签
+series:
+ other: 系列
+
+timeformat:
+ other: 2006 年 1 月 2 日
+
+post:
+ at:
+ other: 发布于
\ No newline at end of file
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 6c5e5dc..2942994 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,10 +1,10 @@
{{ define "main" }}
-
+
{{ if .Site.Params.displayDate }}
- Posted at — {{ dateFormat .Site.Params.timeformat .Date }}
+ {{ T "post.at" }} — {{ .Date | time.Format (T "timeformat") }}
{{ end }}
{{ if .Draft }}
diff --git a/layouts/index.html b/layouts/index.html
index 1904f52..e51721c 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,12 +1,12 @@
{{ define "main" }}
- {{ .Site.Params.iam }} {{ .Site.Author.name }}
- {{ .Site.Author.slogon }}
+ {{ .Site.Params.greet }}
+ {{ .Site.Author.status }}
{{ .Site.Author.description | markdownify | safeHTML }}
{{ if eq .Paginator.PageNumber 1 }}
- {{ .Site.Params.recent }}
+ {{ T "recent" }}
{{ else }}
- {{ .Site.Params.older }}
+ {{ T "older" }}
{{ end }}
{{ $paginator := .Paginate (where .Site.RegularPages "Kind" "page") }}
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 097e3c9..d8352ce 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -5,15 +5,15 @@
{{ if .Site.Params.brand }}
{{ end }}
-
{{ index .Site.Params.switch 1 }}
+
{{ index .Site.Params.switch 1 }}
-
+
{{ range $.Site.Home.AllTranslations }}
{{ .Language.LanguageName }}
{{ end}}
diff --git a/layouts/partials/item.html b/layouts/partials/item.html
index 24a2fc6..238daed 100644
--- a/layouts/partials/item.html
+++ b/layouts/partials/item.html
@@ -1,16 +1,16 @@
{{ if .Page.Params.link }}
-
{{ .Title }}
+
{{ .Title }}
{{ else }}
-
{{ .Title }}
+
{{ .Title }}
{{ end }}
{{ if .Site.Params.displayDate }}
-
{{ dateFormat .Site.Params.timeformat .Date }}
+
{{ .Date | time.Format (T "timeformat") }}
{{ end }}
{{ if .Site.Params.displayDescription }}
-
+
{{ .Description | markdownify | safeHTML }}
{{ end }}