Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
454 commits
Select commit Hold shift + click to select a range
5dfd8d5
Update dependency @shikijs/vitepress-twoslash to v3.21.0 (#2306)
renovate[bot] Jan 7, 2026
4f38f30
Update dependency sass to v1.97.2 (#2305)
renovate[bot] Jan 7, 2026
b69ea06
chore: Update CLI texts (#2302)
github-actions[bot] Jan 7, 2026
b149c1d
chore(deps): update dependency @typescript-eslint/parser to v8.52.0 (…
renovate[bot] Jan 7, 2026
cc46edd
Add MTX pages to deploy index page
chgeo Jan 7, 2026
8bc689b
unrelease data federation
renejeglinsky Jan 7, 2026
f977df3
Merge branch 'main' of https://github.com/cap-js/docs
renejeglinsky Jan 7, 2026
78c0d2b
Added learn-more link to destination configuration guide (#2303)
PDT42 Jan 8, 2026
f2a29af
Renovated Databases guides (wip...)
danjoa Jan 9, 2026
26f1c29
chore(deps): update dependency @sap/cds to v9.6.2 (#2307)
renovate[bot] Jan 9, 2026
0d2b34c
Add troubleshooting entry for killed processes in MTX (#2309)
swaldmann Jan 9, 2026
1943c59
Remove trailing spaces + no truncation in MTX ToC
swaldmann Jan 9, 2026
f0ac204
Database guides ++
danjoa Jan 9, 2026
f4df338
...
danjoa Jan 9, 2026
e5f77f7
Shorter titles and editing for remaining troubleshooting
swaldmann Jan 9, 2026
d132f6c
Move BTP section
swaldmann Jan 9, 2026
2e8ebcf
Fix broken links
swaldmann Jan 10, 2026
5e08207
...
danjoa Jan 11, 2026
c75e1a1
Common database guides renovated
danjoa Jan 12, 2026
f9c879d
Update database model references in CDS guide for SQLite and HANA
danjoa Jan 12, 2026
8b5adc2
Clarify CQL and SQL null handling in documentation
danjoa Jan 12, 2026
9410d37
Finalized schema evolution overview
danjoa Jan 12, 2026
fa588a0
Fixed broken links
danjoa Jan 12, 2026
2e21be1
Added release notes for Renovated Capire
danjoa Jan 12, 2026
98d3ee1
Feature Matrix: Remote Analytics Support (#1991)
eugene-andreev Jan 12, 2026
1945aa6
Replaced collapsed details block on callouts w/ regular heading
danjoa Jan 12, 2026
268c561
fix require 'lib/add' (#2312)
vl-leon Jan 12, 2026
2eee47f
chore(deps): update dependency cspell to v9.6.0 (#2311)
renovate[bot] Jan 12, 2026
951c615
Cosmetics in get-started
chgeo Jan 9, 2026
5704f8f
Move MTX down in sidebar
chgeo Jan 12, 2026
708919d
Redirect for deployment/
chgeo Jan 12, 2026
bd1bcb4
Delete unreleased/internal md sources in external builds
chgeo Jan 12, 2026
9897f34
polishing
danjoa Jan 12, 2026
4aaae47
...
danjoa Jan 12, 2026
9799a9c
Streamlined SQLite guide
danjoa Jan 12, 2026
5c96a58
...
danjoa Jan 12, 2026
c567eb8
Filled in index.md databases section
danjoa Jan 13, 2026
67104f8
More polishing applied to database guides overview
danjoa Jan 13, 2026
8ed2c65
Fixed text backgrounds in overview diagram
danjoa Jan 13, 2026
20ae348
chore(deps): update dependency @typescript-eslint/parser to v8.53.0 (…
renovate[bot] Jan 13, 2026
e5a98d9
Forward-declared in quotes
danjoa Jan 13, 2026
5b0bbbf
fix: update Node.js installation command and add Java/Maven extension…
danjoa Jan 14, 2026
67820f6
...
danjoa Jan 14, 2026
efc7ba9
Re-beautified builtin types table
danjoa Jan 14, 2026
2d42e99
chore: Update CLI texts (#2314)
github-actions[bot] Jan 14, 2026
c0a7a4c
Revised security guide (#2223)
BraunMatthias Jan 14, 2026
5fac9ee
typos and minor changes related to profiling
renejeglinsky Jan 14, 2026
c7fa95c
Minor editing in various guides
swaldmann Jan 14, 2026
243847b
Fix typo `satus` → `status` in diagram (#2315)
swaldmann Jan 14, 2026
c4554c0
feat: `CXL` documentation (#2260)
patricebender Jan 15, 2026
0bd3fe6
Update build guide for clarity and plugin usage (#2317)
swaldmann Jan 15, 2026
1c2058c
Support nested sidebar folders in index pages
chgeo Jan 15, 2026
3403815
Align link
chgeo Jan 15, 2026
3208fe9
Update year in copyright notice (#2318)
swaldmann Jan 16, 2026
7bf22e6
chore(deps): update dependency @sap/cds to v9.6.3 (#2316)
renovate[bot] Jan 16, 2026
345ac35
minor edits and typos
renejeglinsky Jan 16, 2026
61b9662
Merge branch 'main' of https://github.com/capire/docs
renejeglinsky Jan 16, 2026
5b771e3
Revert "Support nested sidebar folders in index pages"
chgeo Jan 16, 2026
394acb2
Java: Document `@cds.java.ignore` (#2097)
vmikhailenko Jan 16, 2026
d05b527
chore(deps): update dependency eslint-plugin-vue to v10.7.0 (#2322)
renovate[bot] Jan 19, 2026
a760e03
Integration before Federation
danjoa Jan 19, 2026
8e5ab2c
Revisit security section
danjoa Jan 19, 2026
13f0559
Added warning about Known Limitation: Hanging INSERT, Draft, LargeBin…
PDT42 Jan 19, 2026
b735ff2
Small additions and fixes to initial-data.md (#2319)
qmacro Jan 19, 2026
f868295
fix: line height for `h1` on start page (#2323)
swaldmann Jan 19, 2026
85bbd70
chore(deps): update dependency @typescript-eslint/parser to v8.53.1 (…
renovate[bot] Jan 20, 2026
76fc00c
Fix broken link in Consuming Services (#2324)
Akatuoro Jan 20, 2026
71a7ee0
Exclude internal file
chgeo Jan 20, 2026
32d833b
Replace built-in by custom sidemap
chgeo Jan 20, 2026
66a0ebf
Remove obsolete page
chgeo Jan 20, 2026
24b55d7
Exclude scratchpad file
chgeo Jan 20, 2026
87fccf9
Remove empty page
chgeo Jan 20, 2026
c1eaba8
Fix title
chgeo Jan 20, 2026
852ceb4
Remove empty page
chgeo Jan 20, 2026
90468f3
Fix sitemap URL root
chgeo Jan 20, 2026
f640abb
Fixed quotes in a sample restriction (#2326)
BraunMatthias Jan 20, 2026
63e066b
Exclude `_menu.md` files
chgeo Jan 20, 2026
74e3307
Don't prune menu.md files
chgeo Jan 20, 2026
fccbdae
remove old warning syntax ans symbol
renejeglinsky Jan 20, 2026
209cd64
Exclude dummy pages for now
chgeo Jan 20, 2026
b656b66
Exclude pages by adding to srcExcludes
chgeo Jan 20, 2026
9a98255
chore: please eslint
chgeo Jan 20, 2026
4f6ce0b
chore: please eslint II
chgeo Jan 20, 2026
bcfdce1
Center table column left, improving legibility
chgeo Jan 21, 2026
e165eb6
Fix table formatting, improving legibility
chgeo Jan 21, 2026
48788f8
chore: Update CLI texts (#2330)
github-actions[bot] Jan 21, 2026
6de5fec
chore(deps): update dependency @sap/cds to v9.6.4 (#2328)
renovate[bot] Jan 21, 2026
1ffa31f
Enable `dcl` code fences, aliased to `cds` for now
chgeo Jan 21, 2026
9879344
fix: missing sql in code group in `cxl` (#2327)
patricebender Jan 21, 2026
05f0933
Improve messaging docs (#2265)
vkozyura Jan 21, 2026
aa84664
Update of CDS grammar
chgeo Jan 21, 2026
c9229f5
Flag internal and unreleased content
chgeo Jan 21, 2026
4676ac1
Flag internal link
chgeo Jan 21, 2026
5ea6b42
...
danjoa Jan 21, 2026
fe506c7
Calesi guide (wip)
danjoa Jan 21, 2026
0273ffc
toc toc
danjoa Jan 21, 2026
6d7d3a2
Cosmetics
chgeo Jan 22, 2026
4062f59
Remove link to deleted page
chgeo Jan 22, 2026
5100781
fragment entrypoint (#2332)
Akatuoro Jan 22, 2026
2358b81
chore(deps): update dependency sass to v1.97.3 (#2334)
renovate[bot] Jan 22, 2026
54c7cab
Move more redirects over here
chgeo Jan 22, 2026
fcd7e82
.learn-more margins tabula rasa
danjoa Jan 22, 2026
0c8b08c
Moving calesi diagrams to calesi guide
danjoa Jan 22, 2026
8122f14
Provided a better solution for reading dead outbox entries (#1940)
t-bonk Jan 22, 2026
f10ab34
Remove java mtx classic (#2336)
BraunMatthias Jan 23, 2026
20c8fde
Review feedback (#2333)
BraunMatthias Jan 23, 2026
25eb427
Streamlined calesi guide
danjoa Jan 23, 2026
7938699
Added qmacro section
danjoa Jan 23, 2026
481b22a
fixed link
danjoa Jan 23, 2026
231cb22
update 'qmacro' section of learn-more.md (#2337)
qmacro Jan 23, 2026
08e9114
...
danjoa Jan 23, 2026
8eed936
+-
danjoa Jan 23, 2026
32bc0bc
Badge for archive builds
chgeo Jan 23, 2026
f3760b1
less voodoo
danjoa Jan 25, 2026
33e6ded
Added @media print styles
danjoa Jan 25, 2026
f30feb8
Refined structure: Data Federation moved under Integration
danjoa Jan 25, 2026
aeba7cc
Add telemetry and release notes sections for CAP console (#2320)
johanneseschrig Jan 26, 2026
af1fee7
Add Kyma mtx-upgrade task to MT docs (#2335)
swaldmann Jan 26, 2026
26e43a8
Clean up redirects in Java section
renejeglinsky Jan 26, 2026
8d0e20d
Less UI noise
chgeo Jan 26, 2026
f7e9583
Fix code fence type
chgeo Jan 26, 2026
776bffe
Align text colors to black
chgeo Jan 26, 2026
9998aa5
Align code fence types to be lower-case
chgeo Jan 26, 2026
07c5359
Don't blur the relevant lines
chgeo Jan 26, 2026
69cc142
Not using tips for background info
chgeo Jan 26, 2026
b750b9d
Remove duplicated content
chgeo Jan 26, 2026
e031de7
Whitespace cosmetics
chgeo Jan 26, 2026
0b1a52e
More tip titles
chgeo Jan 26, 2026
402eae7
Whitespace cosmetics
chgeo Jan 26, 2026
336b943
Warnings, tips first, notes last
chgeo Jan 26, 2026
c6b3534
Cosmetics, link for window functions
chgeo Jan 26, 2026
1ea8762
Bring back danger notes on initial data on HANA
chgeo Jan 26, 2026
e84bb5c
Note on boolean quoting
chgeo Jan 26, 2026
9bb5d57
Whitespace cosmetics
chgeo Jan 26, 2026
ba84d1a
Tip titles
chgeo Jan 26, 2026
a75f3b1
Stable link
chgeo Jan 26, 2026
cbc5419
Alternative approach on adding reuse content
chgeo Jan 26, 2026
cd515b4
Note on HANA versions, rather than warning
chgeo Jan 26, 2026
fa267f0
Note on HDI
chgeo Jan 26, 2026
ad1fa13
`cds deploy --to hana` revisited
chgeo Jan 26, 2026
e077df8
Cosmetics in HANA embeddings
chgeo Jan 26, 2026
c83c169
HANA funcs: better sample, link to HANA docs
chgeo Jan 26, 2026
6e09f9c
Cosmetics for HANA schevo
chgeo Jan 26, 2026
d9916c6
Danger note on undeploying tables
chgeo Jan 26, 2026
081d1d5
Fix color contrast in dark mode
chgeo Jan 27, 2026
a8e98c6
Typo
chgeo Jan 27, 2026
528f2da
calesi guide ... still wip
danjoa Jan 27, 2026
013ed85
Only enable twoslash in CI builds
chgeo Jan 27, 2026
24fb99e
Semver, dependency bump
chgeo Jan 27, 2026
3b22543
Fix anchor links
chgeo Jan 27, 2026
89e1340
Allow links to close-to-ready calesi guide
chgeo Jan 27, 2026
9d91c55
Ignore error in conceptual snippet
chgeo Jan 27, 2026
a64205e
Added pre-built integration packages, Served to Fiorio UIs, Mocked Ou…
danjoa Jan 27, 2026
3647726
fix glitch in deploy option example (#2341)
ecklie Jan 28, 2026
727feac
chore: Update CLI texts (#2343)
github-actions[bot] Jan 28, 2026
f145c1f
minor improvements to learn-more.md (#2340)
qmacro Jan 28, 2026
85b59ba
calesi wip...
danjoa Jan 28, 2026
d1ea9e9
ai-supported review
renejeglinsky Jan 28, 2026
8ef2be6
[cds^9.7] support for express 4 and 5 (#2115)
sjvans Jan 28, 2026
c316f4b
fix link (#2347)
renejeglinsky Jan 28, 2026
dd62880
update plugin guide (#2345)
rjayasinghe Jan 28, 2026
da04807
Redirect for old consuming-services guide
chgeo Jan 28, 2026
3462e38
Make svg work in dark mode
chgeo Jan 28, 2026
53ad825
Shortcut for Scroll-to-top
chgeo Jan 28, 2026
4851e93
Align close button in keyboard dialog
chgeo Jan 28, 2026
b3f4a77
Badge for archive version has precedence
chgeo Jan 28, 2026
fe0a70f
Cleanup
chgeo Jan 28, 2026
ad8cd33
Update calesi.md
danjoa Jan 28, 2026
11386b0
ai-supported edit for simpler formulations
renejeglinsky Jan 29, 2026
57bc498
Merge branch 'main' of https://github.com/capire/docs
renejeglinsky Jan 29, 2026
586cf5b
ai-supported edit
renejeglinsky Jan 29, 2026
0f2417a
Remove non-existing commands, add xsuaa/ias (#2349)
swaldmann Jan 29, 2026
02d8a50
chore(deps): update cap java sdk to v4.6.2 (#2348)
renovate[bot] Jan 29, 2026
b00f66e
chore(deps): update dependency @mdit/plugin-dl to v0.22.3 (#2346)
renovate[bot] Jan 29, 2026
0b51630
Fix `cds up --to kyma` → `cds up --to k8s`
swaldmann Jan 29, 2026
ee690e4
ai-supported edit
renejeglinsky Jan 29, 2026
38e09ea
ai-assisted edit
renejeglinsky Jan 29, 2026
4f3fe22
...
danjoa Jan 29, 2026
ddce866
Splitted overly lengthy calesi guide
danjoa Jan 30, 2026
01e40d7
ai-assisted edit
renejeglinsky Jan 30, 2026
6b75bdc
replaced doubled airports with airlines
renejeglinsky Jan 30, 2026
924ba19
merge main
renejeglinsky Jan 30, 2026
220be72
Fixed database guides
danjoa Jan 30, 2026
ee3b5cb
...
danjoa Jan 30, 2026
1ebff7d
Data Federation Guide, part I -> ready for Jan release
danjoa Jan 30, 2026
a22385f
extracted data federation
danjoa Jan 30, 2026
99468c8
cleanup
danjoa Feb 2, 2026
ebf2c97
cds.ql.clone
danjoa Feb 2, 2026
9e8111d
calesi finished
danjoa Feb 2, 2026
6f7b2e2
Update CDS grammar (#2353)
tim-sh Feb 2, 2026
95a66c5
Fix anchor links
chgeo Feb 2, 2026
4f8cdf8
chore(deps): update dependency com.sap.cds:cds4j-api to v4.7.0 (#2355)
renovate[bot] Feb 2, 2026
c4d4f40
Archived outdated Consuming Services guide
danjoa Feb 2, 2026
94c9209
...
danjoa Feb 2, 2026
48ebab6
...
danjoa Feb 2, 2026
87aaf8e
fixed broken link to unreleased
danjoa Feb 2, 2026
247f208
chore(deps): update dependency com.sap.cds:cds-services-api to v4.7.0…
renovate[bot] Feb 2, 2026
b0c26f3
polishing
danjoa Feb 2, 2026
f00089e
polishing
danjoa Feb 2, 2026
c89a229
fixed redirects
danjoa Feb 2, 2026
034e802
Update redirects.md
danjoa Feb 2, 2026
c770621
Don't line-break code snippets
chgeo Feb 2, 2026
88f3d7d
one more redirects fix
danjoa Feb 2, 2026
4d78648
polishing
danjoa Feb 3, 2026
2b1bbde
chore(deps): update dependency @sap/cds to v9.7.0 (#2357)
renovate[bot] Feb 3, 2026
0d58f8b
..
danjoa Feb 3, 2026
24d7db1
chore(deps): update dependency @shikijs/vitepress-twoslash to v3.22.0…
renovate[bot] Feb 3, 2026
4e1fc3b
Add titles for warnings and tips
chgeo Feb 3, 2026
08f0509
fix indentation
renejeglinsky Feb 3, 2026
3f2fdb8
fix since tag
renejeglinsky Feb 3, 2026
cc7b9e4
Fix `<Since>` badge to use `package`
chgeo Feb 3, 2026
75c78b5
Include `--nodejs` where necessary in `cds init --add sample` et al. …
swaldmann Feb 3, 2026
8a0855f
chore(deps): update dependency cspell to v9.6.3 (#2338)
renovate[bot] Feb 3, 2026
670175b
Add titles for warnings and tips
chgeo Feb 3, 2026
1a4a2e3
Fix svg in dark mode
chgeo Feb 3, 2026
ad07098
Hint on add http, better Java snippet
chgeo Feb 3, 2026
83d8b63
Whitespace cosmetics
chgeo Feb 3, 2026
d7d87bb
[review] Security Guide (#2321)
renejeglinsky Feb 3, 2026
d2c9474
proper title case, small edit
renejeglinsky Feb 4, 2026
81730f5
Merge branch 'main' of https://github.com/capire/docs
renejeglinsky Feb 4, 2026
48523e5
better list wrt accessibility
renejeglinsky Feb 4, 2026
efe1066
cosmetics
smahati Feb 4, 2026
f183bbe
improve list
renejeglinsky Feb 4, 2026
2c63b55
quick edit
renejeglinsky Feb 4, 2026
73fffff
Minor typo fixes to cds-ql.md (#2361)
qmacro Feb 4, 2026
2196a7f
...
danjoa Feb 4, 2026
71ed631
Reverted back to "as if they were local"
danjoa Feb 4, 2026
f3fbaa9
Merge branch 'main' of https://github.com/capire/docs
renejeglinsky Feb 4, 2026
160f93b
Update inner-loops.md
danjoa Feb 4, 2026
b86be7b
Merge branch 'main' of https://github.com/cap-js/docs
danjoa Feb 4, 2026
0c2bba0
cosmetics
smahati Feb 4, 2026
8e57112
fix features folder (#2360)
vl-leon Feb 4, 2026
25bcd64
.
danjoa Feb 4, 2026
10ffb8d
Flattened menu for Security & Data Privacy
danjoa Feb 4, 2026
fde8911
Fixed text and line colors (had some alpha)
danjoa Feb 4, 2026
e1a156d
Remove useless local link
chgeo Feb 4, 2026
d78f10d
Toggle don't interfere on non-toggled pages
chgeo Feb 4, 2026
68cb1c5
Toggle don't interfere on non-toggled pages II
chgeo Feb 4, 2026
a4536d9
polished slogans
danjoa Feb 5, 2026
ed15c09
polishing
danjoa Feb 5, 2026
d476a32
polishing
danjoa Feb 5, 2026
351c27b
polishing
danjoa Feb 5, 2026
1ece44c
wording
danjoa Feb 5, 2026
145712b
Update dependency cspell to v9.6.4 (#2359)
renovate[bot] Feb 5, 2026
aa57c22
resolve conflicts
renejeglinsky Feb 5, 2026
1261d31
Refined menu structure and titles in security
danjoa Feb 5, 2026
d1ddb98
Publish link to data-federation
chgeo Feb 5, 2026
3637e7e
Link to inner-loop from index page
chgeo Feb 5, 2026
51c6c82
polished syntax diagram
danjoa Feb 5, 2026
d3d4a06
Fix cxl diag in dark mode
chgeo Feb 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 0 additions & 4 deletions .github/eslint-plugin/js-rule-stub.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
---
status: released
---

<script setup>
import PlaygroundBadge from '../../components/PlaygroundBadge.vue'
</script>
Expand Down
78 changes: 39 additions & 39 deletions .vitepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@
const base = process.env.GH_BASE || '/docs/'

// Construct vitepress config object...
import path from 'node:path'
import { defineConfig } from 'vitepress'
import languages from './languages'
import path from 'node:path'
import { Menu } from './menu.js'

const menu = await Menu.from ('./menu.md')

const config = defineConfig({

title: 'capire',
Expand All @@ -26,21 +24,33 @@ const config = defineConfig({
'**/LICENSE.md',
'**/CONTRIBUTING.md',
'**/CODE_OF_CONDUCT.md',
'**/redirects.md',
'**/menu.md',
'**/-*.md'
'**/_menu.md',
'**/-*.md',
'**/internal.md',
'**/FIXME.md',
],

markdown: {
languages,
toc: {
level: [2,3]
},
},
container: { // Doesn't seem to work yet
infoLabel: 'Info',
noteLabel: 'Note',
tipLabel: 'Tip',
warningLabel: 'Warning',
dangerLabel: 'Danger!',
cautionLabel: 'Caution!',
importantLabel: 'Important!',
detailsLabel: 'Details'
}
},

themeConfig: {
sidebar: menu.items,
nav: menu.navbar,
logo: '/cap-logo.svg',
logo: '/logos/cap.svg',
outline: [2,3],
socialLinks: [
{ icon: 'github', link: 'https://github.com/capire/docs' }
Expand All @@ -64,7 +74,7 @@ const config = defineConfig({
['meta', { 'http-equiv': 'Content-Security-Policy', content: "script-src 'self' https://www.capire-matomo.cloud.sap 'unsafe-inline' 'unsafe-eval'" }],
['link', { rel: 'icon', href: base+'favicon.ico' }],
['link', { rel: 'shortcut icon', href: base+'favicon.ico' }],
['link', { rel: 'apple-touch-icon', sizes: '180x180', href: base+'cap-logo.png' }],
['link', { rel: 'apple-touch-icon', sizes: '180x180', href: base+'logos/cap.png' }],
['script', { src: base+'script.js' } ]
],

Expand Down Expand Up @@ -95,21 +105,22 @@ import rewrites from './rewrites'
config.rewrites = rewrites

// Read menu from local menu.md, but only if we run standalone, not embeded as @external
// if (process.cwd() === path.dirname(__dirname)) {
// const menu_md = path.resolve (__filename,'../../menu.md')
// const Menu = await import('./menu')
// const menu = await Menu.from (menu_md, rewrites)
// config.themeConfig.sidebar = menu.items
// config.themeConfig.nav = menu.navbar
// }
if (process.cwd() === path.dirname(__dirname)) {
const menu = await Menu.from ('./menu.md', rewrites)
config.themeConfig.sidebar = menu.items
config.themeConfig.nav = menu.navbar
}

// Add custom capire info to the theme config
const siteURL = new URL(process.env.SITE_HOSTNAME || 'http://localhost:4173/docs/')
if (!siteURL.pathname.endsWith('/')) siteURL.pathname += '/'
config.themeConfig.capire = {
versions: {
java_services: '4.6.0',
java_cds4j: '4.6.0'
java_services: '4.7.0',
java_cds4j: '4.7.0'
},
gotoLinks: []
gotoLinks: [],
siteURL
}

// Add meta tag to prevent indexing of preview deployments
Expand Down Expand Up @@ -173,46 +184,35 @@ config.themeConfig.search = {
}
}

// Add twoslash transformer to the markdown config
// Add twoslash transformer to the markdown config (if requested as it slows down builds)
import { transformerTwoslash } from '@shikijs/vitepress-twoslash'
config.markdown.codeTransformers = [
transformerTwoslash()
]
if (process.env.VITE_CAPIRE_EXTRA_ASSETS) {
config.markdown.codeTransformers = [ transformerTwoslash() ]
}

// Add custom markdown renderers...
import { dl } from '@mdit/plugin-dl'
import * as MdAttrsPropagate from './lib/md-attrs-propagate'
import * as MdTypedModels from './lib/md-typed-models'

config.markdown.config = md => {
MdAttrsPropagate.install(md)
MdTypedModels.install(md)
}

// Add sitemap
const siteURL = new URL(process.env.SITE_HOSTNAME || 'http://localhost:4173/docs')
if (!siteURL.pathname.endsWith('/')) siteURL.pathname += '/'
config.sitemap = {
hostname: siteURL.href
md.use(dl)
}

// Add custom buildEnd hook
import * as cdsMavenSite from './lib/cds-maven-site'
import { promises as fs } from 'node:fs'
import * as cdsMavenSite from './lib/cds-maven-site'
config.buildEnd = async ({ outDir, site }) => {
const sitemapURL = new URL(siteURL.href)
const sitemapURL = new URL(config.themeConfig.capire.siteURL.href)
sitemapURL.pathname = path.join(sitemapURL.pathname, 'sitemap.xml')
console.debug('✓ writing robots.txt with sitemap URL', sitemapURL.href) // eslint-disable-line no-console
const robots = (await fs.readFile(path.resolve(__dirname, 'robots.txt'))).toString().replace('{{SITEMAP}}', sitemapURL.href)
await fs.writeFile(path.join(outDir, 'robots.txt'), robots)

// disabled by default to avoid online fetches during local build
if (process.env.VITE_CAPIRE_EXTRA_ASSETS) {
// zip assets aren't copied automatically, and `vite.assetInclude` doesn't work either
const hanaAssetDir = 'advanced/assets'
const hanaAsset = path.join(hanaAssetDir, 'native-hana-samples.zip')
await fs.mkdir(path.join(outDir, hanaAssetDir), {recursive: true})
console.debug('✓ copying HANA assets to ', path.join(outDir, hanaAsset)) // eslint-disable-line no-console

await fs.copyFile(path.join(__dirname, '..', hanaAsset), path.join(outDir, hanaAsset))
await cdsMavenSite.copySiteAssets(path.join(outDir, 'java/assets/cds-maven-plugin-site'), site)
}
}
Loading