add more posts and plugins
This commit is contained in:
1 parent
b73701b71c
commit
4a7a92a332
8 files changed
+1134
-126
No files matched your search
Generated
+820
File diff suppressed because it is too large.
Load diff
@@ -4,8 +4,11 @@
|
|||||||
"description": "My journey through Chinese language",
|
"description": "My journey through Chinese language",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"hyperscript": "^2.0.2",
|
||||||
"jstransformer-markdown-it": "^2.1.0",
|
"jstransformer-markdown-it": "^2.1.0",
|
||||||
"p-iteration": "^1.1.8",
|
"p-iteration": "^1.1.8",
|
||||||
|
"pug": "^2.0.4",
|
||||||
|
"showdown": "^1.9.0",
|
||||||
"webpack": "^4.39.1",
|
"webpack": "^4.39.1",
|
||||||
"webpack-merge": "^4.2.1"
|
"webpack-merge": "^4.2.1"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"name": "custom-render",
|
||||||
|
"description": "Cogear.JS custom Webpack plugin.",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"author": "Pacharapol Withayasakpunt<patarapolw@gmail.com>",
|
||||||
|
"homepage": "https://github.com/patarapolw/custom-webpack",
|
||||||
|
"main": "./plugin.js"
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
const pug = require("pug");
|
||||||
|
const showdown = require("showdown");
|
||||||
|
const h = require("hyperscript");
|
||||||
|
|
||||||
|
class Markdown {
|
||||||
|
constructor() {
|
||||||
|
this.converter = new showdown.Converter({
|
||||||
|
parseImgDimensions: true
|
||||||
|
});
|
||||||
|
this.converter.setFlavor("github");
|
||||||
|
this.converter.addExtension({
|
||||||
|
type: "lang",
|
||||||
|
filter(text) {
|
||||||
|
const rowRegex = /(?:(?:^|\r?\n)(?:\| )?(?:(?:.* \| )+.+)*(?:.* \| )+.+(?: \|)?(?:$|\r?\n))+/m;
|
||||||
|
|
||||||
|
text = text.replace(rowRegex, (p0) => {
|
||||||
|
return h("table.table", p0.split("\n").map((pi) => {
|
||||||
|
pi = pi.trim().replace(/^|/, "").replace(/|$/, "")
|
||||||
|
|
||||||
|
return h("tr", pi.split(" | ").map((x) => x.trim()).map((qi) => {
|
||||||
|
return h("td", qi);
|
||||||
|
}))
|
||||||
|
})).outerHTML;
|
||||||
|
});
|
||||||
|
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
md2html(md) {
|
||||||
|
return this.converter.makeHtml(md);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const md = new Markdown();
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
apply() {
|
||||||
|
cogear.on("preload.page.parse", (page) => {
|
||||||
|
if (page.format === ".pug") {
|
||||||
|
page.__content = pug.compile(page.__content || "", {
|
||||||
|
filters: {
|
||||||
|
markdown: (text) => {
|
||||||
|
return md.md2html(text)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})()
|
||||||
|
page.format = ".html";
|
||||||
|
} else if (page.format === ".md") {
|
||||||
|
page.__content = md.md2html(page.__content || "")
|
||||||
|
page.format = ".html";
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,143 @@
|
|||||||
|
---
|
||||||
|
title: "千字文"
|
||||||
|
date: "2019-08-10"
|
||||||
|
tags:
|
||||||
|
- 千字文
|
||||||
|
- 汉字
|
||||||
|
---
|
||||||
|
|
||||||
|
1
|
||||||
|
天地玄黃,宇宙洪荒。
|
||||||
|
日月盈昃,辰宿列張。
|
||||||
|
寒來暑往,秋收冬藏。
|
||||||
|
閏餘成歲,律呂調陽。
|
||||||
|
雲騰致雨,露結為霜。
|
||||||
|
金生麗水,玉出崑岡。
|
||||||
|
劍號巨闕,珠稱夜光。
|
||||||
|
果珍李柰,菜重芥薑。
|
||||||
|
海咸河淡,鱗潛羽翔。
|
||||||
|
2
|
||||||
|
龍師火帝,鳥官人皇。
|
||||||
|
始制文字,乃服衣裳。
|
||||||
|
推位讓國,有虞陶唐。
|
||||||
|
弔民伐罪,周發殷湯。
|
||||||
|
坐朝問道,垂拱平章。
|
||||||
|
愛育黎首,臣伏戎羌。
|
||||||
|
遐邇一體,率賓歸王。
|
||||||
|
鳴鳳在竹,白駒食場。
|
||||||
|
化被草木,賴及萬方。
|
||||||
|
|
||||||
|
===
|
||||||
|
|
||||||
|
3
|
||||||
|
蓋此身髮,四大五常。
|
||||||
|
恭惟鞠養,豈敢毀傷。
|
||||||
|
女慕貞絜,男效才良。
|
||||||
|
知過必改,得能莫忘。
|
||||||
|
罔談彼短,靡恃己長。
|
||||||
|
信使可覆,器欲難量。
|
||||||
|
墨悲絲染,詩讚羔羊。
|
||||||
|
景行維賢,克念作聖。
|
||||||
|
德建名立,形端表正。
|
||||||
|
空谷傳聲,虛堂習聽。
|
||||||
|
禍因惡積,福緣善慶。
|
||||||
|
尺璧非寶,寸陰是競。
|
||||||
|
資父事君,曰嚴與敬。
|
||||||
|
孝當竭力,忠則盡命。
|
||||||
|
臨深履薄,夙興溫凊。
|
||||||
|
似蘭斯馨,如松之盛。
|
||||||
|
川流不息,淵澄取映。
|
||||||
|
容止若思,言辭安定。
|
||||||
|
篤初誠美,慎終宜令。
|
||||||
|
榮業所基,藉甚無竟。
|
||||||
|
學優登仕,攝職從政。
|
||||||
|
存以甘棠,去而益詠。
|
||||||
|
樂殊貴賤,禮別尊卑。
|
||||||
|
上和下睦,夫唱婦隨。
|
||||||
|
外受傅訓,入奉母儀。
|
||||||
|
諸姑伯叔,猶子比兒。
|
||||||
|
孔懷兄弟,同氣連根。
|
||||||
|
交友投分,切磨箴規。
|
||||||
|
仁慈隱惻,造次弗離。
|
||||||
|
節義廉退,顛沛匪虧。
|
||||||
|
性靜情逸,心動神疲。
|
||||||
|
守真志滿,逐物意移。
|
||||||
|
堅持雅操,好爵自縻。
|
||||||
|
4
|
||||||
|
都邑華夏,東西二京。
|
||||||
|
背邙面洛,浮渭據涇。
|
||||||
|
宮殿盤郁,樓觀飛驚。
|
||||||
|
圖寫禽獸,畫彩仙靈。
|
||||||
|
丙舍傍啟,甲帳對楹。
|
||||||
|
肆筵設席,鼓瑟吹笙。
|
||||||
|
升階納陛,弁轉疑星。
|
||||||
|
右通廣內,左達承明。
|
||||||
|
既集墳典,亦聚群英。
|
||||||
|
杜稿鍾隸,漆書壁經。
|
||||||
|
府羅將相,路俠槐卿。
|
||||||
|
戶封八縣,家給千兵。
|
||||||
|
高冠陪輦,驅轂振纓。
|
||||||
|
世祿侈富,車駕肥輕。
|
||||||
|
策功茂實,勒碑刻銘。
|
||||||
|
磻溪伊尹,佐時阿衡。
|
||||||
|
奄宅曲阜,微旦孰營。
|
||||||
|
桓公匡合,濟弱扶傾。
|
||||||
|
綺回漢惠,說感武丁。
|
||||||
|
俊乂密勿,多士寔寧。
|
||||||
|
晉楚更霸,趙魏困橫。
|
||||||
|
假途滅虢,踐土會盟。
|
||||||
|
何遵約法,韓弊煩刑。
|
||||||
|
起翦頗牧,用軍最精。
|
||||||
|
宣威沙漠,馳譽丹青。
|
||||||
|
九州禹跡,百郡秦并。
|
||||||
|
岳宗泰岱,禪主云亭。
|
||||||
|
雁門紫塞,雞田赤城。
|
||||||
|
昆池碣石,鉅野洞庭。
|
||||||
|
曠遠綿邈,岩岫杳冥。
|
||||||
|
5
|
||||||
|
治本於農,務茲稼穡。
|
||||||
|
俶載南畝,我藝黍稷。
|
||||||
|
稅熟貢新,勸賞黜陟。
|
||||||
|
孟軻敦素,史魚秉直。
|
||||||
|
庶幾中庸,勞謙謹敕。
|
||||||
|
聆音察理,鑒貌辨色。
|
||||||
|
貽厥嘉猷,勉其祗植。
|
||||||
|
省躬譏誡,寵增抗極。
|
||||||
|
殆辱近恥,林皋幸即。
|
||||||
|
兩疏見機,解組誰逼。
|
||||||
|
索居閒處,沉默寂寥。
|
||||||
|
求古尋論,散慮逍遙。
|
||||||
|
欣奏累遣,慼謝歡招。
|
||||||
|
渠荷的歷,園莽抽條。
|
||||||
|
枇杷晚翠,梧桐蚤凋。
|
||||||
|
陳根委翳,落葉飄搖。
|
||||||
|
游鵾獨運,凌摩絳霄。
|
||||||
|
6
|
||||||
|
耽讀玩市,寓目囊箱。
|
||||||
|
易輶攸畏,屬耳垣牆。
|
||||||
|
具膳餐飯,適口充腸。
|
||||||
|
飽飫烹宰,飢厭糟糠。
|
||||||
|
親戚故舊,老少異糧。
|
||||||
|
妾御績紡,待巾帷房。
|
||||||
|
紈扇圓潔,銀燭煒煌。
|
||||||
|
晝眠夕寐,藍筍象床。
|
||||||
|
弦歌酒宴,接杯舉觴。
|
||||||
|
矯手頓足,悅豫且康。
|
||||||
|
嫡後嗣續,祭祀烝嘗。
|
||||||
|
稽顙再拜,悚懼恐惶。
|
||||||
|
箋牒簡要,顧答審詳。
|
||||||
|
骸垢想浴,執熱願涼。
|
||||||
|
驢騾犢特,駭躍超驤。
|
||||||
|
誅斬賊盜,捕獲叛亡。
|
||||||
|
7
|
||||||
|
布射僚丸,嵇琴阮嘯。
|
||||||
|
恬筆倫紙,鈞巧任釣。
|
||||||
|
釋紛利俗,竝皆佳妙。
|
||||||
|
毛施淑姿,工顰妍笑。
|
||||||
|
年矢每催,曦暉朗曜。
|
||||||
|
璿璣懸斡,晦魄環照。
|
||||||
|
指薪修祜,永綏吉劭。
|
||||||
|
矩步引領,俯仰廊廟。
|
||||||
|
束帶矜庄,徘徊瞻眺。
|
||||||
|
孤陋寡聞,愚蒙等誚。
|
||||||
|
謂語助者,焉哉乎也。
|
||||||
@@ -37,40 +37,16 @@ tags:
|
|||||||
| ===
|
| ===
|
||||||
|
|
||||||
.w-100.mt-3
|
.w-100.mt-3
|
||||||
table.table
|
:markdown
|
||||||
colgroup
|
宇宙 | yǔzhòu | universe / cosmos
|
||||||
col(style="width: 6em")
|
宇航 | yǔháng | space flight
|
||||||
col
|
宇航员 | yǔhángyuán | astronaut
|
||||||
col
|
宇宙飞船 | yǔzhòufēichuán | spacecraft
|
||||||
tr
|
防洪 | fánghóng | flood control / flood prevention
|
||||||
td 宇宙
|
山洪 | shānhóng | mountain flash flood / mountain torrent
|
||||||
td yǔzhòu
|
荒 | huāng | desolate / shortage / scarce / out of practice / absurd / uncultivated / to neglect
|
||||||
td universe / cosmos
|
荒野 | huāngyě | wilderness
|
||||||
tr
|
style.
|
||||||
td 宇航
|
table td:first-child {
|
||||||
td yǔháng
|
width: 10em;
|
||||||
td space flight
|
}
|
||||||
tr
|
|
||||||
td 宇航员
|
|
||||||
td yǔhángyuán
|
|
||||||
td astronaut
|
|
||||||
tr
|
|
||||||
td 宇宙飞船
|
|
||||||
td yǔzhòufēichuán
|
|
||||||
td spacecraft
|
|
||||||
tr
|
|
||||||
td 防洪
|
|
||||||
td fánghóng
|
|
||||||
td flood control / flood prevention
|
|
||||||
tr
|
|
||||||
td 山洪
|
|
||||||
td shānhóng
|
|
||||||
td mountain flash flood / mountain torrent
|
|
||||||
tr
|
|
||||||
td 荒
|
|
||||||
td huāng
|
|
||||||
td desolate / shortage / scarce / out of practice / absurd / uncultivated / to neglect
|
|
||||||
tr
|
|
||||||
td 荒野
|
|
||||||
td huāngyě
|
|
||||||
td wilderness
|
|
||||||
@@ -37,92 +37,29 @@ tags:
|
|||||||
| ===
|
| ===
|
||||||
|
|
||||||
.w-100.mt-3
|
.w-100.mt-3
|
||||||
table.table
|
:markdown
|
||||||
colgroup
|
盈利 | yínglì | profit / gain
|
||||||
col(style="width: 7em")
|
轻盈 | qīngyíng | graceful / lithe / light and graceful / lighthearted / relaxed
|
||||||
col
|
盈亏 | yíngkuī | profit and loss / waxing and waning
|
||||||
col
|
昃 | zè | afternoon / decline
|
||||||
tr
|
星辰 | xīngchén | stars
|
||||||
td 盈利
|
时辰 | shíchen | time / one of the 12 two-hour periods of the day
|
||||||
td yínglì
|
北辰 | Běichén | Polaris / North Star
|
||||||
td profit / gain
|
诞辰 | dànchén | birthday
|
||||||
tr
|
生辰 | shēngchén | birthday
|
||||||
td 轻盈
|
宿舍 | sùshè | dormitory / dorm room / living quarters / hostel / CL: 間|间
|
||||||
td qīngyíng
|
住宿 | zhùsù | to stay at / lodging / accommodation
|
||||||
td graceful / lithe / light and graceful / lighthearted / relaxed
|
列表 | lièbiǎo | list
|
||||||
tr
|
系列 | xìliè | series / set
|
||||||
td 盈亏
|
列 | liè | to arrange / to line up / file / series / (in data tables) column / (Tw) row
|
||||||
td yíngkuī
|
序列 | xùliè | sequence
|
||||||
td profit and loss / waxing and waning
|
下列 | xiàliè | following
|
||||||
tr
|
列车 | lièchē | (railway) train
|
||||||
td 昃
|
张 | zhāng | to open up / to spread / sheet of paper / classifier for flat objects, sheet / classifier for votes
|
||||||
td zè
|
紧张 (緊張) | jǐnzhāng | nervous / keyed up / intense / tense / strained / in short supply / scarce / CL: 陣|阵
|
||||||
td afternoon / decline
|
主张 | zhǔzhāng | to advocate / to stand for / view / position / stand / proposition / viewpoint / assertion / CL: 個|个
|
||||||
tr
|
扩张 (擴張) | kuòzhāng | expansion / dilation / to expand (e.g. one's power or influence) / to broaden
|
||||||
td 星辰
|
style.
|
||||||
td xīngchén
|
table td:first-child {
|
||||||
td stars
|
width: 10em;
|
||||||
tr
|
}
|
||||||
td 时辰
|
|
||||||
td shíchen
|
|
||||||
td time / one of the 12 two-hour periods of the day
|
|
||||||
tr
|
|
||||||
td 北辰
|
|
||||||
td Běichén
|
|
||||||
td Polaris / North Star
|
|
||||||
tr
|
|
||||||
td 诞辰
|
|
||||||
td dànchén
|
|
||||||
td birthday
|
|
||||||
tr
|
|
||||||
td 生辰
|
|
||||||
td shēngchén
|
|
||||||
td birthday
|
|
||||||
tr
|
|
||||||
td 宿舍
|
|
||||||
td sùshè
|
|
||||||
td dormitory / dorm room / living quarters / hostel / CL: 間|间
|
|
||||||
tr
|
|
||||||
td 住宿
|
|
||||||
td zhùsù
|
|
||||||
td to stay at / lodging / accommodation
|
|
||||||
tr
|
|
||||||
td 列表
|
|
||||||
td lièbiǎo
|
|
||||||
td list
|
|
||||||
tr
|
|
||||||
td 系列
|
|
||||||
td xìliè
|
|
||||||
td series / set
|
|
||||||
tr
|
|
||||||
td 列
|
|
||||||
td liè
|
|
||||||
td to arrange / to line up / file / series / (in data tables) column / (Tw) row
|
|
||||||
tr
|
|
||||||
td 序列
|
|
||||||
td xùliè
|
|
||||||
td sequence
|
|
||||||
tr
|
|
||||||
td 下列
|
|
||||||
td xiàliè
|
|
||||||
td following
|
|
||||||
tr
|
|
||||||
td 列车
|
|
||||||
td lièchē
|
|
||||||
td (railway) train
|
|
||||||
tr
|
|
||||||
td 张
|
|
||||||
td zhāng
|
|
||||||
td to open up / to spread / sheet of paper / classifier for flat objects, sheet / classifier for votes
|
|
||||||
tr
|
|
||||||
td 紧张 (緊張)
|
|
||||||
td jǐnzhāng
|
|
||||||
td nervous / keyed up / intense / tense / strained / in short supply / scarce / CL: 陣|阵
|
|
||||||
tr
|
|
||||||
td 主张
|
|
||||||
td zhǔzhāng
|
|
||||||
td to advocate / to stand for / view / position / stand / proposition / viewpoint / assertion / CL: 個|个
|
|
||||||
tr
|
|
||||||
td 扩张 (擴張)
|
|
||||||
td kuòzhāng
|
|
||||||
td expansion / dilation / to expand (e.g. one's power or influence) / to broaden
|
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
---
|
||||||
|
title: "千字文 - 3"
|
||||||
|
date: "2019-08-12"
|
||||||
|
tags:
|
||||||
|
- 千字文
|
||||||
|
- 汉字
|
||||||
|
---
|
||||||
|
|
||||||
|
.w-100.mt-3: h3.text-center 寒來暑往,秋收冬藏。
|
||||||
|
.w-100
|
||||||
|
figure.d-inline-block
|
||||||
|
img(src="https://www.mdbg.net/chinese/rsc/img/stroke_anim/23506.gif" height=100)
|
||||||
|
figcaption.text-center han2
|
||||||
|
figure.d-inline-block
|
||||||
|
img(src="https://www.mdbg.net/chinese/rsc/img/stroke_anim/20358.gif" height=100)
|
||||||
|
figcaption.text-center lai2
|
||||||
|
figure.d-inline-block
|
||||||
|
img(src="https://www.mdbg.net/chinese/rsc/img/stroke_anim/26257.gif" height=100)
|
||||||
|
figcaption.text-center shu3
|
||||||
|
figure.d-inline-block
|
||||||
|
img(src="https://www.mdbg.net/chinese/rsc/img/stroke_anim/24448.gif" height=100)
|
||||||
|
figcaption.text-center wang3
|
||||||
|
.w-100
|
||||||
|
figure.d-inline-block
|
||||||
|
img(src="https://www.mdbg.net/chinese/rsc/img/stroke_anim/31179.gif" height=100)
|
||||||
|
figcaption.text-center qiu1
|
||||||
|
figure.d-inline-block
|
||||||
|
img(src="https://www.mdbg.net/chinese/rsc/img/stroke_anim/25910.gif" height=100)
|
||||||
|
figcaption.text-center shou1
|
||||||
|
figure.d-inline-block
|
||||||
|
img(src="https://www.mdbg.net/chinese/rsc/img/stroke_anim/20908.gif" height=100)
|
||||||
|
figcaption.text-center dong1
|
||||||
|
figure.d-inline-block
|
||||||
|
img(src="https://www.mdbg.net/chinese/rsc/img/stroke_anim/34255.gif" height=100)
|
||||||
|
figcaption.text-center cang2
|
||||||
|
|
||||||
|
| ===
|
||||||
|
|
||||||
|
.w-100.mt-3
|
||||||
|
:markdown
|
||||||
|
寒假 | hánjià | winter vacation
|
||||||
|
伤寒 (傷寒) | shānghán | typhoid
|
||||||
|
严寒 | yánhán | bitter cold / severe winter
|
||||||
|
暑期 | shǔqī | summer vacation time
|
||||||
|
暑假 | shǔjià | summer vacation / CL: 個|个
|
||||||
|
避暑 | bìshǔ | to be away for the summer holidays / to spend a holiday at a summer resort / to prevent sunstroke
|
||||||
|
前往 | qiánwǎng | to leave for / to proceed towards / to go
|
||||||
|
往往 | wǎngwǎng | usually / in many cases / more often than not
|
||||||
|
往年 | wǎngnián | in former years / in previous years
|
||||||
|
往返 | wǎngfǎn | to go back and forth / to go to and fro / round trip
|
||||||
|
过往 (過往) | guòwǎng | to come and go / to have friendly relations with / in the past / previous
|
||||||
|
交往 | jiāowǎng | to associate (with) / to have contact (with) / to hang out (with) / to date / (interpersonal) relationship / association / contact
|
||||||
|
以往 | yǐwǎng | in the past / formerly
|
||||||
|
往事 | wǎngshì | past events / former happenings
|
||||||
|
秋季 | qiūjì | autumn / fall
|
||||||
|
春秋 | chūnqiū | spring and autumn / four seasons / year / a person's age / annals (used in book titles)
|
||||||
|
冬季 | dōngjì | winter
|
||||||
|
冬天 | dōngtiān | winter / CL: 個|个
|
||||||
|
春夏秋冬 | chūnxiàqiūdōng | the four seasons / spring, summer, autumn and winter
|
||||||
|
冬瓜 | dōngguā | wax gourd (Cucurbitaceae, Benincasa hispida) / white gourd / white hairy melon / Chinese squash
|
||||||
|
收藏 | shōucáng | to hoard / to collect / collection / to bookmark (Internet)
|
||||||
|
style.
|
||||||
|
table td:first-child {
|
||||||
|
width: 10em;
|
||||||
|
}
|
||||||
Reference in new issue
Block a user