phineas-pta / co-han-van

collection of some classical chinese texts - tuyển tập 1 số tác phẩm hán văn cổ điển

Home Page:https://phineas-pta.github.io/co-han-van/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

License Eleventy Bulma GitHub last commit GitHub deployments GitHub code size GitHub repo size

cổ hán văn - classical chinese texts

collection of some classical chinese texts - tuyển tập 1 số tác phẩm hán văn cổ điển

DISCLAIMER: this is a hobby project, academic accuracy not guaranteed, also i do compilation not translation

any translations should be copyright-expired works found on internet

getting started with NodeJS:

npm install npm@latest -g
npm init -y
npm install @11ty/eleventy sass bulma @11ty/eleventy-navigation # node-sass depreciated
# npm update

ATTENTION: not same package @11ty/eleventyeleventy

it's a bit messy and not entirely in english 😅 so here a bit explaination about folder structure

  • all the html files are in src/ and i set a pathPrefix
  • CSS file is generated from SASS file in assets/ so u have to compile it 1st
  • JS files (not eleventyConfig) are in src/_misc/js-*.njk which include other JS from _includes/*.js 😅
  • folder structure go like this:
src/
├─ subject-1/
│  ├─ book-1/
│  │  ├─ chapter-1.html
│  │  ├─ chapter-2.html
│ ...
│  ├─ book-2/
│  │  ├─ chapter-1.html
│  │  ├─ chapter-2.html
│ ...
├─ subject-2/
│  ├─ book-3/
│ ...

using 11ty:

  • convert SASS to CSS: npx sass --no-source-map assets (run 1st to get CSS file)
  • && sucks with windows powershell
  • build with npx @11ty/eleventy
  • or directly serve with npx @11ty/eleventy --serve
  • with sub dir: add --pathprefix yolo

docker ?? no option to change host

additional setup:

UKaiHK font: originally .ttc → use FontForge to extract .ttf № 2 (HK)

copy raw text with ctext api like https://ctext.org/plugins/textexport/#en||ctp:analects/xue-er

misc

About

collection of some classical chinese texts - tuyển tập 1 số tác phẩm hán văn cổ điển

https://phineas-pta.github.io/co-han-van/

License:The Unlicense


Languages

Language:Nunjucks 29.1%Language:JavaScript 28.6%Language:Python 25.1%Language:Sass 11.6%Language:Dockerfile 5.1%Language:HTML 0.6%