Skip to content

Add DocFX documentation site with GitHub Pages#76

Merged
Jaben merged 3 commits intodevelopfrom
feature/docfx-documentation
Mar 29, 2026
Merged

Add DocFX documentation site with GitHub Pages#76
Jaben merged 3 commits intodevelopfrom
feature/docfx-documentation

Conversation

@Jaben
Copy link
Copy Markdown
Member

@Jaben Jaben commented Mar 29, 2026

Summary

  • Replace bloated README (500+ lines) with concise quick-start (~100 lines) linking to full docs
  • Add DocFX documentation site with 6 article pages covering all features
  • Auto-generate API reference from XML doc comments (159 types documented)
  • GitHub Actions workflow deploys to GitHub Pages on push to master/develop

Documentation Structure

  • Getting Started — Docker setup, NuGet install, DI config, basic auth
  • HTML & URL to PDF — Chromium features, wait conditions, cookies, page properties
  • Screenshots — HTML/URL capture, format/quality/dimensions
  • Office Conversion — LibreOffice options, image compression, native watermarks
  • PDF Manipulation — Standalone ops (flatten, rotate, split, encrypt, metadata) + cross-cutting (watermark, stamp)
  • Advanced Features — Webhooks, DDD value objects, multi-URL merge
  • API Reference — Auto-generated from source XML comments

Setup Required

After merging, enable GitHub Pages in repo settings:

  1. Settings > Pages > Source: GitHub Actions
  2. The docs.yml workflow will deploy automatically

Test plan

  • DocFX builds locally with 0 errors (1 warning)
  • 159 API reference files + 8 conceptual pages generated
  • All article links verified in toc.yml
  • README slimmed from ~540 lines to ~100 lines

Summary by CodeRabbit

  • Documentation

    • Added a full documentation site with Getting Started, HTML/URL-to-PDF, Screenshots, Office conversion, PDF manipulation, Advanced Features, API Reference, examples, and a consolidated TOC/landing page.
    • Streamlined README with a concise overview, Features, and Quick Start examples.
  • Chores

    • Added automated build-and-deploy for publishing the documentation site.

Replace bloated README with concise quick-start and link to full docs.
Move all detailed examples and guides into docs/articles/:

- Getting Started (setup, config, DI, basic auth)
- HTML & URL to PDF (Chromium features, cookies, page properties)
- Screenshots (HTML/URL capture, format/quality options)
- Office Conversion (LibreOffice options, image compression, watermarks)
- PDF Manipulation (standalone operations, cross-cutting options)
- Advanced Features (webhooks, value objects, multi-URL merge)

DocFX auto-generates API reference from XML doc comments.
GitHub Actions workflow deploys to GitHub Pages on push to
master/develop when docs or source changes.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 29, 2026

Warning

Rate limit exceeded

@Jaben has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 16 minutes and 58 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 16 minutes and 58 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 32269f90-8d1a-4a93-af93-2151a76c0e19

📥 Commits

Reviewing files that changed from the base of the PR and between 207a219 and 2433a31.

📒 Files selected for processing (2)
  • docs/articles/getting-started.md
  • docs/docfx.json
📝 Walkthrough

Walkthrough

Added a complete DocFX-based documentation site, new article pages and TOC, a README overhaul, docs .gitignore, and a GitHub Actions workflow that builds the site and deploys it to GitHub Pages.

Changes

Cohort / File(s) Summary
CI / Pages Workflow & DocFX
/.github/workflows/docs.yml, docs/docfx.json
New GitHub Actions workflow that builds docs (dotnet + docfx), uploads artifact, and deploys to GitHub Pages. DocFX configuration for API metadata generation and site build.
Docs Landing & TOC
docs/index.md, docs/toc.yml, docs/articles/toc.yml, docs/api/index.md
New site landing page, top-level and articles TOC entries, and API reference index page added.
Articles (guides & reference)
docs/articles/getting-started.md, docs/articles/html-and-url-to-pdf.md, docs/articles/screenshots.md, docs/articles/office-conversion.md, docs/articles/pdf-manipulation.md, docs/articles/advanced-features.md
Six new article pages covering setup, HTML/URL->PDF, screenshots, Office->PDF, PDF operations, and advanced features (webhooks, PDF output options, value objects, examples).
Docs build artifacts ignore
docs/.gitignore
Added ignore entries for generated site and API artifacts while keeping api/index.md.
Repository README
README.md
Condensed and restructured README: shorter overview, Features, Quick Start, and links to hosted docs/examples; removed many long examples and walkthroughs.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer (push/docs change)
    participant GH as GitHub (repo)
    participant Runner as Actions Runner
    participant DocFX as DocFX (dotnet tool)
    participant Artifact as Upload Artifact
    participant Deploy as Deploy Pages
    participant Pages as GitHub Pages (site)

    Dev->>GH: push to master/develop or manual dispatch
    GH->>Runner: start workflow (docs.yml)
    Runner->>Runner: checkout repo\ninstall dotnet 8.x\ninstall docfx
    Runner->>DocFX: run docfx build (docs/docfx.json)
    DocFX-->>Artifact: produce site in docs/_site
    Runner->>Artifact: upload-pages-artifact
    Artifact-->>Deploy: artifact available
    Deploy->>Pages: deploy artifact to GitHub Pages
    Pages-->>GH: site published (page_url)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I hopped through docs and stitched each page,

