docusaurus国际化坑
发表于|更新于
|浏览量:
你不教训儿子,生活就一定会来教训他。——佚名
今天做apache-streampark文档国际化时踩到一个坑,其使用的框架docusaurus它支持多版本的管理,所以需要套一层current目录标识版本号
对应的pr:
https://github.com/apache/incubator-streampark-website/pull/256
就是将i18n/zh-CN/docusaurus-plugin-content-docs-community/移动到
i18n/zh-CN/docusaurus-plugin-content-docs-community/current/
加了一层current目录即可正确匹配上了
之前的效果:

现在:

相关推荐
2024-07-09
css透视效果位置perspective-origin
真理是时间的孩子,不是权威的孩子。——伽利略 正如我们在前一篇文章中提到的,CSS具备处理3D变换的能力。继续这一话题,本文将重点介绍perspective-origin属性,这个属性允许我们调整透视效果的原点,影响3D变换的视觉输出。 详细信息可以参考这个链接:MDN文档 让我们通过一个例子来看看perspective-origin的实际效果: .cube { width: 100px; height: 100px; position: relative; transform-style: preserve-3d; transform: rotateX(45deg) rotateY(45deg); } .face { position: absolute; width: 100%; height: 100%; background: rgba(255, 165, 0, 0.8); display: flex; align-items: center; justify-cont...
2021-06-20
vue页面加载完毕之后执行
好奇心造就科学家和诗人。——法朗士 当vue页面加载完成后触发 我们在html开发中经常是使用window.onload实现 123window.onload = () => { } 但在vue中我们使用this.$nextTick 123this.$nextTick(() => { console.log("页面加载完啦~")}) 效果如下
2021-11-03
vue项目启动后自动打开
我见青山多妩媚,料青山见我应如是。――辛弃疾《贺新郎》 找到项目路径下的package.json 在scripts下的serve后面加上--open即可
2025-05-21
升级项目为typescript
志不强者智不达。——《墨子·修身》 在一个 JavaScript + Vue 项目中引入 TypeScript 编写的代码组件 1. 保证依赖支持 TypeScript 安装 TypeScript 相关依赖(如果还没有): 12npm install --save-dev typescriptnpm install --save-dev @types/node 如果你的 Vue 版本是 Vue 2,建议也装上 vue-property-decorator 和 vue-class-component(class 风格): 1npm install --save vue-class-component vue-property-decorator 2. 配置 tsconfig.json 在项目根目录新建或完善 tsconfig.json,确保包括你的 TypeScript 组件目录。例如: 123456789101112131415161718192021222324252627{ "compilerOptions": { &q...
2024-09-29
js滚动到对应元素scrollIntoView
娇柔做作,失去真实的不是美,充满了富贵荣华的名利思想,也不是真美。——孟德斯鸠 文档: Element.scrollIntoView() - Web API | MDN 用法: 123scrollIntoView()scrollIntoView(alignToTop)scrollIntoView(scrollIntoViewOptions) 例如我选中某个元素执行 123456const element = document.getElementById("box");element.scrollIntoView();element.scrollIntoView(false);element.scrollIntoView({ block: "end" });element.scrollIntoView({ behavior: "smooth", block: "end", inline: "nearest" });
2023-04-14
js文件名排序
处人不可任己意,要悉人之情;处事不可任己见,要悉事之理。——吕坤 分享一个今天写的简单的文件名排序 12345678910111213141516171819202122232425262728293031323334353637383940function fileNameCompare(a, b) { if (a == null || b == null) return 0; let na = a.split(/[-_.—, (]/) let nb = b.split(/[-_.—, (]/) let maxLoop = Math.max(na.length, nb.length) for (let i = 0; i < maxLoop; i++) { if (!isNaN(Number(na[i])) && !isNaN(Number(nb[i]))) { let num = Number(na[i]) - Number(nb[i]) ...
