Skip to content

Interface: ValaxyExtendConfig

Defined in: packages/valaxy/node/types/config.ts:75

Properties

addons?

ts
optional addons: ValaxyAddons;

Defined in: packages/valaxy/node/types/config.ts:325

En

Addons system

Zh

插件系统

See

Example

ts
import { defineValaxyConfig } from 'valaxy'
import { addonTest } from 'valaxy-addon-test'

export default defineValaxyConfig({
  addons: [
    // we always recommend to use function, so that you can pass options
    addonTest(),
  ]
})

build

ts
build: object;

Defined in: packages/valaxy/node/types/config.ts:90

options for valaxy build

foucGuard?

ts
optional foucGuard: object;
En

FOUC (Flash of Unstyled Content) guard configuration. Prevents layout shift on first paint by hiding the page body until full CSS is loaded. Uses body { opacity: 0 } inline, then the main stylesheet sets body { opacity: 1 } to reveal content.

Zh

FOUC(无样式内容闪烁)防护配置。 通过在完整 CSS 加载前隐藏页面内容来防止首屏样式闪烁。 内联 body { opacity: 0 },完整 CSS 加载后通过 body { opacity: 1 } 解锁显示。

foucGuard.enabled?
ts
optional enabled: boolean;
En

Enable FOUC guard. When disabled, no opacity hiding or fallback scripts will be injected.

Zh

是否启用 FOUC 防护。禁用后不会注入 opacity 隐藏及兜底脚本。

Default
ts
true
foucGuard.maxDuration?
ts
optional maxDuration: number;
En

Maximum wait time (ms) before force-showing the page, as a safety fallback in case CSS fails to load. Set to 0 to disable the timeout fallback (only window.onload will trigger reveal).

Zh

最大等待时间(毫秒),作为 CSS 加载失败时的安全兜底。 设置为 0 可禁用超时兜底(仅依赖 window.onload 触发显示)。

Default
ts
5000
ts
optional ignoreDeadLinks: 
  | boolean
  | "localhostLinks"
  | (string | RegExp | (link) => boolean)[];

Don't fail builds due to dead links.

Zh

忽略死链

Default
ts
false

ssgForPagination

ts
ssgForPagination: boolean;

Enable SSG for pagination

En

When enabled, it will generate pagination pages for you. /page/1, /page/2, ...

Zh

启用 SSG 分页,将单独构建分页页面 /page/1, /page/2, ...

Default
ts
false

cdn?

ts
optional cdn: object;

Defined in: packages/valaxy/node/types/config.ts:341

Experimental

CDN externals configuration. Specify modules to load from CDN instead of bundling them. Only takes effect during valaxy build, not in dev mode.

modules?

ts
optional modules: CdnModule[];

Modules to load from CDN instead of bundling

Default
ts
[]

See

https://github.com/YunYouJun/valaxy/issues/604


components?

ts
optional components: Options;

Defined in: packages/valaxy/node/types/config.ts:238

See

https://github.com/unplugin/unplugin-vue-components

exclude

Default

ts
components/.exclude

deploy

ts
deploy: object;

Defined in: packages/valaxy/node/types/config.ts:141

Experimental

Deploy to gh-pages/remote server

type?

ts
optional type: "gh-pages" | "remote";
Zh

部署类型

En

deploy type


devtools?

ts
optional devtools: boolean;

Defined in: packages/valaxy/node/types/config.ts:289

Experimental

Enable Vue Devtools & Valaxy Devtools

See

https://devtools-next.vuejs.org/


extendMd()?

ts
optional extendMd: (ctx) => void;

Defined in: packages/valaxy/node/types/config.ts:300

Parameters

ctx
content

string

data

Readonly<Record<string, any>>

excerpt?

string

path

string

route

EditableTreeNode

Returns

void

En

Extend markdown, you can modify the markdown content/excerpt

Zh

扩展 markdown


features

ts
features: object;

Defined in: packages/valaxy/node/types/config.ts:176

Markdown Feature

katex

ts
katex: boolean;

enable katex for global

  • true (default): all pages render KaTeX, unless frontmatter.katex: false
  • false: no pages render KaTeX by default, but individual pages can opt-in via frontmatter.katex: true
See
Default
ts
true

fuse?

ts
optional fuse: object;

Defined in: packages/valaxy/node/types/config.ts:274

extendKeys?

ts
optional extendKeys: string[];

@en_US Extends the metadata fields returned by the search @zh_CN 扩展搜索返回的元数据字段

