Show the whole 404 page in Russian for missing pages under /ru/
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 42/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- javascript
调研方向
Start with src/theme/NotFound/Content/index.js and i18n/ru/code.json to see how the 404 texts are already switched to Russian in the browser. Then find where the root 404.html is served for /ru/ paths and compare it with the built /ru/404.html. Done means a missing /ru/ URL shows a fully Russian page, with a Russian navbar, footer and links, and the choice between the two proposed approaches is recorded in the thread first.
由索引模型根据 Issue 内容生成。
描述
Problem
GitHub Pages serves only the root 404.html for every missing path, and ignores 404.html files in subfolders. The root 404.html belongs to the default (English) build, so a broken link under /ru/, for example https://docs.lsfusion.org/ru/404/ or https://docs.lsfusion.org/ru/development_manual/, opens the English 404 page. The Russian page that Docusaurus builds at https://docs.lsfusion.org/ru/404.html is never used for such links.
The texts of the 404 page are now switched to Russian on these paths: src/theme/NotFound/Content/index.js takes them from i18n/ru/code.json in the browser. The rest of the page still comes from the English build:
- the navbar and the footer are in English;
- their links lead to the English pages, for example
Learnleads to/instead of/ru/.
Possible solutions
- On a path under
/ru/, redirect the root 404 page to/ru/404.html. The page becomes fully Russian, but the address bar shows/ru/404.htmlinstead of the broken URL. - On a path under
/ru/, load/ru/404.htmland replace the current document with it, keeping the URL. The page becomes fully Russian and the broken URL stays visible, but this relies on non-standard behaviour of a Docusaurus page and needs to be checked again after Docusaurus upgrades.
- 主要语言
- JavaScript
- 星标
- 2
- 派生
- 4
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
lsfusion/docusaurus 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 45/100
lsfusion/docusaurus#13 ·
-
难度 4/5 3-5 天 新手友好度 25/100
lsfusion/docusaurus#12 ·
-
难度 4/5 3-5 天 新手友好度 35/100
lsfusion/docusaurus#2 ·
查看 lsfusion/docusaurus 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 65/100
维护者通常 1 天内回复
-
[Windows] Hidden title bar: a maximized window restored from minimized on a secondary monitor gets the primary monitor's work area as its client area可能已有人在做 @lijy91 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 67/100
libnativeapi/nativeapi#53 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
KilledByAPixel/LittleJS#188 ·
-
documentation
难度 1/5 1 小时以内 新手友好度 86/100
githubnext/gh-aw-workshop#6053 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 80/100
JuliusBrussee/caveman#1567 ·
维护者通常 1 天内回复