mirror of
https://github.com/dotMorten/NmeaParser.git
synced 2026-01-23 09:00:22 +01:00
Fix API reference links
This commit is contained in:
parent
70e911d42a
commit
1279c07e0f
4
.github/workflows/ghpages.yml
vendored
4
.github/workflows/ghpages.yml
vendored
|
|
@ -34,7 +34,9 @@ jobs:
|
|||
- name: Build Documentation
|
||||
env:
|
||||
DOCFX_SOURCE_BRANCH_NAME: master
|
||||
run: .tools/docfx/docfx.exe docs/docfx.json
|
||||
run: |
|
||||
.tools/docfx/docfx.exe docs/docfx.json
|
||||
powershell -ExecutionPolicy ByPass -command "docs\FixApiRefLinks" -Path %~dp0..\artifacts\docs_site\api\
|
||||
|
||||
- name: Publish Documentation
|
||||
env:
|
||||
|
|
|
|||
|
|
@ -18,4 +18,8 @@ mkdir %~dp0../artifacts/docs/api
|
|||
.tools\omd\generateomd /source=%~dp0../src/NmeaParser /output=%~dp0../artifacts/docs/api/omd.html /preprocessors=NETSTANDARD1_4;NETSTANDARD
|
||||
|
||||
REM Build the output site (HTML) from the generated metadata and input files (uses configuration in docfx.json in this folder)
|
||||
%DocFxFolder%\v%DocFXVersion%\docfx.exe %~dp0\docfx.json -t --serve
|
||||
REM %DocFxFolder%\v%DocFXVersion%\docfx.exe %~dp0\docfx.json
|
||||
ECHO Fixing API Reference Links
|
||||
powershell -ExecutionPolicy ByPass -command "%~dp0FixApiRefLinks.ps1" -Path %~dp0..\artifacts\docs_site\api\
|
||||
start http://localhost:8080
|
||||
%DocFxFolder%\v%DocFXVersion%\docfx.exe serve %~dp0..\artifacts\docs_site\
|
||||
14
docs/FixApiRefLinks.ps1
Normal file
14
docs/FixApiRefLinks.ps1
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
[cmdletbinding()]
|
||||
param([string]$Path)
|
||||
|
||||
function FixApiLinks([string]$path)
|
||||
{
|
||||
$files = Get-ChildItem -Path $path -Recurse -Include *.html
|
||||
foreach ($file in $files)
|
||||
{
|
||||
$content = Get-Content -Path $file
|
||||
$newContent = $content -replace "../(android|ios|uwp|netcore|netstd|netfx)/", ''
|
||||
$newContent | Set-Content -Path $file
|
||||
}
|
||||
}
|
||||
FixApiLinks -path $Path
|
||||
Loading…
Reference in a new issue