| addToParent | - |
| asAny | - |
| buildTree | - |
| clearFuseSearchCache | Clear module-scoped Fuse search caches (intended for tests or cache invalidation). |
| clearLocalSearchCache | Clear module-scoped local search caches (intended for tests or index invalidation). |
| computeZoomRectStyle | Convert the opened transform into real dimensions while keeping the same viewport rect. This avoids Chrome rendering the zoomed image blurry because of transform scaling. |
| dayjs | - |
| decodePath | Decode a percent-encoded URL path (/posts/%E4%B8%AD → /posts/中). |
| defineAppSetup | - |
| defineClientComponent | Define a component that only renders on the client side. |
| defineCollection | - |
defineMermaidSetup | - |
| escapeHtml | Escape HTML special characters for safe interpolation into HTML text and quoted attributes. |
| extractMarkdownImage | First content image, ignoring fenced code and the optional markdown title. |
| filterAndSortPosts | Pure function to filter and sort posts from page list Can be used in both composables and stores without inject() issues |
| formatDate | format the date (dayjs) with default timezone |
| getAddonDocsPath | - |
| getAddonModule | Cast a module namespace import to a plain type, breaking Rollup’s static binding analysis on import * as ns namespace objects. |
| getHeaders | get headers from document directly |
| getLocaleMessageValue | Resolve a nested locale message value by dot-separated key. |
| hasLocaleMessage | Whether a locale message exists for the given key. |
| initContext | - |
| initValaxyConfig | - |
| isCategoryList | For theme development, you can use this function to determine whether the category is a category list. |
| isEmptyAddon | - |
| isLocaleKey | Whether the value is an explicit locale key like $locale:tag.notes. |
| isNotFoundPagePath | Paths reserved for a site’s not-found document. |
| isReadmePage | - |
| isSamePagePath | Check whether a page file path (/posts/中文.md, /guide/index.md) is the page shown at a browser pathname (/base/posts/%E4%B8%AD%E6%96%87). |
| isUnderscorePage | - |
| isUnpublishedPage | True when this source file must not become a public route. |
| joinBaseUrl | Join a Vite base URL and a route path while preserving protocol/relative prefixes and / separators. |
| localizeAddon | - |
| mergeCollapsedCollections | Merge collapsed collections into the post list. For collapsed collections, add a single synthetic entry representing the collection, using the latest article’s date for sorting. |
| mergePageExcludes | - |
| normalizeAddonLocale | - |
| normalizeExcludeGlobs | - |
| normalizePagePath | - |
| normalizeRepositoryUrl | Remove git+ prefix from repository URL |
| omitProductionDraftRoutes | Drop draft: true routes from a production route tree. Development keeps them so authors can preview. Mutates child arrays the same way the router setup always has. |
| onClickHref | - |
| onContentUpdated | Register callback that is called every time the markdown content is updated in the DOM. |
| openGraphType | Open Graph type for a Valaxy route. Posts are articles; other pages stay websites. |
| orderByMeta | sort posts by date |
| pageExcludeGlobs | Picomatch globs for the file router. They are a fast path; route extension also drops these files so a custom exclude list cannot publish them by accident. |
| parseRangeString | 1,3-5,8 => [1, 3, 4, 5, 8] |
| pickPageShareImage | Keep explicit legacy image ahead of the cover, as Yun’s article schema did. |
| pickShareImage | First usable share image. The site favicon is not a candidate: it is often an SVG and is the same for every page. |
| plainSeoDescription | Plain-text summary for meta descriptions and share cards. Fenced code, HTML comments, and images are removed. Headings are skipped so the title is not repeated as the description. Longer text is cut on a space when one is near the end, otherwise on the character limit, then marked with an ellipsis. |
| publicAuthor | Author fields safe to publish on a site that did not set them. Empty email and link are omitted. Callers pass the resolved site author, so an address the site set explicitly is kept. |
| random | 生成介于 min 与 max 之间的随机数 |
| relativePagePath | Page path relative to a pages/ directory. pages/posts/hello.md and /abs/pages/posts/hello.md both become posts/hello.md. |
| removeItemFromCategory | remove item from category |
| resolveCanonicalPath | Keep URL parameters while using the matched route’s trailing-slash convention. |
| resolveCollectionItemHref | Resolve the href and external status for a collection item. link takes precedence over key. Internal links start with /. |
| resolveHeaders | - |
| resolveShareImage | Resolve a share image against the page when it is relative, and against the site deployment path when it is root-absolute. Absolute URLs are unchanged. |
| resolveSiteUrl | Resolve an internal path against the configured canonical site URL. Root-absolute paths remain relative to a site URL’s deployment subpath. |
| resolveSocialSameAs | Public identity links only; this never changes the site’s social navigation. |
| resolveTaxonomyLocaleKey | Resolve the effective locale key for a taxonomy term. |
| runCbs | - |
| safeDecodeURI | Safely decode a URI, returning the original string on malformed sequences. |
| safeDecodeURIComponent | Safely decode a URI component, returning the original string on malformed sequences. |
| safeParseUrl | Safely parse a URL relative to an optional base, returning null on invalid syntax. |
| sanitizeUrl | Sanitize a URL so dangerous schemes like javascript:, vbscript:, or data:text/html cannot execute. |
| scrollTo | For theme developers, you can use this function to scroll to the target element. For example, when you click the anchor link in the markdown file, it will scroll to the target element. |
| serializeHeader | - |
| serializeInlineJsString | Serialize a string as an inline JavaScript string literal safe inside <script> tags. |
| setIframeAspectRatios | Make dimensioned iframes responsive without assuming a fixed video ratio. The generated custom property is consumed by the low-specificity markdown styles, so an author’s explicit height or aspect-ratio still takes priority. |
| sleep | 等待指定时间 (ms) |
| sortByDate | sort posts by date |
| sortByUpdated | - |
| stripEncryptedContent | Remove private blocks before extracting any public text or image metadata. |
| stripLocalePrefix | Strip $locale: prefix when present. |
| svgToPng | Export a mounted, self-contained SVG’s current frame using the browser canvas. |
| throttleAndDebounce | - |
| tObject | translate object |
| toZonedDayjs | Convert a date using the same timezone rules as formatDate. |
| urlPathToMarkdownPath | Map a route/URL path (e.g. '', '/', '/index', '/posts/hello/') to a collision-free raw Markdown href and relative file path. - '' / '/' (pages/index.md) -> /index.md (index.md) - '/index' (pages/index/index.md) -> /index/index.md (index/index.md) - '/index/index' -> /index/index/index.md (index/index/index.md) - Other routes keep ${normalized}.md. |
| useActiveAnchor | - |
| useAddonConfig | Get addon config from runtime config. |
| useBack | back to previous page or home page |
| useBackToTop | You can use href="#" to back to top |
| useCategories | get categories from posts category: A/B/C { name: 'A', total: 1, children: [ { name: 'B' total: 1, children: [{ name: 'C', total: 1, children: [{ title: '' }] }] } ] } |
| useCollapseCode | 折叠代码块(允许设置最大高度) |
| useCollection | 获取当前集合 |
| useCollectionPosts | Get posts belonging to a specific collection Sorted by the order defined in collection.items |
| useCollections | Composable for Collections /collections/:collectionId/:slug |
| useConfig | alias for useSite |
| useCopyCode | - |
| useCopyMarkdown | Composable for copying raw Markdown content of the current post. Requires siteConfig.llms.enable: true and siteConfig.llms.files: true to have .md files available at build output. |
| useData | inject pageData |
| useDecrypt | Decrypt ciphertext produced by encryptContent (valaxy/node). |
| useEncryptedContent | 获取加密文章数据 |
| useEncryptedPhotos | encryptedPhotos 获取加密相册数据 |
| useFrontmatter | Get route.meta.frontmatter from your markdown file |
| useFullUrl | get full url |
| useFuseSearch | - |
| useInvisibleElement | trigger show invisible element |
| useLayout | - |
| useLocale | - |
| useLocaleTitle | get locale title |
| useLocalSearch | - |
| useMediumZoom | - |
| useMobile | is mobile media query |
| useOutline | export headers & handleClick to generate outline |
| usePageList | get all page in 'pages' folder |
| usePageSeo | Description, canonical URL, share image, and Open Graph type for the current page. A page without frontmatter description uses the plain-text excerpt prepared at build time. |
| usePagination | - |
| usePartiallyEncryptedContents | 获取部分加密内容 |
| usePostCollections | Find which collection(s) a given post path belongs to. Checks both key-based items (/collections/{collKey}/{item.key}) and internal link items (item.link). |
| usePostList | get post list in 'pages/posts' folder |
| usePostListWithCollections | Get post list merged with collapsed collection entries. Collapsed collections are represented by a single synthetic entry (card) that is appended and re-sorted with the existing posts. |
| usePostTitle | - |
| usePrevNext | get prev and next post |
| useRuntimeConfig | - |
| useScreenSize | breakpoints ref https://tailwindcss.com/docs/screens |
| useSidebar | helper for sidebar |
| useSiteConfig | get valaxy config |
| useTags | get tag map [tagName]: count |
| useValaxyApp | - |
| useValaxyConfig | get valaxy config |
| useValaxyDark | - |
| useValaxyHead | - |
| useValaxyI18n | 以 $locale: 开头的 key 会被认为是国际化的 key 会从 locales/ 目录中获取对应的翻译 |
| withBase | Append Vite’s resolved base to an internal root-absolute URL. External and relative URLs are returned unchanged. |
| wrap | wrap node |
| wrapTable | 包裹表格,添加 class 以控制 table 样式 |