diff --git a/.vitepress/theme/components/indexFilter.ts b/.vitepress/theme/components/indexFilter.ts index 2a5d4a206..fd2328c21 100644 --- a/.vitepress/theme/components/indexFilter.ts +++ b/.vitepress/theme/components/indexFilter.ts @@ -15,12 +15,13 @@ export default (pages:ContentDataCustom[], basePath:string):ContentDataCustom[] return pages .map(p => { - p.url = p.url?.replaceAll('@external/', '')?.replace(/\/index$/, '/') || '' - p.url = join(base, p.url) - return p + const res = { ...p } // do not mutate original data + res.url = res.url?.replaceAll('@external/', '')?.replace(/\/index$/, '/') || '' + res.url = join(base, res.url) + return res }) .filter(p => { - const item = items.find(item => item.link && p.url.endsWith(item.link)) + const item = items.find(item => item.link && p.url.endsWith(item.link.replace(/#.*/, ''))) if (item) p.title = item.text return !!item }) diff --git a/cds/cdl.md b/cds/cdl.md index b470ab717..73020f529 100644 --- a/cds/cdl.md +++ b/cds/cdl.md @@ -1388,9 +1388,10 @@ Each path in the expression is checked: * A parameter `par` can be accessed via `:par`, just like parameters of a parametrized entity in queries. * For an annotation assigned to a bound action or function, elements of the respective entity can be accessed via `$self`. -* The draft specific element `IsActiveEntity` can be referred to with the magic variable `$draft.IsActiveEntity`. - During draft augmentation `$draft.IsActiveEntity` is rewritten to `$self.IsActiveEntity` for all draft enabled - entities (root and sub nodes but not for named types or entity parameters). +* The draft-specific elements `IsActiveEntity`, `HasActiveEntity`, and `HasDraftEntity` can be referred to with + respective magic variables `$draft.IsActiveEntity`, `$draft.HasActiveEntity`, and `$draft.HasDraftEntity`. + During draft augmentation, `$draft.<...>` is rewritten to `$self.<...>` for all draft enabled + entities (root and sub nodes, but not for named types or entity parameters). * If a path can't be resolved successfully, compilation fails with an error. In contrast to `@aReference: foo.bar`, a single reference written as expression `@aRefExpr: ( foo.bar )` diff --git a/menu.md b/menu.md index 175a33de8..3547a3ddb 100644 --- a/menu.md +++ b/menu.md @@ -148,6 +148,7 @@ ## [CDS Design Time APIs](tools/apis/) ### [cds. add()](tools/apis/cds-add) ### [cds. import()](tools/apis/cds-import) + ### [cds. build()](../guides/deployment/custom-builds#custom-build-plugins) # [Plugins](plugins/) diff --git a/tools/apis/index.data.ts b/tools/apis/index.data.ts index 871821ddd..8d4b91b6e 100644 --- a/tools/apis/index.data.ts +++ b/tools/apis/index.data.ts @@ -4,7 +4,10 @@ import filter from '../../.vitepress/theme/components/indexFilter.ts' const basePath = basename(__dirname) -export default createContentLoader([`**/${basePath}/*.md`], { +export default createContentLoader([ + `**/${basePath}/*.md`, + `**/custom-builds.md` +], { transform(rawData) { return filter(rawData, `/${basePath}/`) } diff --git a/tools/index.data.ts b/tools/index.data.ts index 1043de03c..d1b64b125 100644 --- a/tools/index.data.ts +++ b/tools/index.data.ts @@ -7,7 +7,6 @@ const basePath = basename(__dirname) export default createContentLoader([ `**/${basePath}/*.md`, `**/${basePath}/**/index.md`, - `**/cds-dk.md`, `**/hybrid-testing.md`, ], { transform(rawData) {