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
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"rollForward": false
},
"dotnet-stryker": {
"version": "4.8.1",
"version": "4.11.0",
"commands": [
"dotnet-stryker"
],
Expand Down
4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# TLDR;

# Summary

# Details

# How Do The Tests Prove The Changes Work?
56 changes: 56 additions & 0 deletions .github/workflows/deploy-website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Deploy Website to GitHub Pages

on:
push:
branches:
- main

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
cache-dependency-path: Website/package-lock.json

- name: Install dependencies
working-directory: Website
run: npm ci

- name: Build website
working-directory: Website
run: npm run build

- name: Setup Pages
uses: actions/configure-pages@v5

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

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,11 @@ coverage.cobertura.xml
final-check/
test-output-final
nupkgs/

# Website
Website/node_modules/
Website/_site/
Website/package-lock.json
Website/playwright-report/
Website/test-results/
Website/src/api/
6 changes: 6 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ RestClient.Net is a functional HTTP client library using Result types for error

5. **ProgressReportingHttpContent** - Custom `HttpContent` supporting upload/download progress callbacks.

### PRs

- Compare the current branch to main branch. Base title and comments solely on diff. IGNORE commit messages
- Use the template at .github/pull_request_template.md
- Keep the documentation tight.

### Code Generation

**RestClient.Net.OpenApiGenerator** - Generates C# extension methods from OpenAPI 3.x specs:
Expand Down
28 changes: 28 additions & 0 deletions Website/eleventy.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import techdoc from "eleventy-plugin-techdoc";

export default function(eleventyConfig) {
eleventyConfig.addPlugin(techdoc, {
site: {
name: "RestClient.Net",
url: "https://restclient.net",
description: "The safest way to make REST calls in C#. Built with functional programming, type safety, and modern .NET patterns.",
},
features: {
blog: true,
docs: true,
darkMode: true,
i18n: true,
},
i18n: {
defaultLanguage: 'en',
languages: ['en', 'zh'],
},
});

eleventyConfig.addPassthroughCopy("src/assets");

return {
dir: { input: "src", output: "_site" },
markdownTemplateEngine: "njk",
};
}
19 changes: 19 additions & 0 deletions Website/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "restclient-net-website",
"version": "1.0.0",
"description": "RestClient.Net documentation website",
"type": "module",
"scripts": {
"generate-api": "node scripts/generate-api-docs.js",
"dev": "lsof -ti:8080 | xargs kill -9 2>/dev/null; npx @11ty/eleventy --serve --port=8080",
"build": "npm run generate-api && npx @11ty/eleventy",
"test": "playwright test"
},
"dependencies": {
"eleventy-plugin-techdoc": "^0.1.0"
},
"devDependencies": {
"@11ty/eleventy": "^3.1.2",
"@playwright/test": "^1.40.0"
}
}
20 changes: 20 additions & 0 deletions Website/playwright.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { defineConfig } from '@playwright/test';

export default defineConfig({
testDir: './tests',
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
reporter: 'list',
use: {
baseURL: 'http://localhost:8080',
trace: 'on-first-retry',
},
webServer: {
command: 'npx @11ty/eleventy --serve --port=8080',
url: 'http://localhost:8080',
reuseExistingServer: !process.env.CI,
timeout: 120000,
},
});
Loading