Skip to content

Commit

Permalink
English
Browse files Browse the repository at this point in the history
  • Loading branch information
triccsr committed Apr 17, 2024
1 parent e3852a9 commit 5e0a005
Show file tree
Hide file tree
Showing 16 changed files with 109 additions and 17 deletions.
11 changes: 6 additions & 5 deletions archetypes/default.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
+++
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
date = {{ .Date }}
draft = true
+++
---
title : '{{ replace .File.ContentBaseName "-" " " | title }}'
date : {{ .Date }}
draft : true
url : {{ substr (md5 (printf "%s%s" .Date (replace .TranslationBaseName "-" " " | title))) 4 8 }}
---
6 changes: 0 additions & 6 deletions config/_default/_languages.toml

This file was deleted.

2 changes: 1 addition & 1 deletion config/_default/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title = "Triccsr's Blog"

# Theme i18n support
# Available values: en, fr, id, ja, ko, pt-br, zh-cn, zh-tw, es, de, nl, it, th, el, uk, ar
defaultContentLanguage = "en"
defaultContentLanguage = "zh-cn"

# Set hasCJKLanguage to true if DefaultContentLanguage is in [zh-cn ja ko]
# This will make .Summary and .WordCount behave correctly for CJK languages.
Expand Down
11 changes: 11 additions & 0 deletions config/_default/languages.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Rename this file to languages.toml to enable multilingual support
[en]
languageName = "English"
languagedirection = "ltr"
title = "Triccsr's Blog"
weight = 2
[zh-cn]
languageName = "简体中文"
languagedirection = "ltr"
title = "Triccsr的垃圾场"
weight = 1
8 changes: 8 additions & 0 deletions content/_index.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
menu:
main:
name: Home
weight: 1
params:
icon: home
---
2 changes: 1 addition & 1 deletion content/_index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
menu:
main:
name: Home
name: 主页
weight: 1
params:
icon: home
Expand Down
12 changes: 12 additions & 0 deletions content/page/about/index.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title : 'About'
date : 2024-04-15T14:31:20+08:00
draft : false
slug : "about"
menu:
main:
weight: 3
params:
icon: user
---
:sob:
2 changes: 1 addition & 1 deletion content/page/about/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title : 'About'
title : '关于'
date : 2024-04-15T14:31:20+08:00
draft : false
slug : "about"
Expand Down
11 changes: 11 additions & 0 deletions content/page/archives/index.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: "Archives"
date: 2022-03-06
layout: "archives"
slug: "archives"
menu:
main:
weight: 2
params:
icon: archives
---
2 changes: 1 addition & 1 deletion content/page/archives/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Archives"
title: "文章"
date: 2022-03-06
layout: "archives"
slug: "archives"
Expand Down
33 changes: 33 additions & 0 deletions content/page/links/index.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: Links
links:
- title: GitHub
description: GitHub is the world's largest software development platform.
website: https://github.com
image: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
menu:
main:
weight: 4
params:
icon: link

comments: false
---

To use this feature, add `links` section to frontmatter.

This page's frontmatter:

```yaml
links:
- title: GitHub
description: GitHub is the world's largest software development platform.
website: https://github.com
image: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
- title: TypeScript
description: TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.
website: https://www.typescriptlang.org
image: ts-logo-128.jpg
```
`image` field accepts both local and external images.
2 changes: 1 addition & 1 deletion content/page/links/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Links
title: 链接
links:
- title: GitHub
description: GitHub is the world's largest software development platform.
Expand Down
13 changes: 13 additions & 0 deletions content/page/search/index.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: "Search"
slug: "search"
layout: "search"
outputs:
- html
- json
menu:
main:
weight: 3
params:
icon: search
---
2 changes: 1 addition & 1 deletion content/page/search/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Search"
title: "搜索"
slug: "search"
layout: "search"
outputs:
Expand Down
8 changes: 8 additions & 0 deletions content/post/Migrate-from-Hexo-to-Hugo/index.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title : 'Migrate From Hexo to Hugo'
date : 2024-04-17T16:54:25+08:00
draft : true
url : ed1956f8
hasCJKLanguage : false
---
I used to use hexo-theme-next, it is fancy but slow.
1 change: 1 addition & 0 deletions content/post/My-First-Post/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
+++
title = 'My First Post'
date = 2024-04-14T21:17:32+08:00
draft = true
+++

> NOTE
Expand Down

0 comments on commit 5e0a005

Please sign in to comment.