Skip to content

Commit

Permalink
Merge branch 'main' into mofterdinger-patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
mofterdinger authored Dec 13, 2024
2 parents a94f473 + f66f736 commit 508cef0
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
9 changes: 5 additions & 4 deletions .vitepress/theme/components/indexFilter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
Expand Down
7 changes: 4 additions & 3 deletions cds/cdl.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 )`
Expand Down
1 change: 1 addition & 0 deletions menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)

Expand Down
5 changes: 4 additions & 1 deletion tools/apis/index.data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}/`)
}
Expand Down
1 change: 0 additions & 1 deletion tools/index.data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const basePath = basename(__dirname)
export default createContentLoader([
`**/${basePath}/*.md`,
`**/${basePath}/**/index.md`,
`**/cds-dk.md`,
`**/hybrid-testing.md`,
], {
transform(rawData) {
Expand Down

0 comments on commit 508cef0

Please sign in to comment.