Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ on:
branches: [master, develop]
paths:
- 'docs/**'
- 'src/**/*.cs'
- 'src/**/*.csproj'
- 'mkdocs.yml'
- '.github/workflows/docs.yml'
workflow_dispatch:

Expand All @@ -28,21 +27,21 @@ jobs:
with:
fetch-depth: 0

- name: Setup .NET
uses: actions/setup-dotnet@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
dotnet-version: 8.x
python-version: '3.x'

- name: Install DocFX
run: dotnet tool install -g docfx
- name: Install MkDocs Material
run: pip install mkdocs-material

- name: Build docs
run: docfx docs/docfx.json
run: mkdocs build --strict

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/_site
path: site

deploy:
environment:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -290,3 +290,4 @@ __pycache__/

settings.local.json
examples/**/output
site/
7 changes: 1 addition & 6 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
_site/
api/.manifest
api/*.yml
api/*.md
!api/index.md
obj/

Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Advanced Features

> **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)
!!! example "Working 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)

## Webhooks

Expand Down
5 changes: 0 additions & 5 deletions docs/api/index.md

This file was deleted.

12 changes: 0 additions & 12 deletions docs/articles/toc.yml

This file was deleted.

49 changes: 0 additions & 49 deletions docs/docfx.json

This file was deleted.

3 changes: 2 additions & 1 deletion docs/articles/getting-started.md → docs/getting-started.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Getting Started

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

## Prerequisites

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# HTML & URL to PDF

> **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)
!!! example "Working 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)

## HTML to PDF

Expand Down
24 changes: 11 additions & 13 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
_layout: landing
---

# GotenbergSharpApiClient

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

[![NuGet version](https://badge.fury.io/nu/Gotenberg.Sharp.Api.Client.svg)](https://badge.fury.io/nu/Gotenberg.Sharp.Api.Client)
[![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)
![Build status](https://github.com/ChangemakerStudios/GotenbergSharpApiClient/actions/workflows/deploy.yml/badge.svg)

## Features

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

## Quick Start

### Install

```bash
dotnet add package Gotenberg.Sharp.Api.Client
```

### Configure

```csharp
services.AddOptions<GotenbergSharpClientOptions>()
.Bind(Configuration.GetSection("GotenbergSharpClient"));
services.AddGotenbergSharpClient();
```

### Use

```csharp
var builder = new HtmlRequestBuilder()
.AddDocument(doc => doc.SetBody("<html><body><h1>Hello PDF!</h1></body></html>"))
Expand All @@ -37,12 +43,4 @@ var builder = new HtmlRequestBuilder()
var result = await sharpClient.HtmlToPdfAsync(builder);
```

## Documentation

- [Getting Started](articles/getting-started.md)
- [HTML & URL to PDF](articles/html-and-url-to-pdf.md)
- [Screenshots](articles/screenshots.md)
- [Office Document Conversion](articles/office-conversion.md)
- [PDF Manipulation](articles/pdf-manipulation.md)
- [Advanced Features](articles/advanced-features.md)
- [API Reference](api/index.md)
!!! tip "See the [Getting Started](getting-started.md) guide for full setup instructions."
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Office Document Conversion

> **Examples:** [OfficeMerge](https://github.com/ChangemakerStudios/GotenbergSharpApiClient/tree/develop/examples/OfficeMerge), [LibreOfficeOptions](https://github.com/ChangemakerStudios/GotenbergSharpApiClient/tree/develop/examples/LibreOfficeOptions)
!!! example "Working Examples"
[OfficeMerge](https://github.com/ChangemakerStudios/GotenbergSharpApiClient/tree/develop/examples/OfficeMerge) |
[LibreOfficeOptions](https://github.com/ChangemakerStudios/GotenbergSharpApiClient/tree/develop/examples/LibreOfficeOptions)

Convert and merge Office documents (Word, Excel, PowerPoint, and 100+ formats) to PDF using LibreOffice.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# PDF Manipulation

> **Examples:** [PdfEngineOperations](https://github.com/ChangemakerStudios/GotenbergSharpApiClient/tree/develop/examples/PdfEngineOperations), [WatermarkAndRotate](https://github.com/ChangemakerStudios/GotenbergSharpApiClient/tree/develop/examples/WatermarkAndRotate), [EncryptPdf](https://github.com/ChangemakerStudios/GotenbergSharpApiClient/tree/develop/examples/EncryptPdf), [PdfMerge](https://github.com/ChangemakerStudios/GotenbergSharpApiClient/tree/develop/examples/PdfMerge), [PdfConvert](https://github.com/ChangemakerStudios/GotenbergSharpApiClient/tree/develop/examples/PdfConvert)
!!! example "Working Examples"
[PdfEngineOperations](https://github.com/ChangemakerStudios/GotenbergSharpApiClient/tree/develop/examples/PdfEngineOperations) |
[WatermarkAndRotate](https://github.com/ChangemakerStudios/GotenbergSharpApiClient/tree/develop/examples/WatermarkAndRotate) |
[EncryptPdf](https://github.com/ChangemakerStudios/GotenbergSharpApiClient/tree/develop/examples/EncryptPdf) |
[PdfMerge](https://github.com/ChangemakerStudios/GotenbergSharpApiClient/tree/develop/examples/PdfMerge) |
[PdfConvert](https://github.com/ChangemakerStudios/GotenbergSharpApiClient/tree/develop/examples/PdfConvert)

Standalone operations on existing PDF files using Gotenberg's PDF engine routes.

Expand Down
3 changes: 2 additions & 1 deletion docs/articles/screenshots.md → docs/screenshots.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Screenshots

> **Example:** [Screenshot](https://github.com/ChangemakerStudios/GotenbergSharpApiClient/tree/develop/examples/Screenshot)
!!! example "Working Example"
[Screenshot](https://github.com/ChangemakerStudios/GotenbergSharpApiClient/tree/develop/examples/Screenshot)

Capture screenshots of HTML content or URLs using Chromium. Returns PNG, JPEG, or WebP images.

Expand Down
4 changes: 0 additions & 4 deletions docs/toc.yml

This file was deleted.

70 changes: 70 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
site_name: GotenbergSharpApiClient
site_url: https://changemakerstudios.github.io/GotenbergSharpApiClient/
site_description: .NET C# client for the Gotenberg API
repo_url: https://github.com/ChangemakerStudios/GotenbergSharpApiClient
repo_name: ChangemakerStudios/GotenbergSharpApiClient
edit_uri: edit/develop/docs/

theme:
name: material
logo: images/logo.png
favicon: images/logo.png
palette:
- media: "(prefers-color-scheme: light)"
scheme: default
primary: deep purple
accent: purple
toggle:
icon: material/brightness-7
name: Switch to dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
primary: deep purple
accent: purple
toggle:
icon: material/brightness-4
name: Switch to light mode
features:
- navigation.instant
- navigation.tracking
- navigation.sections
- navigation.top
- search.highlight
- search.suggest
- content.code.copy
- content.tabs.link
icon:
repo: fontawesome/brands/github

nav:
- Home: index.md
- Getting Started: getting-started.md
- Guides:
- HTML & URL to PDF: html-and-url-to-pdf.md
- Screenshots: screenshots.md
- Office Conversion: office-conversion.md
- PDF Manipulation: pdf-manipulation.md
- Advanced Features: advanced-features.md

markdown_extensions:
- admonition
- pymdownx.details
- pymdownx.superfences
- pymdownx.highlight:
anchor_linenums: true
- pymdownx.inlinehilite
- pymdownx.tabbed:
alternate_style: true
- tables
- attr_list
- md_in_html

plugins:
- search

extra:
social:
- icon: fontawesome/brands/github
link: https://github.com/ChangemakerStudios/GotenbergSharpApiClient
- icon: fontawesome/solid/cube
link: https://www.nuget.org/packages/Gotenberg.Sharp.API.Client
Loading