{"id":17793301,"url":"https://github.com/jcbhmr/typst-docs","last_synced_at":"2025-04-02T02:18:18.361Z","repository":{"id":219980264,"uuid":"750424823","full_name":"jcbhmr/typst-docs","owner":"jcbhmr","description":"📗 Typst documentation in more languages","archived":false,"fork":false,"pushed_at":"2024-04-03T17:34:18.000Z","size":34049,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-07T17:15:36.478Z","etag":null,"topics":["chinese","docs","documentation","github-pages","internationalization","translation","typst","vitepress","website"],"latest_commit_sha":null,"homepage":"https://jcbhmr.me/typst-docs","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jcbhmr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-30T16:12:33.000Z","updated_at":"2024-04-03T19:22:06.000Z","dependencies_parsed_at":"2024-03-11T16:51:50.184Z","dependency_job_id":"4ce58d71-ef42-4b6f-b875-78380b8ca29a","html_url":"https://github.com/jcbhmr/typst-docs","commit_stats":null,"previous_names":["jcbhmr/typst-docs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcbhmr%2Ftypst-docs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcbhmr%2Ftypst-docs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcbhmr%2Ftypst-docs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcbhmr%2Ftypst-docs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jcbhmr","download_url":"https://codeload.github.com/jcbhmr/typst-docs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246741117,"owners_count":20826067,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chinese","docs","documentation","github-pages","internationalization","translation","typst","vitepress","website"],"created_at":"2024-10-27T11:05:37.216Z","updated_at":"2025-04-02T02:18:18.253Z","avatar_url":"https://github.com/jcbhmr.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=center\u003e\n  \u003cb\u003eYou're probably looking for \u003ca href=\"https://typst.community/typst-docs/\"\u003etypst.community/typst-docs\u003c/a\u003e\u003c/b\u003e\n\u003c/p\u003e\n\n## Development\n\n![Vite](https://img.shields.io/static/v1?style=for-the-badge\u0026message=Vite\u0026color=646CFF\u0026logo=Vite\u0026logoColor=FFFFFF\u0026label=)\n![Vue.js](https://img.shields.io/static/v1?style=for-the-badge\u0026message=Vue.js\u0026color=222222\u0026logo=Vue.js\u0026logoColor=4FC08D\u0026label=)\n![Markdown](https://img.shields.io/static/v1?style=for-the-badge\u0026message=Markdown\u0026color=000000\u0026logo=Markdown\u0026logoColor=FFFFFF\u0026label=)\n![Rust](https://img.shields.io/static/v1?style=for-the-badge\u0026message=Rust\u0026color=000000\u0026logo=Rust\u0026logoColor=FFFFFF\u0026label=)\n![Docs.rs](https://img.shields.io/static/v1?style=for-the-badge\u0026message=Docs.rs\u0026color=000000\u0026logo=Docs.rs\u0026logoColor=FFFFFF\u0026label=)\n\n### Add a new language\n\n1. Run `git submodule add https://github.com/typst/typst.git $LANGUAGE_TAG` where `$LANGUAGE_TAG` is your new BCP-47 language tag to add a new patched submodule instance of Typst\n2. Update [`run.js`](run.js) and [`[route].paths.ts`](./[route].paths.ts) `languageTags` list to add your new language tag\n3. Create a new file in `.vitepress/config/` with the file name `${languageTag}.ts` where `${languageTag}` is your new language tag\n4. Import and add that new language configuration to `.vitepress/config/index.ts`\n5. Run `npm run diff` to save any changes you make to the submodule that you added in step 1\n6. Add a new language card to [`index.md`](index.md)\n\n### Edit the documentation content\n\nYou should run `npm run apply` with the submodule tree initialized and present (`git submodule update --init --recursive` if you didn't clone with `--recursive`) before doing any documentation editing. This `npm run apply` will use `git apply` to apply the patch files from `patches/*.patch` to the corresponding submodule. Do this before editing so that you're editing the patched version of the submodule. Then after you've finished editing the submodule use `npm run diff` to save the diff of all the changes made to the submodule backc into `patches/*.patch`. Then commit the `patches/*.patch` files.\n\nYou can run `npm run generate` with the Rust toolchain installed to compile \u0026 build the `typst-docs` crate CLI which spits out the JSON docs structure into `pages.*.json` for each known and tracked language variant. This must be done manually and does take quite a while to compile. After finishing the generation **add and commit the generated file** so other users in the future can edit the VitePress site without compiling `typst-docs` themselves.\n\n**TL;DR:**\n\n1. Clone the repository and `npm install`\n3. `npm run apply` to apply `patches/*.patch` work from previous authors\n4. Edit the submodule contents\n5. `npm run generate` to generate the `pages.*.json`\n6. `npm run dev` to make sure it works\n7. Commit and push!\n\n**🙌 We need you! ❤️** Translations and localization can always be improved. If you spot any errors or want to add more translations, please do!\n\nYou can use `git -C \u003cdir\u003e ...` to emulate `(cd \u003cdir\u003e \u0026\u0026 git ...)` to perform Git operations in the submodule. For example: `git -C zh reset --hard`.\n\n### Edit the VitePress site\n\n[![Open in Codeflow](https://developer.stackblitz.com/img/open_in_codeflow.svg)](https://pr.new/https://github.com/typst-community/typst-docs)\n\nSomeone should already have been nice enough to generate \u0026 commit a `pages.*.json` for a particular language. `[route].paths.ts` will generate all the per-page JSON data that is then routed to a specific component in `[route].md`. You can find these components in `.vitepress/theme/components/`. There's a different component for each `kind` of page body listed in the `pages.*.json`.\n\n**🙌 We need you! ❤️** Some of the page types need some love to expose more of the JSON-provided information in pretty HTML. Particularily `Func.vue`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcbhmr%2Ftypst-docs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjcbhmr%2Ftypst-docs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcbhmr%2Ftypst-docs/lists"}