Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .mintignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,8 @@ CODE_OF_CONDUCT.md
CLAUDE.md
MEMORY.md
.github/

# Statik export build çıktıları — export'a sızmasın
dist/
export.zip
scripts/
14 changes: 13 additions & 1 deletion scripts/build-static.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ set -euo pipefail

SITE_URL="${SITE_URL:-https://harness.komunite.com.tr}"

# Önceki build kalıntıları export'a "statik asset" olarak sızmasın
# diye temizlik export'tan ÖNCE yapılır (dist/dist kontaminasyonu).
rm -rf dist export.zip

npx -y mint export --output export.zip

rm -rf dist
mkdir dist
if command -v unzip >/dev/null 2>&1; then
unzip -oq export.zip -d dist
Expand All @@ -21,6 +24,15 @@ rm -f export.zip

# Local önizleme yardımcıları hosting'de gereksiz.
rm -f dist/serve.js "dist/Start Docs.bat" "dist/Start Docs.command"
rm -rf dist/scripts

# Mintlify "slug/index" sayfalarını "/slug" URL'inde sunar; export ise
# sadece "slug/index/index.html" üretir ve iç linkler "/slug"a işaret
# eder. Sayfayı bir üst dizine kopyalayarak iki URL'i de çalıştır.
find dist -mindepth 2 -type d -name index | while IFS= read -r d; do
parent=$(dirname "$d")
[ -f "$parent/index.html" ] || cp "$d/index.html" "$parent/index.html"
done

# Export, custom domain'i bilmediği için OG/canonical URL'lerini
# undefined.mintlify.app olarak basıyor; gerçek domain ile değiştir.
Expand Down
Loading