@sugarat/theme 0.1.2 → 0.1.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.
Files changed (3) hide show
  1. package/node.js +1 -1
  2. package/package.json +4 -4
  3. package/src/node.ts +1 -1
package/node.js CHANGED
@@ -103,7 +103,7 @@ function getThemeConfig(cfg) {
103
103
  ]);
104
104
  const wordCount = 100;
105
105
  meta.description = meta.description || getTextSummary(fileContent, wordCount);
106
- meta.cover = meta.cover || fileContent.match(/[!]\[.+?\]\((https:\/\/.+)\)/)?.[1] || "";
106
+ meta.cover = meta.cover || fileContent.match(/[!]\[.*?\]\((https:\/\/.+)\)/)?.[1] || "";
107
107
  return {
108
108
  route: `/${route}`,
109
109
  meta
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sugarat/theme",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "简约风的 Vitepress 博客主题,sugarat vitepress blog theme",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -32,10 +32,8 @@
32
32
  "url": "https://github.com/ATQQ/sugar-blog/issues"
33
33
  },
34
34
  "dependencies": {
35
- "@element-plus/icons-vue": "^2.0.10",
36
35
  "@vue/shared": "^3.2.45",
37
36
  "@vueuse/core": "^9.6.0",
38
- "element-plus": "^2.2.28",
39
37
  "fast-glob": "^3.2.12",
40
38
  "gray-matter": "^4.0.3"
41
39
  },
@@ -44,7 +42,9 @@
44
42
  "tsup": " ^6.5.0",
45
43
  "typescript": "^4.8.2",
46
44
  "vitepress": "^1.0.0-alpha.33",
47
- "vue": "^3.2.45"
45
+ "vue": "^3.2.45",
46
+ "@element-plus/icons-vue": "^2.0.10",
47
+ "element-plus": "^2.2.28"
48
48
  },
49
49
  "scripts": {
50
50
  "dev": "vitepress dev demo",
package/src/node.ts CHANGED
@@ -61,7 +61,7 @@ export function getThemeConfig(cfg?: Partial<Theme.BlogConfig>) {
61
61
  // 获取封面图
62
62
  meta.cover =
63
63
  meta.cover ||
64
- fileContent.match(/[!]\[.+?\]\((https:\/\/.+)\)/)?.[1] ||
64
+ fileContent.match(/[!]\[.*?\]\((https:\/\/.+)\)/)?.[1] ||
65
65
  ''
66
66
  return {
67
67
  route: `/${route}`,