docs: [Zurück zur Übersicht](../README.md) in Alle in README für jeder Verzeichnis

This commit is contained in:
ISA
2025-06-24 08:22:48 +02:00
parent 82a1e11797
commit 0347ec9d98
243 changed files with 1425 additions and 283 deletions

27
add-footer.ps1 Normal file
View File

@@ -0,0 +1,27 @@
# Pfad zum docs-Ordner anpassen
$root = "C:\Users\isa.LTW\Desktop\24.06.2025\NodeMap\24.06.2025 NodeMap\docs"
# Alle .md-Dateien rekursiv holen, außer README.md
$mdFiles = Get-ChildItem -Path $root -Recurse -Filter *.md | Where-Object { $_.Name -ne "README.md" }
foreach ($file in $mdFiles) {
$content = Get-Content $file.FullName -Raw
if ($content -notmatch "\[Zurück zur Übersicht\]") {
# Pfad relativ zum Root-Ordner
$relativePath = $file.DirectoryName.Substring($root.Length).TrimStart('\')
$depth = if ($relativePath) { $relativePath.Split('\').Count } else { 0 }
# Rücksprungpfad berechnen
$backPath = ("../" * $depth) + "README.md"
# Footer-Text (ohne Emojis!)
$footer = "`n---`n`n[Zurück zur Übersicht]($backPath)`n`n"
# Footer anhängen
Add-Content -Path $file.FullName -Value $footer
Write-Host "✅ Footer hinzugefügt: $($file.FullName)"
} else {
Write-Host "🔄 Footer bereits vorhanden: $($file.FullName)"
}
}