mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-04-23 10:58:13 +08:00
chore: tweak
This commit is contained in:
parent
4733505cf2
commit
b3561ef383
@ -34,6 +34,8 @@ export default defineUserConfig({
|
||||
|
||||
define: {
|
||||
__VUEPRESS_VERSION__: vuepress,
|
||||
// debug hydration mismatch
|
||||
// __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: 'true',
|
||||
},
|
||||
|
||||
alias: {
|
||||
|
||||
@ -129,7 +129,8 @@ config:
|
||||
**效果:**
|
||||
|
||||
:::demo-wrapper img no-padding
|
||||
<img src="/images/custom-banner.jpg" alt="" />
|
||||
|
||||

|
||||
:::
|
||||
|
||||
### hero
|
||||
@ -433,7 +434,7 @@ config:
|
||||
**效果:**
|
||||
|
||||
:::demo-wrapper img no-padding
|
||||
<img src="/images/custom-features.jpg" alt="" />
|
||||
<img src="/images/custom-features.jpg" alt="custom-features" />
|
||||
:::
|
||||
|
||||
### text-image | image-text
|
||||
|
||||
@ -26,6 +26,7 @@ import { removeLeadingSlash } from 'vuepress/shared'
|
||||
import { findFile, readFileSync } from '../demo/supports/file.js'
|
||||
import { createEmbedRuleBlock } from '../embed/createEmbedRuleBlock.js'
|
||||
import { defaultFile, defaultFolder, getFileIcon } from '../fileIcons/index.js'
|
||||
import { cleanMarkdownEnv } from '../utils/cleanMarkdownEnv.js'
|
||||
import { parseRect } from '../utils/parseRect.js'
|
||||
import { resolveAttr, resolveAttrs } from '../utils/resolveAttrs.js'
|
||||
import { stringifyAttrs } from '../utils/stringifyAttrs.js'
|
||||
@ -214,7 +215,7 @@ export function codeTreePlugin(md: Markdown, app: App, options: CodeTreeOptions
|
||||
const fileTreeNodes = parseFileNodes(files)
|
||||
return `<VPCodeTree${stringifyAttrs(props)}><template #file-tree>${
|
||||
renderFileTree(fileTreeNodes, icon)
|
||||
}</template>${md.render(codeContent)}</VPCodeTree>`
|
||||
}</template>${md.render(codeContent, cleanMarkdownEnv(env))}</VPCodeTree>`
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
@ -25,6 +25,8 @@ export function resolveAttrs<T extends Record<string, any> = Record<string, any>
|
||||
v = true
|
||||
else if (v === 'false')
|
||||
v = false
|
||||
else if (v === '""' || v === '\'\'')
|
||||
v = ''
|
||||
attrs[camelCase(attr)] = v
|
||||
|
||||
info = info.slice(matched[0].length)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user