Closed jsun969 closed 1 year ago
Name | Link |
---|---|
Latest commit | c64240c4801844663d84fc637a4d71bf0067d631 |
Latest deploy log | https://app.netlify.com/sites/jest-preview-library/deploys/63ae83efce5aff0009be4d90 |
Deploy Preview | https://deploy-preview-277--jest-preview-library.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
To fix the problem: The SVG (or all static files) cannot be loaded in i18n dev mode
We must refactor the static files to src={require("...")}
or src={useBaseUrl("/foo")}
Docs: https://docusaurus.io/docs/static-assets#referencing-your-static-asset
I think it's a big refactor and unnessary. What do you think about it?
That's an awesome PR. I will take a look very soon. Thank you very much for your support @jsun969 <3
Best new year gift ever <3
Thank you @jsun969 for your support. Happy new year <3
Summary/ Motivation (TLDR;)
Initialize i18n for docusaurus docs. Add a little bit Chinese translation (for homepage and Introduction docs).
Problem
The SVG (or all static files) cannot be loaded in i18n dev modeOh it works fine on production. That's good xDhttps://github.com/jsun969/jest-preview/blob/c64240c4801844663d84fc637a4d71bf0067d631/website/src/components/HomepageFeatures/index.tsx#L12
How to add Vietnamese translation
For homepage
Modify
/website/i18n/vi-VN/code.json
Line2-Line64 (where id start withhome.
)For footer and navbar
Modify files in
/website/i18n/vi-VN/docusaurus-theme-classic
For docs
Modify
/website/i18n/vi-VN/docusaurus-plugin-content-docs/current.json
for directoryThen see i18n - Tutorial | Docusaurus #translate-markdown-files
Notice
The
tagline
in docusaurus config is no longer used for homepage subtitle.