DocFX stitched stories stage by stage,
Workflows built, Pages took flight,
README trimmed for quicker sight,
Hooray — the docs are snug and bright!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding a DocFX documentation site with GitHub Pages deployment, which is the primary purpose reflected across all file additions (workflow, docs structure, articles, configuration).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/docfx-documentation

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Add example callouts at the top of each article linking to the
relevant console app examples on GitHub.
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (2)
docs/articles/getting-started.md (1)

53-54: Review nameof() usage for configuration section.

Line 54 uses nameof(GotenbergSharpClient) to reference the configuration section. This assumes a class named GotenbergSharpClient exists. If the section name is just a string convention, using a hardcoded string "GotenbergSharpClient" would be more explicit and avoid potential confusion.

Alternatively, if there is a dedicated options class (like GotenbergSharpClientOptions), consider using nameof(GotenbergSharpClientOptions) if the section name matches, or just use the string literal.

💡 Possible alternatives

If no GotenbergSharpClient class exists, use a string literal:

     services.AddOptions<GotenbergSharpClientOptions>()
-        .Bind(Configuration.GetSection(nameof(GotenbergSharpClient)));
+        .Bind(Configuration.GetSection("GotenbergSharpClient"));
     services.AddGotenbergSharpClient();

Or define a constant for reusability:

private const string ConfigSection = "GotenbergSharpClient";

services.AddOptions<GotenbergSharpClientOptions>()
    .Bind(Configuration.GetSection(ConfigSection));
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/articles/getting-started.md` around lines 53 - 54, The code uses
nameof(GotenbergSharpClient) to locate the configuration section but that symbol
may not exist; update the Configuration.GetSection call to explicitly reference
the correct section name (either the string literal "GotenbergSharpClient" or
nameof(GotenbergSharpClientOptions) if the options class name is the intended
section) so the bind targets the right section; if reused elsewhere consider
introducing a constant (e.g., ConfigSection) and use that instead when calling
services.AddOptions<GotenbergSharpClientOptions>().Bind(Configuration.GetSection(...)).
docs/docfx.json (1)

19-19: Review glob pattern syntax.

Line 19 uses "api/**.yml" which is non-standard DocFX globbing. The standard pattern for "all .yml files under api/" would be "api/**/*.yml". Similarly, line 23 uses "articles/**.md" instead of "articles/**/*.md".

While DocFX may accept ** without /*, using the explicit /**/* pattern is more widely recognized and less ambiguous.

📝 Proposed fix for glob patterns
       {
-        "files": ["api/**.yml", "api/index.md"]
+        "files": ["api/**/*.yml", "api/index.md"]
       },
       {
         "files": [
-          "articles/**.md",
+          "articles/**/*.md",
           "articles/**/toc.yml",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/docfx.json` at line 19, Replace the non-standard glob patterns used in
docfx.json: update the string "api/**.yml" to "api/**/*.yml" and update
"articles/**.md" to "articles/**/*.md" so the file globs correctly match all
.yml files under api/ and all .md files under articles/ (look for the exact
literal patterns "api/**.yml" and "articles/**.md" in the JSON and replace
them).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@docs/articles/getting-started.md`:
- Around line 53-54: The code uses nameof(GotenbergSharpClient) to locate the
configuration section but that symbol may not exist; update the
Configuration.GetSection call to explicitly reference the correct section name
(either the string literal "GotenbergSharpClient" or
nameof(GotenbergSharpClientOptions) if the options class name is the intended
section) so the bind targets the right section; if reused elsewhere consider
introducing a constant (e.g., ConfigSection) and use that instead when calling
services.AddOptions<GotenbergSharpClientOptions>().Bind(Configuration.GetSection(...)).

In `@docs/docfx.json`:
- Line 19: Replace the non-standard glob patterns used in docfx.json: update the
string "api/**.yml" to "api/**/*.yml" and update "articles/**.md" to
"articles/**/*.md" so the file globs correctly match all .yml files under api/
and all .md files under articles/ (look for the exact literal patterns
"api/**.yml" and "articles/**.md" in the JSON and replace them).

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fb5ac1a9-7704-44cb-b4a5-57d43a38a25b

📥 Commits

Reviewing files that changed from the base of the PR and between 24dfe86 and 185e5d4.

⛔ Files ignored due to path filters (1)
  • docs/images/logo.png is excluded by !**/*.png
📒 Files selected for processing (14)
  • .github/workflows/docs.yml
  • README.md
  • docs/.gitignore
  • docs/api/index.md
  • docs/articles/advanced-features.md
  • docs/articles/getting-started.md
  • docs/articles/html-and-url-to-pdf.md
  • docs/articles/office-conversion.md
  • docs/articles/pdf-manipulation.md
  • docs/articles/screenshots.md
  • docs/articles/toc.yml
  • docs/docfx.json
  • docs/index.md
  • docs/toc.yml

- Use standard api/**/*.yml and articles/**/*.md glob patterns
- Use string literal "GotenbergSharpClient" instead of nameof() in
  docs examples for clearer copy-paste usage
@Jaben Jaben merged commit 6585bd2 into develop Mar 29, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant