mirror of https://github.com/vuejs/vitepress
- content-loader html keeps site-absolute links under a relative base: the link plugin now only relativizes renders marked relativizeUrls (page renders), since loader output is embedded into other pages (its source depth is meaningless there) - user hooks never see the build sentinel: content/teleports/assets/head are relativized per page before postRender consumers, transformHead and transformHtml run, and the html handed to transformHtml is final - vitepress-emitted tags no longer consult a user renderBuiltUrl, keeping plain-base output byte-stable and the asset url policy symmetric (renderBuiltUrl still chains for Vite-managed urls via the plugin, now enforce: post so late user plugins cannot clobber it) - preview accepts --assetsBase and mirrors a build made with the flag - --base/--assetsBase without a value fail with a clear message instead of a TypeError - theme normalizeLink appends index.html via the path portion, fixing non-slash-leading, percent-encoded and query-only links - search excerpt map keys handle anchor-less ids - restore the mergeConfig markdown-hook unit tests this branch had accidentally replaced - docs: search ids are site-relative; relative-base notes on raw anchors, content loaders and canonical directory urls Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>pull/5406/head
parent
9e1943ed6f
commit
bcb3172c29
@ -0,0 +1,7 @@
|
||||
# Blog
|
||||
|
||||
<script setup>
|
||||
import { data } from './posts.data.ts'
|
||||
</script>
|
||||
|
||||
<div v-for="p in data" :key="p.url" class="post-excerpt" v-html="p.html"></div>
|
||||
@ -0,0 +1,3 @@
|
||||
import { createContentLoader } from 'vitepress'
|
||||
|
||||
export default createContentLoader('posts/**/*.md', { render: true })
|
||||
@ -0,0 +1,5 @@
|
||||
# Post one
|
||||
|
||||
This is the intro of post one with a [site link](/sub/page) and .
|
||||
|
||||
More body.
|
||||
Loading…
Reference in new issue