Skip to content

Commit 3db38e7

Browse files
authored
docs: improve docs and update docs with v4.0.0-beta.462 changes (#489)
2 parents 922c18e + bed8104 commit 3db38e7

File tree

96 files changed

+13523
-16833
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+13523
-16833
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ TODOs.md
2121

2222
package-lock.json
2323

24+
ui-sample

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Stage 1: Build Stage (oven/bun:1.3.4-alpine)
2-
FROM oven/bun:1.3.4-alpine AS builder
1+
# Stage 1: Build Stage (oven/bun:1.3.6-alpine)
2+
FROM oven/bun:1.3.6-alpine AS builder
33

44
ARG VITE_ANALYTICS_DOMAIN=coolify.io/docs
55
ARG VITE_SITE_URL=https://coolify.io/docs/
@@ -45,8 +45,8 @@ RUN --mount=type=cache,target=/root/.bun \
4545
--mount=type=cache,target=/app/docs/.vitepress/cache \
4646
bun run build
4747

48-
# Stage 2: NGINX Unprivileged Setup (1.27.3-alpine-slim, ARM64)
49-
FROM nginxinc/nginx-unprivileged:1.27.3-alpine-slim AS final
48+
# Stage 2: NGINX Unprivileged Setup (1.29.3-alpine-slim, ARM64)
49+
FROM nginxinc/nginx-unprivileged:1.29.3-alpine-slim AS final
5050

5151
# Set working directory for NGINX and copy built files from the build stage
5252
WORKDIR /usr/share/nginx/html

bun.lock

Lines changed: 187 additions & 225 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/.vitepress/config.mts

Lines changed: 88 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { fileURLToPath, URL } from 'node:url'
2-
import yaml from 'vite-plugin-yaml'
32
import llmstxt from 'vitepress-plugin-llms'
43
import { defineConfig } from 'vitepress'
54
import { useSidebar } from 'vitepress-openapi'
@@ -536,19 +535,101 @@ export default defineConfig({
536535

537536
markdown: {
538537
config: (md) => {
538+
// Success callout
539539
md.use(container, 'success', {
540540
validate: (params) => {
541541
return params.trim().match(/^success\s*(.*)$/)
542542
},
543543
render: (tokens, idx) => {
544544
const m = tokens[idx].info.trim().match(/^success\s+(.*)$/)
545545
if (tokens[idx].nesting === 1) {
546-
// opening tag
547-
return `<div class="custom-block success">${m ? `<p class="custom-block-title">${m[1]}</p>` : ''
548-
}\n`
546+
return `<Callout type="success" title="${m ? m[1] : ''}">`
549547
} else {
550-
// closing tag
551-
return '</div>\n'
548+
return '</Callout>'
549+
}
550+
}
551+
})
552+
// Tip callout
553+
md.use(container, 'tip', {
554+
validate: (params) => {
555+
return params.trim().match(/^tip\s*(.*)$/)
556+
},
557+
render: (tokens, idx) => {
558+
const m = tokens[idx].info.trim().match(/^tip\s+(.*)$/)
559+
if (tokens[idx].nesting === 1) {
560+
return `<Callout type="tip" title="${m ? m[1] : ''}">`
561+
} else {
562+
return '</Callout>'
563+
}
564+
}
565+
})
566+
// Warning callout
567+
md.use(container, 'warning', {
568+
validate: (params) => {
569+
return params.trim().match(/^warning\s*(.*)$/)
570+
},
571+
render: (tokens, idx) => {
572+
const m = tokens[idx].info.trim().match(/^warning\s+(.*)$/)
573+
if (tokens[idx].nesting === 1) {
574+
return `<Callout type="warning" title="${m ? m[1] : ''}">`
575+
} else {
576+
return '</Callout>'
577+
}
578+
}
579+
})
580+
// Danger callout
581+
md.use(container, 'danger', {
582+
validate: (params) => {
583+
return params.trim().match(/^danger\s*(.*)$/)
584+
},
585+
render: (tokens, idx) => {
586+
const m = tokens[idx].info.trim().match(/^danger\s+(.*)$/)
587+
if (tokens[idx].nesting === 1) {
588+
return `<Callout type="danger" title="${m ? m[1] : ''}">`
589+
} else {
590+
return '</Callout>'
591+
}
592+
}
593+
})
594+
// Info callout
595+
md.use(container, 'info', {
596+
validate: (params) => {
597+
return params.trim().match(/^info\s*(.*)$/)
598+
},
599+
render: (tokens, idx) => {
600+
const m = tokens[idx].info.trim().match(/^info\s+(.*)$/)
601+
if (tokens[idx].nesting === 1) {
602+
return `<Callout type="info" title="${m ? m[1] : ''}">`
603+
} else {
604+
return '</Callout>'
605+
}
606+
}
607+
})
608+
// Neutral callout
609+
md.use(container, 'neutral', {
610+
validate: (params) => {
611+
return params.trim().match(/^neutral\s*(.*)$/)
612+
},
613+
render: (tokens, idx) => {
614+
const m = tokens[idx].info.trim().match(/^neutral\s+(.*)$/)
615+
if (tokens[idx].nesting === 1) {
616+
return `<Callout type="neutral" title="${m ? m[1] : ''}">`
617+
} else {
618+
return '</Callout>'
619+
}
620+
}
621+
})
622+
// Details accordion
623+
md.use(container, 'details', {
624+
validate: (params) => {
625+
return params.trim().match(/^details\s*(.*)$/)
626+
},
627+
render: (tokens, idx) => {
628+
const m = tokens[idx].info.trim().match(/^details\s+(.*)$/)
629+
if (tokens[idx].nesting === 1) {
630+
return `<details class="text-sm rounded-xl border px-6 py-0 last:[&>*]:mb-4 my-4 text-zinc-600 dark:text-zinc-300" style="background-color: var(--coollabs-bg-zinc-300-5); border-color: var(--coollabs-border-zinc-300-20);"><summary class="font-semibold mb-2 cursor-pointer select-none text-zinc-800 dark:text-zinc-100">${m ? m[1] : ''}</summary>`
631+
} else {
632+
return '</details>'
552633
}
553634
}
554635
})
@@ -572,8 +653,7 @@ export default defineConfig({
572653

573654
vite: {
574655
plugins: [
575-
yaml as any,
576-
llmstxt({
656+
llmstxt({
577657
ignoreFiles: [
578658
'/docs/api-reference/api/**/*',
579659
'**/api-reference/api/**/*'
@@ -594,7 +674,6 @@ export default defineConfig({
594674
],
595675
}),
596676
],
597-
assetsInclude: ['**/*.yml'],
598677
define: {
599678
'import.meta.env.VITE_KORREKTLY_BASE_URL': JSON.stringify(env.KORREKTLY_BASE_URL || env.VITE_KORREKTLY_BASE_URL || ''),
600679
'import.meta.env.VITE_KORREKTLY_API_TOKEN': JSON.stringify(env.KORREKTLY_API_TOKEN || env.VITE_KORREKTLY_API_TOKEN || ''),

0 commit comments

Comments
 (0)