minista 4.0.1 → 4.0.2
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "minista",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"minista": "./bin/minista.js"
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@mdx-js/rollup": "^3.1.1",
|
|
69
|
-
"@swc/core": "^1.15.
|
|
69
|
+
"@swc/core": "^1.15.32",
|
|
70
70
|
"archiver": "^7.0.1",
|
|
71
71
|
"cross-spawn": "^7.0.6",
|
|
72
72
|
"image-size": "^2.0.2",
|
|
@@ -80,6 +80,6 @@
|
|
|
80
80
|
"remark-mdx-frontmatter": "^5.2.0",
|
|
81
81
|
"sharp": "^0.34.5",
|
|
82
82
|
"svgo": "^4.0.1",
|
|
83
|
-
"tinyglobby": "^0.2.
|
|
83
|
+
"tinyglobby": "^0.2.16"
|
|
84
84
|
}
|
|
85
85
|
}
|
|
@@ -209,9 +209,10 @@ export function pluginSearch(uOpts = {}) {
|
|
|
209
209
|
const inputEl = parsedHtml.querySelector(`[${opts.inputAttr}]`)
|
|
210
210
|
if (!inputEl) continue
|
|
211
211
|
|
|
212
|
-
const
|
|
212
|
+
const isIndex = htmlName.split("/").pop() === "index.html"
|
|
213
|
+
const level = (htmlName.match(/\//g) || []).length + (isIndex ? 0 : 1)
|
|
213
214
|
const bodyEl = parsedHtml.querySelector("body")
|
|
214
|
-
bodyEl?.setAttribute(opts.relativeAttr, String(
|
|
215
|
+
bodyEl?.setAttribute(opts.relativeAttr, String(level))
|
|
215
216
|
|
|
216
217
|
item.source = parsedHtml.toString()
|
|
217
218
|
}
|