diff --git a/FollowingFileStream.APIdoc/.gitignore b/FollowingFileStream.APIdoc/.gitignore new file mode 100644 index 0000000..4378419 --- /dev/null +++ b/FollowingFileStream.APIdoc/.gitignore @@ -0,0 +1,9 @@ +############### +# folder # +############### +/**/DROP/ +/**/TEMP/ +/**/packages/ +/**/bin/ +/**/obj/ +_site diff --git a/FollowingFileStream.APIdoc/FollowingFileStream.APIdoc.csproj b/FollowingFileStream.APIdoc/FollowingFileStream.APIdoc.csproj new file mode 100644 index 0000000..6b7f108 --- /dev/null +++ b/FollowingFileStream.APIdoc/FollowingFileStream.APIdoc.csproj @@ -0,0 +1,11 @@ + + + netstandard2.0 + $(MSBuildProjectDirectory)\_site + $(MSBuildProjectDirectory) + $(MSBuildProjectDirectory)\bin\docfx.log.txt + + + + + \ No newline at end of file diff --git a/FollowingFileStream.APIdoc/api/.gitignore b/FollowingFileStream.APIdoc/api/.gitignore new file mode 100644 index 0000000..e8079a3 --- /dev/null +++ b/FollowingFileStream.APIdoc/api/.gitignore @@ -0,0 +1,5 @@ +############### +# temp file # +############### +*.yml +.manifest diff --git a/FollowingFileStream.APIdoc/api/index.md b/FollowingFileStream.APIdoc/api/index.md new file mode 100644 index 0000000..78dc9c0 --- /dev/null +++ b/FollowingFileStream.APIdoc/api/index.md @@ -0,0 +1,2 @@ +# PLACEHOLDER +TODO: Add .NET projects to the *src* folder and run `docfx` to generate **REAL** *API Documentation*! diff --git a/FollowingFileStream.APIdoc/articles/intro.md b/FollowingFileStream.APIdoc/articles/intro.md new file mode 100644 index 0000000..c0478ce --- /dev/null +++ b/FollowingFileStream.APIdoc/articles/intro.md @@ -0,0 +1 @@ +# Add your introductions here! diff --git a/FollowingFileStream.APIdoc/articles/toc.yml b/FollowingFileStream.APIdoc/articles/toc.yml new file mode 100644 index 0000000..ff89ef1 --- /dev/null +++ b/FollowingFileStream.APIdoc/articles/toc.yml @@ -0,0 +1,2 @@ +- name: Introduction + href: intro.md diff --git a/FollowingFileStream.APIdoc/docfx.json b/FollowingFileStream.APIdoc/docfx.json new file mode 100644 index 0000000..234562f --- /dev/null +++ b/FollowingFileStream.APIdoc/docfx.json @@ -0,0 +1,69 @@ +{ + "metadata": [ + { + "src": [ + { + "src": "../", + "files": [ + "FollowingFileStream/**.cs" + ], + "exclude": [ + "**/bin/**", + "**/obj/**" + ] + } + ], + "dest": "api", + "disableGitFeatures": false, + "disableDefaultFilter": false + } + ], + "build": { + "content": [ + { + "files": [ + "api/**.yml", + "api/index.md" + ] + }, + { + "files": [ + "articles/**.md", + "articles/**/toc.yml", + "toc.yml", + "*.md" + ] + } + ], + "resource": [ + { + "files": [ + "images/**" + ] + } + ], + "overwrite": [ + { + "files": [ + "apidoc/**.md" + ], + "exclude": [ + "obj/**", + "_site/**" + ] + } + ], + "dest": "_site", + "globalMetadataFiles": [], + "fileMetadataFiles": [], + "template": [ + "default" + ], + "postProcessors": [], + "markdownEngineName": "markdig", + "noLangKeyword": false, + "keepFileLink": false, + "cleanupCacheHistory": false, + "disableGitFeatures": false + } +} \ No newline at end of file diff --git a/FollowingFileStream.APIdoc/index.md b/FollowingFileStream.APIdoc/index.md new file mode 100644 index 0000000..3ae2506 --- /dev/null +++ b/FollowingFileStream.APIdoc/index.md @@ -0,0 +1,4 @@ +# This is the **HOMEPAGE**. +Refer to [Markdown](http://daringfireball.net/projects/markdown/) for how to write markdown files. +## Quick Start Notes: +1. Add images to the *images* folder if the file is referencing an image. diff --git a/FollowingFileStream.APIdoc/toc.yml b/FollowingFileStream.APIdoc/toc.yml new file mode 100644 index 0000000..59f8010 --- /dev/null +++ b/FollowingFileStream.APIdoc/toc.yml @@ -0,0 +1,5 @@ +- name: Articles + href: articles/ +- name: Api Documentation + href: api/ + homepage: api/index.md diff --git a/README.md b/README.md index e1cf3f3..adb2bde 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ 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) + [Source Browser](https://followingfilestream.azurewebsites.net/#FollowingFileStream/) [![Build Status](https://dev.azure.com/manandre/manandre/_apis/build/status/manandre.FollowingFileStream?branchName=master)](https://dev.azure.com/manandre/manandre/_build/latest?definitionId=1&branchName=master) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 112f9ec..551cbd0 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -147,3 +147,37 @@ jobs: PathtoPublish: '$(Build.ArtifactStagingDirectory)/sourcebrowser_website.zip' ArtifactName: 'sourcebrowser_website' publishLocation: 'Container' + + - job: ApiDoc + displayName: API Documentation generation + pool: + vmImage: 'windows-latest' + steps: + - task: DotNetCoreCLI@2 + displayName: Restore + inputs: + command: 'restore' + projects: '**/*.APIdoc.csproj' + feedsToUse: 'select' + + - task: DotNetCoreCLI@2 + displayName: Build + inputs: + command: 'build' + projects: '**/*.APIdoc.csproj' + arguments: '--configuration $(BuildConfiguration)' + + - task: ArchiveFiles@2 + displayName: Zip API documentation website + inputs: + rootFolderOrFile: '$(Build.SourcesDirectory)/FollowingFileStream.APIdoc/_site' + includeRootFolder: false + archiveType: 'zip' + archiveFile: '$(Build.ArtifactStagingDirectory)/apidoc_website.zip' + replaceExistingArchive: true + + - task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)/apidoc_website.zip' + ArtifactName: 'apidoc_website' + publishLocation: 'Container' \ No newline at end of file