Last active
November 12, 2017 21:25
-
-
Save GeorgDangl/192a067d9812ceacdeda6360a76eaea0 to your computer and use it in GitHub Desktop.
This snippet is useful when using DocFX in Jenkins to fix broken GitHub View Source links. https://blog.dangl.me/archive/creating-correct-source-code-links-with-docfx-in-jenkins/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$docsFolder = "$PSScriptRoot/generated_docs" | |
Get-ChildItem -Path "$docsFolder" -Filter "*.html" -Recurse | | |
Foreach-Object { | |
(Get-Content $_.FullName).replace("blob/$env:GIT_BRANCH", "blob/$env:GIT_COMMIT") | Set-Content $_.FullName | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment