-
Notifications
You must be signed in to change notification settings - Fork 161
Convert some docs to snippets #1065
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
70dd66a
Initial claude commit
SeanKilleen cf04e5b
formatting fixes
SeanKilleen d392679
Allow claude to run build and test
SeanKilleen 958c87c
Generate snippets from docs
SeanKilleen 48bf617
allow build of docfx
SeanKilleen fac0045
Allow some more commands
SeanKilleen fb7b697
Refer to the snippets
SeanKilleen cc6c037
Add snippet to docs
SeanKilleen 25af447
fix sample name
SeanKilleen d113fd5
use constraint example snippet
SeanKilleen 57f0b70
Use constraint example
SeanKilleen 756e6b5
fix constraint snippet
SeanKilleen 1177449
use snippet
SeanKilleen 1852b3f
Update docs/snippets/Snippets.NUnit/ClassicAssertExamples.cs
SeanKilleen 322406c
R# cleanup
SeanKilleen a91450c
more R# cleanup
SeanKilleen eb2fc57
More R# cleanup
SeanKilleen 9757b37
More R# cleanup
SeanKilleen 57fd2b5
Use SetUpTearDownExample instead
SeanKilleen dcf7985
Remove redundant snippet
SeanKilleen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| { | ||
| "permissions": { | ||
| "allow": [ | ||
| "Bash(dotnet build:*)", | ||
| "Bash(dotnet test:*)", | ||
| "Bash(docfx:*)", | ||
| "Bash(dir:*)", | ||
| "Bash(grep:*)" | ||
| ], | ||
| "deny": [], | ||
| "ask": [] | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| # CLAUDE.md | ||
|
|
||
| This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. | ||
|
|
||
| ## Overview | ||
|
|
||
| This is the NUnit documentation repository that serves content at <https://docs.nunit.org>. It's a DocFX-based static site generator that builds documentation from markdown files and generates API documentation from .NET assemblies. | ||
|
|
||
| ## Architecture | ||
|
|
||
| - **docs/**: Main documentation content including articles, markdown files, and DocFX configuration | ||
| - **docs/docfx.json**: Primary DocFX configuration file that defines build settings, metadata, and site structure | ||
| - **docs/snippets/**: .NET solution (Snippets.sln) containing C# code snippets used in documentation | ||
| - **code-output/**: Directory where NUnit release assemblies are placed for API documentation generation | ||
| - **legacy/**: Legacy documentation content served as static resources | ||
| - **.devcontainer/**: Docker-based development environment with pre-configured tools | ||
|
|
||
| ## Development Commands | ||
|
|
||
| ### DevContainer/Codespaces (Recommended) | ||
|
|
||
| - `build` - Build the documentation site using DocFX | ||
| - `serve` - Build and serve the site locally at <http://localhost:8080> | ||
| - `lint` - Run markdown linting using markdownlint-cli2 | ||
| - `spellcheck` - Run spell checking using cspell | ||
| - `snippets` - Build and test the code snippets solution | ||
| - `apidocs` - Download latest NUnit API documentation | ||
|
|
||
| ### Local Development (requires docfx installed) | ||
|
|
||
| - `docfx docs/docfx.json` - Build the site | ||
| - `docfx docs/docfx.json --serve` - Build and serve locally | ||
| - `markdownlint-cli2 --config ".github/linters/.markdownlint.yml" "docs/**/*.md"` - Lint markdown | ||
| - `cspell --config cSpell.json "docs/**/*.md" --no-progress` - Spell check | ||
| - `dotnet test docs/snippets/Snippets.sln` - Test code snippets | ||
|
|
||
| ## Key Configuration Files | ||
|
|
||
| - **docs/docfx.json**: DocFX build configuration, metadata generation, and site settings | ||
| - **cSpell.json**: Spell checker dictionary and configuration | ||
| - **.github/linters/.markdownlint.yml**: Markdown linting rules | ||
| - **.markdownlintrc**: Additional markdown lint configuration | ||
| - **docs/filterConfig.yml**: API documentation filtering rules | ||
|
|
||
| ## Documentation Structure | ||
|
|
||
| - **docs/articles/**: Main documentation content organized by topic | ||
| - **docs/api/**: Generated API documentation (auto-generated from code-output assemblies) | ||
| - **docs/legacy/**: Legacy documentation served as static files | ||
| - **docs/images/**, **docs/css/**, **docs/js/**: Static assets | ||
| - **docs/toc.yml**: Main table of contents structure | ||
|
|
||
| ## Code Snippets | ||
|
|
||
| The repository includes a .NET solution at `docs/snippets/Snippets.sln` containing: | ||
|
|
||
| - **Snippets.NUnit**: NUnit framework code examples | ||
| - **Snippets.NUnitLite**: NUnit Lite framework examples | ||
|
|
||
| Code snippets are tested as part of the build process to ensure documentation examples remain valid. | ||
|
|
||
| ## API Documentation Generation | ||
|
|
||
| API docs are generated from NUnit release assemblies placed in the `code-output/` directory. The DevContainer automatically downloads the latest release, or assemblies can be manually extracted from NUnit GitHub releases. | ||
|
|
||
| ## Deployment | ||
|
|
||
| The site is built and deployed via GitHub Actions to the `gh-pages` branch, which serves <https://docs.nunit.org>. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SeanKilleen The same examples are shown on both line 20 and line 30.
The text might need adjusting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, thanks, missed this 👍 I'll do a pass on the published site soon for inconsistencies.