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