From f4ebaea63de406ed83cc941cd51910499f6a7edc Mon Sep 17 00:00:00 2001 From: Kirby Wu Date: Mon, 15 Mar 2021 18:01:09 +0800 Subject: [PATCH] update README --- README.md | 36 ++---------------------------------- 1 file changed, 2 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index 5d9aefe..5ecc7a4 100644 --- a/README.md +++ b/README.md @@ -96,41 +96,9 @@ watch.init accepts config with following options: - `assets`: array of node module names to be copied to `static/assets` folder. **not stable feature.** -## i18n +## Additional information -prepare i18n content under langauges folder (e.g., `en` or `zh-tw`) in `locales` folder, in `yaml` format. Filename maps to `namespace` concept in `i18next`. - -i18n data can be used in pug files via `i18n` function. e.g., - - div= i18n("my-key") - -will show `my-key` content defined in locale corresponding `default.yaml`: - - my-key: 這是我的鍵 - - -To use a namespaced key, add `:` before key. For example: - - div= i18n("new-ns:another-key") - -will access to `another-key` in `new-ns.yaml`. Be sure to add your namespace name in `ns` field of i18n option: - - "i18n": { ... "ns": ["default", "new-ns"] } - -additionally, use `intlbase` to wrap path with a i18n based relative path: - - a(href=intlbase('/faq')) - - -## Pug Include Path - -Use `@` to include files in modules: - - include @/ldview/dist/ldview.pug - -Use `@static` to include files under `static` folder: - - include @static/assets/sample.pug +`template` now use `@plotdb/srcbuild` for source building, and thus there are some additional features available and documented in `@plotdb/ssrcbuild`. Please refer to [@plotdb/srcbuild](https://github.com/plotdb/srcbuild) for more information. ## TODO