Skip to content

Commit 46c81f4

Browse files
committed
🚀 update book
1 parent 59c4543 commit 46c81f4

6 files changed

Lines changed: 161 additions & 0 deletions

File tree

.github/workflows/aliyun.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ jobs:
112112
mkdir public/http
113113
cp -r public.book.http/* public/http
114114
115+
- name: 复制 明日黄花 资源到 public
116+
run: |
117+
mkdir public/mrhh
118+
cp -r public.book.mrhh/* public/mrhh
119+
115120
- name: 删除服务上的旧文件
116121
uses: JimCronqvist/action-ssh@master
117122
with:

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ jobs:
110110
mkdir public/http
111111
cp -r public.book.http/* public/http
112112
113+
- name: 复制 明日黄花 资源到 public
114+
run: |
115+
mkdir public/mrhh
116+
cp -r public.book.mrhh/* public/mrhh
117+
113118
- name: set up python
114119
uses: actions/setup-python@v3
115120
with:

book.mrhh.toml

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# hugo server --minify --themesDir ... --baseURL=http://0.0.0.0:1313/theme/hugo-book/
2+
3+
baseURL = 'https://example.com/mrhh'
4+
title = '明日黄花'
5+
theme = 'hugo-book'
6+
publishdir = "public.book.mrhh"
7+
defaultContentLanguage = "zh"
8+
9+
# Book configuration
10+
disablePathToLower = true
11+
enableGitInfo = true
12+
13+
14+
# Needed for mermaid/katex shortcodes
15+
[markup]
16+
[markup.goldmark.renderer]
17+
unsafe = true
18+
19+
[markup.tableOfContents]
20+
startLevel = 1
21+
22+
# Multi-lingual mode config
23+
# There are different options to translate files
24+
# See https://gohugo.io/content-management/multilingual/#translation-by-filename
25+
# And https://gohugo.io/content-management/multilingual/#translation-by-content-directory
26+
[languages]
27+
[languages.zh]
28+
languageName = 'Chinese'
29+
contentDir = 'book.mrhh'
30+
weight = 1
31+
32+
[menu]
33+
# [[menu.before]]
34+
[[menu.before]]
35+
name = ""
36+
url = ""
37+
weight = 10
38+
39+
40+
#[[menu.after]]
41+
# name = "Hugo Themes"
42+
# url = "https://themes.gohugo.io/hugo-book/"
43+
# weight = 20
44+
45+
[params]
46+
# (Optional, default light) Sets color theme: light, dark or auto.
47+
# Theme 'auto' switches between dark and light modes based on browser/os preferences
48+
BookTheme = 'light'
49+
50+
# (Optional, default true) Controls table of contents visibility on right side of pages.
51+
# Start and end levels can be controlled with markup.tableOfContents setting.
52+
# You can also specify this parameter per page in front matter.
53+
BookToC = true
54+
55+
# (Optional, default none) Set the path to a logo for the book. If the logo is
56+
# /static/logo.png then the path would be logo.png
57+
# BookLogo = 'logo.png'
58+
59+
# (Optional, default none) Set leaf bundle to render as side menu
60+
# When not specified file structure and weights will be used
61+
# BookMenuBundle = '/menu'
62+
63+
# (Optional, default docs) Specify root page to render child pages as menu.
64+
# Page is resoled by .GetPage function: https://gohugo.io/functions/getpage/
65+
# For backward compatibility you can set '*' to render all sections to menu. Acts same as '/'
66+
BookSection = 'docs'
67+
68+
# Set source repository location.
69+
# Used for 'Last Modified' and 'Edit this page' links.
70+
BookRepo = 'https://github.com/xiaobinqt/xiaobinqt.github.io'
71+
72+
# (Optional, default 'commit') Specifies commit portion of the link to the page's last modified
73+
# commit hash for 'doc' page type.
74+
# Requires 'BookRepo' param.
75+
# Value used to construct a URL consisting of BookRepo/BookCommitPath/<commit-hash>
76+
# Github uses 'commit', Bitbucket uses 'commits'
77+
# BookCommitPath = 'commit'
78+
79+
# Enable "Edit this page" links for 'doc' page type.
80+
# Disabled by default. Uncomment to enable. Requires 'BookRepo' param.
81+
# Edit path must point to root directory of repo.
82+
BookEditPath = 'tree/main'
83+
84+
# Configure the date format used on the pages
85+
# - In git information
86+
# - In blog posts
87+
BookDateFormat = 'January 2, 2006'
88+
89+
# (Optional, default true) Enables search function with flexsearch,
90+
# Index is built on fly, therefore it might slowdown your website.
91+
# Configuration for indexing can be adjusted in i18n folder per language.
92+
BookSearch = true
93+
94+
# (Optional, default true) Enables comments template on pages
95+
# By default partals/docs/comments.html includes Disqus template
96+
# See https://gohugo.io/content-management/comments/#configure-disqus
97+
# Can be overwritten by same param in page frontmatter
98+
BookComments = true
99+
100+
# /!\ This is an experimental feature, might be removed or changed at any time
101+
# (Optional, experimental, default false) Enables portable links and link checks in markdown pages.
102+
# Portable links meant to work with text editors and let you write markdown without {{< relref >}} shortcode
103+
# Theme will print warning if page referenced in markdown does not exists.
104+
BookPortableLinks = true
105+
106+
# /!\ This is an experimental feature, might be removed or changed at any time
107+
# (Optional, experimental, default false) Enables service worker that caches visited pages and resources for offline use.
108+
BookServiceWorker = true
109+
110+
# /!\ This is an experimental feature, might be removed or changed at any time
111+
# (Optional, experimental, default false) Enables a drop-down menu for translations only if a translation is present.
112+
BookTranslatedOnly = false

book.mrhh/_index.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: 简介
3+
4+
type: docs
5+
---
6+
7+
# 明日黄花
8+
9+
## 缘起
10+
11+
TODO
12+
13+

book.mrhh/docs/001.old-friend.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
weight: 1
3+
4+
bookFlatSection: true
5+
6+
bookCollapseSection: false
7+
8+
bookToc: true
9+
10+
title: "001 纪念一位老友"
11+
---
12+
13+
# 纪念一位老友

book.mrhh/docs/002.japan-travel.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
weight: 2
3+
4+
bookFlatSection: true
5+
6+
bookCollapseSection: false
7+
8+
bookToc: true
9+
10+
title: "002 日本旅游"
11+
---
12+
13+
# 日本旅游

0 commit comments

Comments
 (0)