Added base for automated documentation

This commit is contained in:
2025-08-07 16:24:37 +02:00
parent 90d8320abc
commit 658e4b6cda
11 changed files with 131 additions and 0 deletions

3
.gitignore vendored
View File

@@ -2,6 +2,9 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
docs/api
docs/_site
# User-specific files
*.suo
*.user

View File

@@ -186,3 +186,29 @@ extensions-deploy:
- if: $CI_COMMIT_TAG =~ /^[a-z]+\/v[0-9.]+/
script:
- dotnet nuget push -k $NUGET_APIKEY -s https://api.nuget.org/v3/index.json --skip-duplicate artifacts/*.nupkg || true
publish-docs:
variables:
DOCFX_SOURCE_REPOSITORY_URL: "https://github.com/AM-WD/cloudflare-api"
stage: deploy
tags:
- docker
- lnx
- server
rules:
- if: $CI_COMMIT_TAG != null
before_script:
- apt-get update
- apt-get -y install zip unzip
- dotnet tool install docfx --tool-path /dotnet-tools
script:
# Build the docs
- dotnet build -c Release --nologo
- /dotnet-tools/docfx metadata docs/docfx.json
- /dotnet-tools/docfx build docs/docfx.json
# Deploy the docs
- cd docs/_site
- zip -r ../docs.zip *
- curl --user "$DOCS_DEPLOY_USER:$DOCS_DEPLOY_PASS" -F docs=cloudflare -F dump=@../docs.zip "$DOCS_DEPLOY_URL"

View File

@@ -0,0 +1 @@
# Getting Started

View File

@@ -0,0 +1 @@
# Introduction

8
docs/articles/toc.yml Normal file
View File

@@ -0,0 +1,8 @@
- name: Introduction
href: introduction.md
- name: Getting Started
href: getting-started.md
- name: GitHub
href: https://github.com/AM-WD/cloudflare-api
- name: NuGet
href: https://www.nuget.org/packages?q=AMWD.Net.API.Cloudflare

63
docs/docfx.json Normal file
View File

@@ -0,0 +1,63 @@
{
"$schema": "https://raw.githubusercontent.com/dotnet/docfx/main/schemas/docfx.schema.json",
"metadata": [
{
"src": [
{
"src": "../",
"files": [
"src/Cloudflare/bin/Release/netstandard2.0/amwd-cloudflare-core.dll",
"src/Extensions/Cloudflare.Dns/bin/Release/netstandard2.0/amwd-cloudflare-dns.dll",
"src/Extensions/Cloudflare.Zones/bin/Release/netstandard2.0/amwd-cloudflare-zones.dll"
]
}
],
"dest": "api",
"outputFormat": "apiPage"
}
],
"build": {
"content": [
{
"files": [ "**/*.{md,yml}" ],
"exclude": [ "_site/**", "obj/**" ]
}
],
"resource": [
{
"files": [ "images/**" ],
"exclude": [ "_site/**", "obj/**" ]
}
],
"output": "_site",
"template": [ "default", "modern", "templates/amwd" ],
"postProcessors": ["ExtractSearchIndex"],
"globalMetadata": {
"_appName": "API for .NET",
"_appTitle": "Cloudflare API for .NET",
"_appFooter": "<span>&copy; AM.WD &mdash; Docs generated using <a href=\"https://dotnet.github.io/docfx\" target=\"_blank\">docfx</a>.</span>",
"_appLogoPath": "images/logo.png",
"_appFaviconPath": "images/favicon.ico",
"_disableBreadcrumb": true,
"_disableContribution": true,
"_enableSearch": true,
"_enableNewTab": true,
"pdf": false
},
"markdownEngineName": "markdig",
"markdownEngineProperties": {
"alerts": {
"TODO": "alert alert-secondary"
}
},
"sitemap": {
"baseUrl": "https://docs.am-wd.de/cloudflare",
"priority": 0.5,
"changefreq": "weekly"
},
"noLangKeyword": false,
"keepFileLink": false,
"cleanupCacheHistory": false,
"disableGitFeatures": true
}
}

BIN
docs/images/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

BIN
docs/images/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

22
docs/index.md Normal file
View File

@@ -0,0 +1,22 @@
---
_layout: landing
---
# Cloudflare API for .NET
## NuGet packages
Here is an overview of the latest packages.
| Package URL | Version | Short Description |
|-------------|---------|-------------------|
| [AMWD.Net.API.Cloudflare] | ![NuGet Version: Core](https://img.shields.io/nuget/v/AMWD.Net.API.Cloudflare?style=flat-square&logo=nuget) | Core features to access the Cloudflare API. |
| [AMWD.Net.API.Cloudflare.Dns] | ![NuGet Version: DNS](https://img.shields.io/nuget/v/AMWD.Net.API.Cloudflare.Dns?style=flat-square&logo=nuget) | The DNS section of the Cloudflare API. |
| [AMWD.Net.API.Cloudflare.Zones] | ![NuGet Version: Zones](https://img.shields.io/nuget/v/AMWD.Net.API.Cloudflare.Zones?style=flat-square&logo=nuget) | The Domain/Zone Management section of the Cloudflare API. |
[AMWD.Net.API.Cloudflare]: https://www.nuget.org/packages/AMWD.Net.API.Cloudflare
[AMWD.Net.API.Cloudflare.Dns]: https://www.nuget.org/packages/AMWD.Net.API.Cloudflare.Dns
[AMWD.Net.API.Cloudflare.Zones]: https://www.nuget.org/packages/AMWD.Net.API.Cloudflare.Zones

3
docs/templates/amwd/public/main.css vendored Normal file
View File

@@ -0,0 +1,3 @@
#logo {
margin-right: 8px;
}

4
docs/toc.yml Normal file
View File

@@ -0,0 +1,4 @@
- name: API
href: api/
- name: Articles
href: articles/