From b7b82cd60eb32a2539aebd02caf785238c2adf54 Mon Sep 17 00:00:00 2001 From: manandre <2341261+manandre@users.noreply.github.com> Date: Sat, 14 Sep 2019 22:43:46 +0200 Subject: [PATCH 01/14] Add PDF generation in APIdoc --- FollowingFileStream.APIdoc/.gitignore | 1 + FollowingFileStream.APIdoc/docfx.json | 60 ++++++++++++++++++++++++++ FollowingFileStream.APIdoc/pdf/toc.yml | 4 ++ 3 files changed, 65 insertions(+) create mode 100644 FollowingFileStream.APIdoc/pdf/toc.yml 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..bc7fe73 100644 --- a/FollowingFileStream.APIdoc/docfx.json +++ b/FollowingFileStream.APIdoc/docfx.json @@ -74,5 +74,65 @@ "keepFileLink": false, "cleanupCacheHistory": false, "disableGitFeatures": false + }, + "pdf": { + "content": [ + { + "files": [ + "api/**.yml", + "api/index.md" + ], + "exclude": [ + "**/toc.yml", + "**/toc.md" + ] + }, + { + "files": [ + "articles/**.md", + "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}" + ] } } \ No newline at end of file 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 From 8a5e161ec0c81d91cee213ebd1ddf7d7ea7a0372 Mon Sep 17 00:00:00 2001 From: manandre <2341261+manandre@users.noreply.github.com> Date: Sat, 14 Sep 2019 22:56:10 +0200 Subject: [PATCH 02/14] Update azure-pipelines.yml for choco install wkhtmltopdf --- azure-pipelines.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c8ffc3b..2b00b48 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 From d7daceb8b19e6bdc09f978844f10eeab4ab0ffcb Mon Sep 17 00:00:00 2001 From: manandre <2341261+manandre@users.noreply.github.com> Date: Sat, 14 Sep 2019 23:22:40 +0200 Subject: [PATCH 03/14] Enable noStdIn option for Azure Devops build cf. https://github.com/dotnet/docfx/pull/4719 --- FollowingFileStream.APIdoc/docfx.json | 1 + 1 file changed, 1 insertion(+) diff --git a/FollowingFileStream.APIdoc/docfx.json b/FollowingFileStream.APIdoc/docfx.json index bc7fe73..0ee2fc5 100644 --- a/FollowingFileStream.APIdoc/docfx.json +++ b/FollowingFileStream.APIdoc/docfx.json @@ -76,6 +76,7 @@ "disableGitFeatures": false }, "pdf": { + "noStdin": true, "content": [ { "files": [ From 6f0bd246b2b4fed49dc33cf3576b3cd5b8e58eb6 Mon Sep 17 00:00:00 2001 From: manandre <2341261+manandre@users.noreply.github.com> Date: Sat, 14 Sep 2019 23:29:58 +0200 Subject: [PATCH 04/14] Update azure-pipelines.yml for chocolatey debug --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2b00b48..9a56eb1 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -156,6 +156,7 @@ jobs: - task: ChocolateyCommand@0 inputs: command: 'install' + debug: true installPackageId: 'wkhtmltopdf' # First restore to resolve external dependencies From 23e810ade0ba788f1ad32fb1f5db364af3f25543 Mon Sep 17 00:00:00 2001 From: manandre <2341261+manandre@users.noreply.github.com> Date: Sun, 15 Sep 2019 00:14:07 +0200 Subject: [PATCH 05/14] Update azure-pipelines.yml for choco verbose logging --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9a56eb1..b8ae5e0 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -157,6 +157,7 @@ jobs: inputs: command: 'install' debug: true + verbose: true installPackageId: 'wkhtmltopdf' # First restore to resolve external dependencies From 57fdf60988c8ebbeb94b463c7e83a42eef1d1771 Mon Sep 17 00:00:00 2001 From: manandre <2341261+manandre@users.noreply.github.com> Date: Sun, 15 Sep 2019 00:43:32 +0200 Subject: [PATCH 06/14] Update azure-pipelines.yml for choco debugging --- azure-pipelines.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b8ae5e0..938240c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -153,6 +153,10 @@ jobs: pool: vmImage: 'windows-latest' steps: + - task: PowerShell@2 + inputs: + targetType: 'inline' + script: 'choco install wkhtmltopdf --debug -y --no-progress' - task: ChocolateyCommand@0 inputs: command: 'install' From 93caf000b107dd73bbdef619f119d019e37df92d Mon Sep 17 00:00:00 2001 From: manandre <2341261+manandre@users.noreply.github.com> Date: Sun, 15 Sep 2019 00:46:45 +0200 Subject: [PATCH 07/14] Update azure-pipelines.yml for choco debugging step 2 --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 938240c..896d579 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -156,7 +156,7 @@ jobs: - task: PowerShell@2 inputs: targetType: 'inline' - script: 'choco install wkhtmltopdf --debug -y --no-progress' + script: 'choco install wkhtmltopdf -y' - task: ChocolateyCommand@0 inputs: command: 'install' From 45f6d6489263f0796b7e6d87c8aefc67cb71a345 Mon Sep 17 00:00:00 2001 From: manandre <2341261+manandre@users.noreply.github.com> Date: Sun, 15 Sep 2019 00:53:14 +0200 Subject: [PATCH 08/14] Update azure-pipelines.yml for choco debugging step 3 --- azure-pipelines.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 896d579..d98fd78 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -153,15 +153,12 @@ jobs: pool: vmImage: 'windows-latest' steps: - - task: PowerShell@2 - inputs: - targetType: 'inline' - script: 'choco install wkhtmltopdf -y' - task: ChocolateyCommand@0 inputs: command: 'install' debug: true verbose: true + trace: true installPackageId: 'wkhtmltopdf' # First restore to resolve external dependencies From 4f4a4e75a2b5a6e257afaf285ff4179ce608c2b7 Mon Sep 17 00:00:00 2001 From: manandre <2341261+manandre@users.noreply.github.com> Date: Sun, 15 Sep 2019 00:58:32 +0200 Subject: [PATCH 09/14] Update azure-pipelines.yml for choco debugging step 4 --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d98fd78..271e873 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -153,6 +153,7 @@ jobs: pool: vmImage: 'windows-latest' steps: + - task: ChocolateyCommand@0 inputs: command: 'install' From bf0f3cb053c562c52aeea722c84f5cbcffaf25b1 Mon Sep 17 00:00:00 2001 From: manandre <2341261+manandre@users.noreply.github.com> Date: Sun, 15 Sep 2019 01:00:32 +0200 Subject: [PATCH 10/14] Update azure-pipelines.yml for choco debugging step 5 --- azure-pipelines.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 271e873..e8f9ee9 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -153,7 +153,11 @@ jobs: pool: vmImage: 'windows-latest' steps: - + - task: PowerShell@2 + inputs: + targetType: 'inline' + script: 'choco list -l' + - task: ChocolateyCommand@0 inputs: command: 'install' From fd59ef94d637f880228af167712218c86abf5657 Mon Sep 17 00:00:00 2001 From: manandre <2341261+manandre@users.noreply.github.com> Date: Sun, 15 Sep 2019 01:32:52 +0200 Subject: [PATCH 11/14] Update azure-pipelines.yml for apidoc PDF publish --- azure-pipelines.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e8f9ee9..00276df 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -153,17 +153,9 @@ jobs: pool: vmImage: 'windows-latest' steps: - - task: PowerShell@2 - inputs: - targetType: 'inline' - script: 'choco list -l' - - task: ChocolateyCommand@0 inputs: command: 'install' - debug: true - verbose: true - trace: true installPackageId: 'wkhtmltopdf' # First restore to resolve external dependencies @@ -188,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/*.pdf' + ArtifactName: 'apidoc_pdf' publishLocation: 'Container' \ No newline at end of file From 83787457c8f2f98f5c9fe3b4ed33b03ca629a1f7 Mon Sep 17 00:00:00 2001 From: manandre <2341261+manandre@users.noreply.github.com> Date: Sun, 15 Sep 2019 01:38:22 +0200 Subject: [PATCH 12/14] Update azure-pipelines.yml for api doc PDF explicit path --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 00276df..cac8b84 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -189,6 +189,6 @@ jobs: - task: PublishBuildArtifacts@1 displayName: Publish PDF inputs: - PathtoPublish: '$(Build.SourcesDirectory)/FollowingFileStream.APIdoc/_site_pdf/*.pdf' + PathtoPublish: '$(Build.SourcesDirectory)/FollowingFileStream.APIdoc/_site_pdf/FollowingFileStream.APIdoc_pdf.pdf' ArtifactName: 'apidoc_pdf' publishLocation: 'Container' \ No newline at end of file From c319d6811bb2536d697a2ad5f7ccf25181f32719 Mon Sep 17 00:00:00 2001 From: manandre <2341261+manandre@users.noreply.github.com> Date: Sun, 15 Sep 2019 11:29:13 +0200 Subject: [PATCH 13/14] Add generated pdf to apidoc website --- FollowingFileStream.APIdoc/docfx.json | 93 ++++++++++++++------------- 1 file changed, 47 insertions(+), 46 deletions(-) diff --git a/FollowingFileStream.APIdoc/docfx.json b/FollowingFileStream.APIdoc/docfx.json index 0ee2fc5..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,28 @@ "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/**" ] } ], @@ -51,41 +71,23 @@ "apidoc/**.md" ], "exclude": [ - "obj/**", - "_site/**" + "**/bin/**", + "**/obj/**", + "_site_pdf/**" ] } ], - "dest": "_site", + "dest": "_site_pdf", "xrefService": [ "https://xref.docs.microsoft.com/query?uid={uid}" - ], - "globalMetadata": { - "_appTitle": "FollowingFileStream API Documentation Website", - "_enableSearch": true - }, - "fileMetadataFiles": [], - "template": [ - "default" - ], - "postProcessors": [], - "markdownEngineName": "markdig", - "noLangKeyword": false, - "keepFileLink": false, - "cleanupCacheHistory": false, - "disableGitFeatures": false + ] }, - "pdf": { - "noStdin": true, + "build": { "content": [ { "files": [ "api/**.yml", "api/index.md" - ], - "exclude": [ - "**/toc.yml", - "**/toc.md" ] }, { @@ -94,28 +96,14 @@ "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/**" + "images/**", + "_site_pdf/*.pdf" ] } ], @@ -125,15 +113,28 @@ "apidoc/**.md" ], "exclude": [ - "**/bin/**", - "**/obj/**", - "_site_pdf/**" + "obj/**", + "_site/**" ] } ], - "dest": "_site_pdf", + "dest": "_site", "xrefService": [ "https://xref.docs.microsoft.com/query?uid={uid}" - ] + ], + "globalMetadata": { + "_appTitle": "FollowingFileStream API Documentation Website", + "_enableSearch": true + }, + "fileMetadataFiles": [], + "template": [ + "default" + ], + "postProcessors": [], + "markdownEngineName": "markdig", + "noLangKeyword": false, + "keepFileLink": false, + "cleanupCacheHistory": false, + "disableGitFeatures": false } } \ No newline at end of file From 3e8316031724540470e6eb1f75065ae6ac7b0620 Mon Sep 17 00:00:00 2001 From: manandre <2341261+manandre@users.noreply.github.com> Date: Sun, 15 Sep 2019 11:45:36 +0200 Subject: [PATCH 14/14] Update README.md with link to APIdoc PDF --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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/)