Skip to content

Commit 75d2d8a

Browse files
committed
change website domain
1 parent 79ff45c commit 75d2d8a

3 files changed

Lines changed: 5 additions & 7 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Hexo + Acorn<br>
22
Namesilo Domain + Cloudflare CDN
33

4-
[简体中文站](https://utclc.top) / [繁体中文站](https://cht.utclc.top)
4+
[简体中文站](https://chs.utclc.top) / [繁体中文站](https://cht.utclc.top)
55

66
仓库收到 Push 后自动触发 Github Actions 部署到 Github Pages<br>
77
同时触发另一个 Action 运行 Python 运行 `traditionalize.py`<br>

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ timezone: 'Asia/Hong_Kong'
1313

1414
# URL
1515
## Set your site url here. For example, if you use GitHub Page, set url as 'https://username.github.io/project'
16-
url: https://utclc.top
16+
url: https://chs.utclc.top
1717
permalink: :title/
1818
permalink_defaults:
1919
pretty_urls:

traditionalize.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
skips = ["node_modules", "public", "cht_replace"]
55
replaces = {
66
"https://github.com/UTCLC/utclc.github.io":"https://github.com/UTCLC/website_cht",
7-
"utclc.top":"cht.utclc.top",
8-
r'<ul class="list-inline">你现在正在浏览的是简体中文站。<br>点击前往<a class="font-w-bold" href="https://cht.cht.utclc.top" target="_self">繁体中文站</a>(实验性)。</ul>':
9-
r'<ul class="list-inline">你現在正在繁體中文站,此站點為實驗性,可能會有潛在的問題。<br>請透過 <a class="font-w-bold" href="https://github.com/UTCLC/website_cht/issues" target="_blank">Github Issue</a> 回報你遇到的錯誤。<br>点击返回<a class="font-w-bold" href="https://utclc.top" target="_self">簡體中文站</a>。</ul>',
7+
"chs.utclc.top":"cht.utclc.top",
8+
r'<ul class="list-inline">你现在正在浏览的是简体中文站。<br>点击前往<a class="font-w-bold" href="https://cht.utclc.top" target="_self">繁体中文站</a>(实验性)。</ul>':
9+
r'<ul class="list-inline">你現在正在繁體中文站,此站點為實驗性,可能會有潛在的問題。<br>請透過 <a class="font-w-bold" href="https://github.com/UTCLC/website_cht/issues" target="_blank">Github Issue</a> 回報你遇到的錯誤。<br>点击返回<a class="font-w-bold" href="https://chs.utclc.top" target="_self">簡體中文站</a>。</ul>',
1010
"zh-CN":"zh-TW",
1111
"zh-hans":"zh-hant",
1212
"扩展":"拓展",
@@ -51,8 +51,6 @@ def convert(directory):
5151
content = cc.convert(content)
5252
for replace in replaces_after.keys():
5353
content = content.replace(replace, replaces_after[replace])
54-
if (dirfile == "website.md"):
55-
content = content.replace("cht.utclc.top", "utclc.top")
5654
f.seek(0)
5755
f.write(content)
5856
except:

0 commit comments

Comments
 (0)