@sugarat/theme 0.5.12-beta.2 → 0.5.13

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.
package/node.js CHANGED
@@ -496,7 +496,7 @@ function themeReloadPlugin() {
496
496
  let vitepressConfig;
497
497
  let docsDir;
498
498
  const generateRoute = (filepath) => {
499
- return filepath.replace(docsDir, "").replace(".md", "");
499
+ return (0, import_theme_shared3.normalizePath)(filepath).replace(docsDir, "").replace(".md", "");
500
500
  };
501
501
  return {
502
502
  name: "@sugarat/theme-reload",
package/node.mjs CHANGED
@@ -459,13 +459,13 @@ import { groupIconVitePlugin } from "vitepress-plugin-group-icons";
459
459
 
460
460
  // src/utils/node/hot-reload-plugin.ts
461
461
  import fs2 from "fs";
462
- import { grayMatter as grayMatter2 } from "@sugarat/theme-shared";
462
+ import { grayMatter as grayMatter2, normalizePath as normalizePath3 } from "@sugarat/theme-shared";
463
463
  function themeReloadPlugin() {
464
464
  let blogConfig;
465
465
  let vitepressConfig;
466
466
  let docsDir;
467
467
  const generateRoute = (filepath) => {
468
- return filepath.replace(docsDir, "").replace(".md", "");
468
+ return normalizePath3(filepath).replace(docsDir, "").replace(".md", "");
469
469
  };
470
470
  return {
471
471
  name: "@sugarat/theme-reload",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sugarat/theme",
3
- "version": "0.5.12-beta.2",
3
+ "version": "0.5.13",
4
4
  "description": "简约风的 Vitepress 博客主题,sugarat vitepress blog theme",
5
5
  "author": "sugar",
6
6
  "license": "MIT",
@@ -51,10 +51,10 @@
51
51
  "vitepress-plugin-group-icons": "1.6.5",
52
52
  "vitepress-plugin-mermaid": "2.0.13",
53
53
  "vitepress-plugin-tabs": "0.7.3",
54
- "vitepress-plugin-announcement": "0.1.7-beta.0",
55
- "vitepress-plugin-rss": "0.4.1",
56
54
  "@sugarat/theme-shared": "0.0.7",
57
- "vitepress-plugin-pagefind": "0.4.18-beta.1"
55
+ "vitepress-plugin-pagefind": "0.4.18",
56
+ "vitepress-plugin-rss": "0.4.2",
57
+ "vitepress-plugin-announcement": "0.1.7"
58
58
  },
59
59
  "devDependencies": {
60
60
  "artalk": "^2.8.5",
@@ -1,7 +1,7 @@
1
1
  import fs from 'fs'
2
2
  import type { PluginOption } from 'vite'
3
3
  import type { SiteConfig } from 'vitepress'
4
- import { grayMatter } from '@sugarat/theme-shared'
4
+ import { grayMatter, normalizePath } from '@sugarat/theme-shared'
5
5
  import type { Theme } from '../../composables/config/index'
6
6
  import { getArticleMeta } from './theme'
7
7
  import { debounce, isEqual } from './index'
@@ -12,7 +12,7 @@ export function themeReloadPlugin() {
12
12
  let docsDir: string
13
13
 
14
14
  const generateRoute = (filepath: string) => {
15
- return filepath.replace(docsDir, '').replace('.md', '')
15
+ return normalizePath(filepath).replace(docsDir, '').replace('.md', '')
16
16
  }
17
17
 
18
18
  return {