From 5a71e5c1482c458c20962edfe6c9ed9637c2e9a7 Mon Sep 17 00:00:00 2001 From: Anairkoen Schno Date: Tue, 11 Jun 2019 17:18:35 -0500 Subject: [PATCH] View Source should now link to the exact commit it was built for --- appveyor.yml | 4 +++- docs/all_globals.json | 7 +++++++ docs/docfx.json | 5 +---- docs/templates/.gitignore | 1 + 4 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 docs/all_globals.json create mode 100644 docs/templates/.gitignore diff --git a/appveyor.yml b/appveyor.yml index 2320978a..d03cca0a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -49,8 +49,10 @@ after_deploy: if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE -And $env:APPVEYOR_REPO_BRANCH -eq 'master') { cd docs + + Add-Content link_branch.json "{`"_gitContribute`":{`"branch`":`"$env:APPVEYOR_REPO_COMMIT`"}}" & docfx metadata - & docfx build + & docfx build --globalMetadataFiles all_globals.json,link_branch.json if ($lastexitcode -ne 0){ throw [System.Exception] "docfx build failed with exit code $lastexitcode." } diff --git a/docs/all_globals.json b/docs/all_globals.json new file mode 100644 index 00000000..7c506dff --- /dev/null +++ b/docs/all_globals.json @@ -0,0 +1,7 @@ +{ + "_enableSearch": true, + "_enableNewTab": true, + "_gitContribute": { + "apiSpecFolder": "docs/override" + } +} \ No newline at end of file diff --git a/docs/docfx.json b/docs/docfx.json index cbfa415f..af72e22e 100644 --- a/docs/docfx.json +++ b/docs/docfx.json @@ -53,10 +53,7 @@ "template": [ "default", "templates/material/material" ], - "globalMetadata": { - "_enableSearch": true, - "_enableNewTab": true - }, + "globalMetadataFiles": ["all_globals.json"], "postProcessors": [], "markdownEngineName": "dfm", "noLangKeyword": false, diff --git a/docs/templates/.gitignore b/docs/templates/.gitignore new file mode 100644 index 00000000..cb4ae637 --- /dev/null +++ b/docs/templates/.gitignore @@ -0,0 +1 @@ +_exported_templates \ No newline at end of file