@alauda/doom 0.16.2 → 0.16.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -56,6 +56,8 @@ const getCommonConfig = ({ config, root, configFilePath, base, version, download
56
56
  },
57
57
  themeConfig: {
58
58
  enableScrollToTop: true,
59
+ // https://github.com/web-infra-dev/rspress/issues/2011
60
+ outline: true,
59
61
  ...(fallbackToZh
60
62
  ? zhLocaleConfig
61
63
  : {
@@ -26,12 +26,12 @@ const processSideMeta = (sideMeta, extensions, excludeRoutes) => {
26
26
  }
27
27
  const ignored = excludeRoutes.some((glob) => picomatch.isMatch(curr._fileKey, glob));
28
28
  let filePart;
29
- if ((filePart = curr._fileKey.split('/').at(-1)) &&
29
+ if ((filePart = curr._fileKey.split(/[\\/]/).at(-1)) &&
30
30
  extensions.some((ext) => filePart === `index${ext}`)) {
31
31
  if (acc.index?._fileKey) {
32
32
  // zh/development/component-quickstart/index.md vs zh/development/index.mdx
33
33
  const relative = path.relative(path.dirname(acc.index._fileKey), path.dirname(curr._fileKey));
34
- if (relative === '..' || relative.endsWith('/..')) {
34
+ if (relative === '..' || /[\\/]\.\.$/.test(relative)) {
35
35
  acc.others.unshift(acc.index);
36
36
  acc.index = curr;
37
37
  }
@@ -152,7 +152,7 @@ export const remarkReplace = function ({ lang, localBasePath, root, items, force
152
152
  }
153
153
  }
154
154
  const newAstChildren = [];
155
- const currLang = lang === null ? 'zh' : relativePath.split('/')[0];
155
+ const currLang = lang === null ? 'zh' : relativePath.split(/[\\/]/)[0];
156
156
  for (const node of ast.children) {
157
157
  if (node.type !== (isMdx ? 'mdxFlowExpression' : 'html')) {
158
158
  newAstChildren.push(node);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alauda/doom",
3
- "version": "0.16.2",
3
+ "version": "0.16.4",
4
4
  "type": "module",
5
5
  "description": "Doctor Doom making docs.",
6
6
  "repository": "https://gitlab-ce.alauda.cn/idp/Doom.git",