diff --git a/FollowingFileStream.APIdoc/.gitignore b/FollowingFileStream.APIdoc/.gitignore index 4378419..bdeacc0 100644 --- a/FollowingFileStream.APIdoc/.gitignore +++ b/FollowingFileStream.APIdoc/.gitignore @@ -7,3 +7,4 @@ /**/bin/ /**/obj/ _site +_site_pdf diff --git a/FollowingFileStream.APIdoc/docfx.json b/FollowingFileStream.APIdoc/docfx.json index 103e1f1..269d171 100644 --- a/FollowingFileStream.APIdoc/docfx.json +++ b/FollowingFileStream.APIdoc/docfx.json @@ -21,12 +21,17 @@ } } ], - "build": { + "pdf": { + "noStdin": true, "content": [ { "files": [ "api/**.yml", "api/index.md" + ], + "exclude": [ + "**/toc.yml", + "**/toc.md" ] }, { @@ -35,13 +40,70 @@ "articles/**/toc.yml", "toc.yml", "*.md" + ], + "exclude": [ + "**/bin/**", + "**/obj/**", + "_site_pdf/**", + "**/toc.yml", + "**/toc.md" ] + }, + { + "files": "pdf/toc.yml" } ], "resource": [ { "files": [ "images/**" + ], + "exclude": [ + "**/bin/**", + "**/obj/**", + "_site_pdf/**" + ] + } + ], + "overwrite": [ + { + "files": [ + "apidoc/**.md" + ], + "exclude": [ + "**/bin/**", + "**/obj/**", + "_site_pdf/**" + ] + } + ], + "dest": "_site_pdf", + "xrefService": [ + "https://xref.docs.microsoft.com/query?uid={uid}" + ] + }, + "build": { + "content": [ + { + "files": [ + "api/**.yml", + "api/index.md" + ] + }, + { + "files": [ + "articles/**.md", + "articles/**/toc.yml", + "toc.yml", + "*.md" + ] + } + ], + "resource": [ + { + "files": [ + "images/**", + "_site_pdf/*.pdf" ] } ], diff --git a/FollowingFileStream.APIdoc/pdf/toc.yml b/FollowingFileStream.APIdoc/pdf/toc.yml new file mode 100644 index 0000000..97ce48a --- /dev/null +++ b/FollowingFileStream.APIdoc/pdf/toc.yml @@ -0,0 +1,4 @@ +- name: Articles + href: ../articles/toc.yml +- name: Api Documentation + href: ../api/toc.yml \ No newline at end of file diff --git a/README.md b/README.md index adb2bde..3475564 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Any read operation will not report a zero result while the file is locked for wr It is usually compared to the "tail -f" approach. -[API Documentation](https://followingfilestream.azurewebsites.net/api-doc) +[API Documentation](https://followingfilestream.azurewebsites.net/api-doc) [[PDF](https://followingfilestream.azurewebsites.net/api-doc/_site_pdf/FollowingFileStream.APIdoc_pdf.pdf)] [Source Browser](https://followingfilestream.azurewebsites.net/#FollowingFileStream/) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c8ffc3b..cac8b84 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -153,6 +153,11 @@ jobs: pool: vmImage: 'windows-latest' steps: + - task: ChocolateyCommand@0 + inputs: + command: 'install' + installPackageId: 'wkhtmltopdf' + # First restore to resolve external dependencies - task: DotNetCoreCLI@2 displayName: Restore @@ -175,7 +180,15 @@ jobs: replaceExistingArchive: true - task: PublishBuildArtifacts@1 + displayName: Publish Website inputs: PathtoPublish: '$(Build.ArtifactStagingDirectory)/apidoc_website.zip' ArtifactName: 'apidoc_website' + publishLocation: 'Container' + + - task: PublishBuildArtifacts@1 + displayName: Publish PDF + inputs: + PathtoPublish: '$(Build.SourcesDirectory)/FollowingFileStream.APIdoc/_site_pdf/FollowingFileStream.APIdoc_pdf.pdf' + ArtifactName: 'apidoc_pdf' publishLocation: 'Container' \ No newline at end of file