File tree Expand file tree Collapse file tree 2 files changed +20
-20
lines changed Expand file tree Collapse file tree 2 files changed +20
-20
lines changed Original file line number Diff line number Diff line change 4
4
5
5
echo " 🚩 ENABLE_TINA_ADMIN: $ENABLE_TINA_ADMIN "
6
6
7
- if [ " $ENABLE_TINA_ADMIN " = " true" ]; then
8
- echo " 📦 Building Tina admin UI..."
9
- npx @tinacms/cli build
10
-
11
- echo " 🧼 Copying Tina admin to static/cms-admin..."
12
- # Use cms-admin instead of admin to avoid Docusaurus routing conflicts
13
- rm -rf static/cms-admin
14
- cp -r public/admin static/cms-admin
7
+ if [[ " $ENABLE_TINA_ADMIN " == " true" ]]; then
8
+ echo " 📦 Building Tina admin UI…"
9
+ npx @tinacms/cli build # produces public/admin
10
+
11
+ # ------------------------------------------
12
+ # Copy Tina bundle into the final build dir
13
+ # ------------------------------------------
14
+ # DOCS_BASEURL may be "/", "/Docusaurus-docs/", etc.
15
+ BASE=" ${DOCS_BASEURL:-/ } "
16
+ BASE=" ${BASE#/ } " ; BASE=" ${BASE%/ } " # strip leading/trailing /
17
+ DEST=" build"
18
+ [[ -n " $BASE " ]] && DEST=" $DEST /$BASE "
19
+ DEST=" $DEST /admin"
20
+
21
+ echo " 🔀 Copying Tina → $DEST "
22
+ rm -rf " $DEST "
23
+ mkdir -p " $DEST "
24
+ cp -a public/admin/. " $DEST /"
15
25
else
16
- echo " ⏭️ Skipping Tina admin build (ENABLE_TINA_ADMIN is not true) "
26
+ echo " ⏭️ Tina admin build skipped "
17
27
fi
18
28
29
+
19
30
# Ensure sidebar index exists
20
31
if [ ! -f " src/sidebars/index.json" ]; then
21
32
echo ' {"items": []}' > src/sidebars/index.json
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments