File tree Expand file tree Collapse file tree 1 file changed +11
-14
lines changed
Expand file tree Collapse file tree 1 file changed +11
-14
lines changed Original file line number Diff line number Diff line change @@ -21,20 +21,17 @@ jobs:
2121
2222 - name : Fix for GitHub Pages
2323 run : |
24- # Pfad zur index.html im WASM-Output
25- INDEX_FILE="output/wwwroot/index.html"
26-
27- if [ -f "$INDEX_FILE" ]; then
28- echo "Patche index.html für GitHub Pages..."
29- # WICHTIG: Ersetze 'Blazor.SimpleGrid' durch deinen Repo-Namen auf GitHub
30- sed -i 's/<base href="\/" \/>/<base href="\/Blazor.SimpleGrid\/" \/>/g' "$INDEX_FILE"
31-
32- # Kopiere index.html zu 404.html, damit Deep-Links (wie /demo) funktionieren
33- cp "$INDEX_FILE" "output/wwwroot/404.html"
34- else
35- echo "FEHLER: index.html nicht gefunden. Prüfe den Pfad!"
36- exit 1
37- fi
24+ # 1. Base Href anpassen (Achte auf das exakte Format deiner index.html)
25+ # Wir nutzen hier ein flexibleres Suchmuster
26+ sed -i 's|<base href=".*" />|<base href="/Blazor.SimpleGrid/" />|g' output/wwwroot/index.html
27+
28+ # 2. Integritätsprüfung in der blazor.boot.json deaktivieren
29+ # Das Skript entfernt alle "sha256-..." Einträge
30+ sed -i 's/"sha256-[^"]*"/"sha256-ignore"/g' output/wwwroot/_framework/blazor.boot.json
31+
32+ # 3. 404.html erstellen
33+ cp output/wwwroot/index.html output/wwwroot/404.html
34+
3835
3936 - name : Upload to GitHub Pages
4037 uses : JamesIves/github-pages-deploy-action@v4
You can’t perform that action at this time.
0 commit comments