Default
ts
[]
@description:en-US By default, returns the following fields: title, tags, categories, author, excerpt, link
@description:zh-CN 默认返回以下字段:title、tags、categories、author、excerpt、link

groupIcons?

ts
optional groupIcons: Partial<Options>;

Defined in: packages/valaxy/node/types/config.ts:259

See

https://github.com/yuyinws/vitepress-plugin-group-icons


hooks?

ts
optional hooks: Partial<ValaxyHooks>;

Defined in: packages/valaxy/node/types/config.ts:332

En

Hooks system, you can customize each stage of the lifecycle.

Zh

钩子系统,你可以对生命周期的各个阶段进行定制。

See

https://valaxy.site/guide/custom/hooks


ts
optional ignoreDeadLinks: 
  | boolean
  | "localhostLinks"
  | (string | RegExp | (link) => boolean)[];

Defined in: packages/valaxy/node/types/config.ts:82

Don't fail builds due to dead links.

Default

ts
false

Deprecated

use build.ignoreDeadLinks instead


layouts?

ts
optional layouts: Partial<Options>;

Defined in: packages/valaxy/node/types/config.ts:242

See

https://github.com/JohnCampionJr/vite-plugin-vue-layouts


markdown?

ts
optional markdown: MarkdownOptions & Options;

Defined in: packages/valaxy/node/types/config.ts:295

En

config for markdown (include markdown-it plugins)

Zh

markdown 相关配置 MarkdownOptions


math

ts
math: boolean;

Defined in: packages/valaxy/node/types/config.ts:203

Enable MathJax3 math rendering (aligned with VitePress markdown.math).

When enabled, MathJax3 will be used via markdown-it-mathjax3 to render math formulas as self-contained SVG — no external CSS or fonts required.

  • features.katex and math are mutually exclusive.
  • When math is enabled, features.katex is automatically ignored.
  • math requires installing markdown-it-mathjax3: pnpm add markdown-it-mathjax3

See

https://www.mathjax.org/

Default

ts
false

modules

ts
modules: object;

Defined in: packages/valaxy/node/types/config.ts:152

internal modules

rss

ts
rss: object;
rss.enable
ts
enable: boolean;

enable rss

rss.extractImagePathsFromHTML
ts
extractImagePathsFromHTML: boolean;
Zh

从构建后的 HTML 中提取图片路径(用于解析 Vite 打包后的 hash 文件名)

En

Extract image paths from built HTML files (to resolve Vite hashed filenames)

Default
ts
true
rss.fullText
ts
fullText: boolean;
Zh

全文输出

En

full text output

Default
ts
false

router?

ts
optional router: Options;

Defined in: packages/valaxy/node/types/config.ts:246

See

https://github.com/posva/unplugin-vue-router


unocss?

ts
optional unocss: VitePluginConfig<object>;

Defined in: packages/valaxy/node/types/config.ts:250

See

https://unocss.dev/config/


unocssPresets?

ts
optional unocssPresets: object;

Defined in: packages/valaxy/node/types/config.ts:264

unocss presets

attributify?

ts
optional attributify: AttributifyOptions;

icons?

ts
optional icons: IconsOptions;

typography?

ts
optional typography: TypographyOptions<TypographyTheme>;

uno?

ts
optional uno: PresetWind4Options;
Deprecated

use wind4 instead

wind4?

ts
optional wind4: PresetWind4Options;

See

https://unocss.dev/guide/presets


visualizer?

ts
optional visualizer: PluginVisualizerOptions;

Defined in: packages/valaxy/node/types/config.ts:255

rollup-plugin-visualizer

See

https://github.com/btd/rollup-plugin-visualizer


vite?

ts
optional vite: UserConfig;

Defined in: packages/valaxy/node/types/config.ts:208

vite.config.ts options

See

https://vite.dev/


vue?

ts
optional vue: Options & object;

Defined in: packages/valaxy/node/types/config.ts:213

@vitejs/plugin-vue options

Type Declaration

browserTemplateCompilation?
ts
optional browserTemplateCompilation: boolean;
Valaxy
See

https://cn.vuejs.org/guide/scaling-up/tooling#note-on-in-browser-template-compilation enable

for runtime compile vue, encrypt and decrypt for excerpt_type: html (runtime render)

Default
ts
true

browserTemplateCompilation
Description

支持浏览器内的模板编译

isCustomElement?
ts
optional isCustomElement: (tag) => boolean[];
Parameters
tag

string

Returns

boolean

Valaxy

See

https://github.com/vitejs/vite-plugin-vue/blob/main/packages/plugin-vue/README.md