Skip to content

Commit 5c566bc

Browse files
authored
Merge pull request #77 from ChangemakerStudios/feature/docfx-documentation
Switch from DocFX to MkDocs Material for documentation
2 parents 50991a0 + 0f5782a commit 5c566bc

File tree

15 files changed

+113
-104
lines changed

15 files changed

+113
-104
lines changed

.github/workflows/docs.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ on:
55
branches: [master, develop]
66
paths:
77
- 'docs/**'
8-
- 'src/**/*.cs'
9-
- 'src/**/*.csproj'
8+
- 'mkdocs.yml'
109
- '.github/workflows/docs.yml'
1110
workflow_dispatch:
1211

@@ -28,21 +27,21 @@ jobs:
2827
with:
2928
fetch-depth: 0
3029

31-
- name: Setup .NET
32-
uses: actions/setup-dotnet@v4
30+
- name: Setup Python
31+
uses: actions/setup-python@v5
3332
with:
34-
dotnet-version: 8.x
33+
python-version: '3.x'
3534

36-
- name: Install DocFX
37-
run: dotnet tool install -g docfx
35+
- name: Install MkDocs Material
36+
run: pip install mkdocs-material
3837

3938
- name: Build docs
40-
run: docfx docs/docfx.json
39+
run: mkdocs build --strict
4140

4241
- name: Upload artifact
4342
uses: actions/upload-pages-artifact@v3
4443
with:
45-
path: docs/_site
44+
path: site
4645

4746
deploy:
4847
environment:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,3 +290,4 @@ __pycache__/
290290

291291
settings.local.json
292292
examples/**/output
293+
site/

docs/.gitignore

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
_site/
2-
api/.manifest
3-
api/*.yml
4-
api/*.md
5-
!api/index.md
6-
obj/
1+
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Advanced Features
22

3-
> **Examples:** [Webhook](https://github.com/ChangemakerStudios/GotenbergSharpApiClient/tree/develop/examples/Webhook), [UrlsToMergedPdf](https://github.com/ChangemakerStudios/GotenbergSharpApiClient/tree/develop/examples/UrlsToMergedPdf), [DIExample](https://github.com/ChangemakerStudios/GotenbergSharpApiClient/tree/develop/examples/DIExample)
3+
!!! example "Working Examples"
4+
[Webhook](https://github.com/ChangemakerStudios/GotenbergSharpApiClient/tree/develop/examples/Webhook) |
5+
[UrlsToMergedPdf](https://github.com/ChangemakerStudios/GotenbergSharpApiClient/tree/develop/examples/UrlsToMergedPdf) |
6+
[DIExample](https://github.com/ChangemakerStudios/GotenbergSharpApiClient/tree/develop/examples/DIExample)
47

58
## Webhooks
69

docs/api/index.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

docs/articles/toc.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

docs/docfx.json

Lines changed: 0 additions & 49 deletions
This file was deleted.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Getting Started
22

3-
> **Example:** [DIExample](https://github.com/ChangemakerStudios/GotenbergSharpApiClient/tree/develop/examples/DIExample) — Full DI setup with logging and Polly retry
3+
!!! example "Working Example"
4+
[DIExample](https://github.com/ChangemakerStudios/GotenbergSharpApiClient/tree/develop/examples/DIExample) — Full DI setup with logging and Polly retry
45

56
## Prerequisites
67

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# HTML & URL to PDF
22

3-
> **Examples:** [HtmlConvert](https://github.com/ChangemakerStudios/GotenbergSharpApiClient/tree/develop/examples/HtmlConvert), [UrlConvert](https://github.com/ChangemakerStudios/GotenbergSharpApiClient/tree/develop/examples/UrlConvert), [HtmlWithMarkdown](https://github.com/ChangemakerStudios/GotenbergSharpApiClient/tree/develop/examples/HtmlWithMarkdown), [ChromiumFeatures](https://github.com/ChangemakerStudios/GotenbergSharpApiClient/tree/develop/examples/ChromiumFeatures)
3+
!!! example "Working Examples"
4+
[HtmlConvert](https://github.com/ChangemakerStudios/GotenbergSharpApiClient/tree/develop/examples/HtmlConvert) |
5+
[UrlConvert](https://github.com/ChangemakerStudios/GotenbergSharpApiClient/tree/develop/examples/UrlConvert) |
6+
[HtmlWithMarkdown](https://github.com/ChangemakerStudios/GotenbergSharpApiClient/tree/develop/examples/HtmlWithMarkdown) |
7+
[ChromiumFeatures](https://github.com/ChangemakerStudios/GotenbergSharpApiClient/tree/develop/examples/ChromiumFeatures)
48

59
## HTML to PDF
610

docs/index.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
---
2-
_layout: landing
3-
---
4-
51
# GotenbergSharpApiClient
62

73
.NET C# client for [Gotenberg](https://gotenberg.dev/) — a Docker-powered stateless API for converting & merging HTML, Markdown, and Office documents to PDF.
84

5+
[![NuGet version](https://badge.fury.io/nu/Gotenberg.Sharp.Api.Client.svg)](https://badge.fury.io/nu/Gotenberg.Sharp.Api.Client)
6+
[![Downloads](https://img.shields.io/nuget/dt/Gotenberg.Sharp.API.Client.svg?logo=nuget&color=purple)](https://www.nuget.org/packages/Gotenberg.Sharp.API.Client)
7+
![Build status](https://github.com/ChangemakerStudios/GotenbergSharpApiClient/actions/workflows/deploy.yml/badge.svg)
8+
99
## Features
1010

1111
- **HTML/URL to PDF** — Convert HTML content or URLs to PDF using Chromium
@@ -19,16 +19,22 @@ _layout: landing
1919

2020
## Quick Start
2121

22+
### Install
23+
2224
```bash
2325
dotnet add package Gotenberg.Sharp.Api.Client
2426
```
2527

28+
### Configure
29+
2630
```csharp
2731
services.AddOptions<GotenbergSharpClientOptions>()
2832
.Bind(Configuration.GetSection("GotenbergSharpClient"));
2933
services.AddGotenbergSharpClient();
3034
```
3135

36+
### Use
37+
3238
```csharp
3339
var builder = new HtmlRequestBuilder()
3440
.AddDocument(doc => doc.SetBody("<html><body><h1>Hello PDF!</h1></body></html>"))
@@ -37,12 +43,4 @@ var builder = new HtmlRequestBuilder()
3743
var result = await sharpClient.HtmlToPdfAsync(builder);
3844
```
3945

40-
## Documentation
41-
42-
- [Getting Started](articles/getting-started.md)
43-
- [HTML & URL to PDF](articles/html-and-url-to-pdf.md)
44-
- [Screenshots](articles/screenshots.md)
45-
- [Office Document Conversion](articles/office-conversion.md)
46-
- [PDF Manipulation](articles/pdf-manipulation.md)
47-
- [Advanced Features](articles/advanced-features.md)
48-
- [API Reference](api/index.md)
46+
!!! tip "See the [Getting Started](getting-started.md) guide for full setup instructions."

0 commit comments

Comments
 (0)