From c223517ff12398da8efa7b198287af283adff553 Mon Sep 17 00:00:00 2001 From: Werebunny <18252929+Werebunny@users.noreply.github.com> Date: Tue, 24 Nov 2026 22:30:44 -0700 Subject: [PATCH 1/3] Update to .NET 11. Complete rename. Add DocFx. --- .github/CODEOWNERS | 1 + .github/CONTRIBUTING.md | 2 +- .github/SUPPORT.md | 52 ++++++++++--------- .github/workflows/coverage.yml | 30 +++++++++++ .github/workflows/integration.yml | 26 +++------- .github/workflows/pages.yml | 52 +++++++++++++++++++ .vscode/launch.json | 2 +- .vscode/settings.json | 21 +++++--- README.md | 19 ++++--- ...ctStarter.slnx => SharpProjectStarter.slnx | 0 docs/_config.yml | 6 --- docs/_includes/nav.html | 10 ---- docs/_layouts/default.html | 50 ------------------ docs/index.md | 3 -- docs/pages/General-Structure.md | 17 ------ src/Build/Build.csproj | 2 +- src/Build/Program.cs | 41 +++++++++++++-- src/Directory.Build.props | 2 +- src/Library/Library.csproj | 2 +- src/Library/TextChecker.cs | 2 +- src/Terminal/Program.cs | 4 +- src/Terminal/Terminal.csproj | 2 +- tests/Directory.Build.props | 2 +- tests/Library.Tests/Library.Tests.csproj | 2 +- tests/Library.Tests/TextCheckerTests.cs | 2 +- tests/Terminal.Tests/ProgramTests.cs | 2 +- tests/Terminal.Tests/Terminal.Tests.csproj | 2 +- 27 files changed, 194 insertions(+), 162 deletions(-) create mode 100644 .github/CODEOWNERS create mode 100644 .github/workflows/coverage.yml create mode 100644 .github/workflows/pages.yml rename UltimateProjectStarter.slnx => SharpProjectStarter.slnx (100%) delete mode 100644 docs/_config.yml delete mode 100644 docs/_includes/nav.html delete mode 100644 docs/_layouts/default.html delete mode 100644 docs/index.md delete mode 100644 docs/pages/General-Structure.md diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..0c5336d --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @Werecodent/developers diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index d1fe17b..20645d5 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -4,7 +4,7 @@ Thank you for your interest in contributing. Please first discuss the change you wish to make via issue/request, email, or any other method with the owners of this repository before making changes. Failure to do so will likely lead to a declined pull request regardless of quality. -Make sure to refer to and follow the [code of conduct](CODE_OF_CONDUCT.md). For environment setup, refer to the [support](SUPPORT.md) page. +Make sure to refer to and follow the [code of conduct](./CODE_OF_CONDUCT.md). For environment setup, refer to the [support](./SUPPORT.md) page. ## Quality Requirements diff --git a/.github/SUPPORT.md b/.github/SUPPORT.md index 0e729be..f5efb51 100644 --- a/.github/SUPPORT.md +++ b/.github/SUPPORT.md @@ -1,37 +1,37 @@ # Support -If you encounter any issue using the project, please create an issue for the project. Make sure to refer to and follow the [code of conduct](CODE_OF_CONDUCT.md). +If you encounter any issue using the project, please create an issue for the project. Make sure to refer to and follow the [code of conduct](./CODE_OF_CONDUCT.md). # Environment Setup -Ensure you understand the [contributing](CONTRIBUTING.md) requirements, then follow the instructions below relevant to your environment. +Ensure you understand the [contributing](./CONTRIBUTING.md) requirements, then follow the instructions below relevant to your environment. ## Mac Environment Recommended Setup 1) Install Command Line Developer Tools via the Terminal: - A) Check if installed: ‘xcode-select -p’ - B) If not, run: ‘code-select —install’ - C) Verify git works: ‘git —version’ + 1. Check if installed: ‘xcode-select -p’ + 2. If not, run: ‘code-select —install’ + 3. Verify git works: ‘git —version’ 2) Install [VS Code](https://code.visualstudio.com/docs/setup/mac) for development. -3) Install [Google Chrome](https://www.google.com/chrome) for debugging. +3) Install [Google Chrome](https://www.google.com/chrome) for debugging webpages. 4) Clone the repository in the editor, then: - A) Install all recommended extensions for the project. - B) Follow all prompts for signing in/downloads. - C) To see build options, run from terminal: "./build/run.sh --help" - D) Verify project state by running from terminal: "./build/run.sh test" + 1. Install all recommended extensions for the project. + 2. Follow all prompts for signing in/downloads. + 3. To see build options, run from terminal: "./build/run.sh --help" + 4. Verify project state by running from terminal: "./build/run.sh test" ## Linux Environment Recommended Setup 1) Install packages for: - A) [.NET frameworks](https://dotnet.microsoft.com/download) - B) [Mono](https://www.mono-project.com/download/stable/#download-lin) - C) [VS Code](https://code.visualstudio.com/docs/setup/linux) -2) Install [Google Chrome](https://www.google.com/chrome) for debugging. + 1. [.NET frameworks](https://dotnet.microsoft.com/download) + 2. [Mono](https://www.mono-project.com/download/stable/#download-lin) + 3. [VS Code](https://code.visualstudio.com/docs/setup/linux) +2) Install [Google Chrome](https://www.google.com/chrome) for debugging webpages. 3) Clone the repository in the editor, then: - A) Install all recommended extensions for the project. - B) Run from terminal: "chmod +x ./build/run.sh" - C) To see build options, run from terminal: "./build/run.sh --help" - D) Verify project state by running from terminal: "./build/run.sh test" + 1. Install all recommended extensions for the project. + 2. Run from terminal: "chmod +x ./build/run.sh" + 3. To see build options, run from terminal: "./build/run.sh --help" + 4. Verify project state by running from terminal: "./build/run.sh test" ## Windows Environment Optional Setup @@ -46,11 +46,13 @@ VS Code is still recommended (see above setups), but VS Community may be utilize Set the following git configuration settings, replacing [xxx] with valid personal values: -1) git config --global user.name "[xxx]" -2) git config --global user.email "[xxx]@users.noreply.github.com" -3) git config --global user.signingKey [xxx] -4) git config --global tag.gpgSign true -5) git config --global commit.gpgSign true -6) git config --global push.gpgSign "if-asked" +```bash +git config --global user.name "[xxx]" +git config --global user.email "[xxx]@users.noreply.github.com" +git config --global user.signingKey [xxx] +git config --global tag.gpgSign true +git config --global commit.gpgSign true +git config --global push.gpgSign "if-asked" +``` -Read more about GPG keys and why they must be set in the [contributing](CONTRIBUTING.md) requirements. +Read more about GPG keys and why they must be set in the [contributing](./CONTRIBUTING.md) requirements. diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 0000000..ed859bc --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,30 @@ +name: Coverage + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + coverage: + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Setup .NET + uses: actions/setup-dotnet@v5 + with: + dotnet-version: 11.0.x + + - name: Build & Check Test Coverage + shell: bash + run: ./build/run.sh coverage + + - name: Upload Coverage + uses: codecov/codecov-action@v6 + with: + directory: ./artifacts/coverage + token: ${{ Secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 158813c..56ab415 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -15,29 +15,15 @@ jobs: runs-on: ${{ matrix.os }} timeout-minutes: 15 steps: - - uses: actions/checkout@v6 + - name: Checkout + uses: actions/checkout@v6 + - name: Setup .NET uses: actions/setup-dotnet@v5 with: - dotnet-version: 10.0.x + dotnet-version: 11.0.x + - name: Build & Test run: ./build/run.sh test shell: bash - - coverage: - runs-on: ubuntu-latest - timeout-minutes: 15 - steps: - - uses: actions/checkout@v6 - - name: Setup .NET - uses: actions/setup-dotnet@v5 - with: - dotnet-version: 10.0.x - - name: Build & Check Test Coverage - shell: bash - run: ./build/run.sh coverage - - name: Upload Coverage - uses: codecov/codecov-action@v6 - with: - directory: ./artifacts/coverage - token: ${{ Secrets.CODECOV_TOKEN }} + \ No newline at end of file diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 0000000..10c1bef --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,52 @@ +name: Pages + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: pages + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Setup .NET + uses: actions/setup-dotnet@v5 + with: + dotnet-version: 11.0.x + + - name: Setup Pages + uses: actions/configure-pages@v6 + + - name: Build Site + run: ./build/run.sh buildSite + shell: bash + + - name: Upload artifact + uses: actions/upload-pages-artifact@v5 + with: + path: ./artifacts/site + + deploy: + needs: build + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v5 diff --git a/.vscode/launch.json b/.vscode/launch.json index 2d13b05..1a9d167 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -6,7 +6,7 @@ "type": "coreclr", "request": "launch", "preLaunchTask": "build", - "program": "${workspaceFolder}/artifacts/bin/Terminal/Debug/net10.0/Terminal.dll", + "program": "${workspaceFolder}/artifacts/bin/Terminal/Debug/net11.0/Terminal.dll", "args": [], "cwd": "${workspaceFolder}", "console": "integratedTerminal", diff --git a/.vscode/settings.json b/.vscode/settings.json index df65117..e5f73b3 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,14 +1,13 @@ { "omnisharp.enableEditorConfigSupport": true, "dotnet.formatting.organizeImportsOnFormat": true, - "dotnet.testWindow.enableTestExplorerDiff": false, "dotnet.unitTests.runSettingsPath": "./tests/TestSettings.runsettings", - "dotnet.defaultSolution": "UltimateProjectStarter.slnx", + "dotnet.defaultSolution": "SharpProjectStarter.slnx", "git.enableSmartCommit": true, "git.enableCommitSigning": true, "editor.formatOnSave": true, "editor.codeActionsOnSave": { - "source.organizeImports": "explicit" + "source.organizeImports": "always" }, "editor.rulers": [ 120 @@ -19,13 +18,19 @@ "[xml]": { "editor.defaultFormatter": "csharpier.csharpier-vscode" }, + "json.schemaDownload.trustedDomains": { + "https://raw.githubusercontent.com/dotnet/docfx/main/schemas/docfx.schema.json": true + }, "cSpell.words": [ "Analyser", "autobuild", + "changefreq", "cobertura", "codecov", "codeql", + "cooldown", "cref", + "docfx", "globaltool", "Lindhart", "Meziantou", @@ -36,16 +41,18 @@ "runsettings", "signoff", "targetdir", + "Werebunny", "Werecodent", "xunit" ], "cSpell.ignorePaths": [ "**/usr/local/share/dotnet", "**/var/folders/", - ".gitignore", - ".editorconfig", ".vscode/", - "nuget.config", - "artifacts/" + "artifacts/", + "site/template/", + ".editorconfig", + ".gitignore", + "nuget.config" ], } \ No newline at end of file diff --git a/README.md b/README.md index cb04f0f..7a5737c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -# Ultimate Project Starter +# Sharp Project Starter -[![Build](https://github.com/Werecodent/UltimateProjectStarter/actions/workflows/integration.yml/badge.svg?branch=main)](https://github.com/Werecodent/UltimateProjectStarter/actions/workflows/integration.yml) -[![CodeCov Coverage](https://codecov.io/gh/Werecodent/UltimateProjectStarter/branch/main/graph/badge.svg)](https://codecov.io/gh/Werecodent/UltimateProjectStarter/branch/main) +[![Build](https://github.com/Werecodent/SharpProjectStarter/actions/workflows/integration.yml/badge.svg?branch=main)](https://github.com/Werecodent/SharpProjectStarter/actions/workflows/integration.yml) +[![CodeCov Coverage](https://codecov.io/gh/Werecodent/SharpProjectStarter/branch/main/graph/badge.svg)](https://codecov.io/gh/Werecodent/SharpProjectStarter/branch/main) (This project is under construction at the moment; be cautious of incomplete instructions.) @@ -11,23 +11,28 @@ Everything you need to get a quick start for a C# project on GitHub! Useful as a 2) A variety of sample projects to fit whatever you want to do. 3) Build workflows with test coverage collection. 4) Clean project structure with all output directed to './artifacts'. -5) Even the start of a [documentation site](https://Werecodent.github.io/UltimateProjectStarter/) using GitHub pages. +5) Even the start of a [documentation site](https://Werecodent.github.io/SharpProjectStarter/) using GitHub pages. ## Instructions Customize the project for your own use by following these steps: 1) Replace all instance of "Werecodent" with your organization's name (or empty). -2) Replace all instances of "UltimateProjectStarter" with your project's name. +2) Replace all instances of "SharpProjectStarter" & "Sharp Project Starter" with your project's name. 3) Install "CodeCov" as a GitHub app to the project/organization and set it up, or remove all references. 4) Tweak existing code as needed and begin coding. ## Documentation -The documentation site is located here: https://Werecodent.github.io/UltimateProjectStarter/ +The documentation site is located here: https://Werecodent.github.io/SharpProjectStarter/ The raw files can be viewed from the [docs](docs) folder or built into a local site using Jekyll. +## Sponsors + +Werecodent +Werebunny + ## Contributing If you're looking to contribute, thanks for your interest. Feel free to submit reports for any issues you can find, or request potential features you'd like to see [here](../../issues). If you wish to contribute code to the project, refer to the contributing guidelines [here](.github/CONTRIBUTING.md) which also include instructions for environment setup. Please follow the [code of conduct](.github/CODE_OF_CONDUCT.md) when contributing. @@ -45,7 +50,7 @@ View the [license](LICENSE) file for more details. * [Coverlet](https://github.com/tonerdo/coverlet) + [ReportGenerator](https://danielpalme.github.io/ReportGenerator) + [CodeCov](https://codecov.io): For test coverage. * [Bullseye](https://github.com/adamralph/bullseye) + [SimpleExec](https://github.com/adamralph/simple-exec) + [MinVer](https://github.com/adamralph/minver): For project building. * [AsyncFixer](https://github.com/semihokur/AsyncFixer) + [MissingAwaitWarning](https://github.com/ykoksen/unused-task-warning) + [Meziantou.Analyzer](https://github.com/meziantou/Meziantou.Analyzer) + [Sonar](https://github.com/SonarSource/sonar-dotnet): For code analyzers. +* [DocFX](https://github.com/dotnet/docfx): For building the documentation site. * [CSharpier](https://github.com/belav/csharpier): For formatting code. * [GitHub](https://github.com): For hosting code. * [Microsoft](https://visualstudio.microsoft.com/vs/features/net-development): For C# and editors. - diff --git a/UltimateProjectStarter.slnx b/SharpProjectStarter.slnx similarity index 100% rename from UltimateProjectStarter.slnx rename to SharpProjectStarter.slnx diff --git a/docs/_config.yml b/docs/_config.yml deleted file mode 100644 index 3946269..0000000 --- a/docs/_config.yml +++ /dev/null @@ -1,6 +0,0 @@ -theme: jekyll-theme-architect -markdown: kramdown -highlighter: rouge - -title: UltimateProjectStarter -description: Quick template to start C# projects with. diff --git a/docs/_includes/nav.html b/docs/_includes/nav.html deleted file mode 100644 index c779fc2..0000000 --- a/docs/_includes/nav.html +++ /dev/null @@ -1,10 +0,0 @@ -

General:

- \ No newline at end of file diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html deleted file mode 100644 index cfee0fe..0000000 --- a/docs/_layouts/default.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - {% seo %} - - - -
-
- -

{{ site.title | default: site.github.repository_name }}

-
-

{{ site.description | default: site.github.project_tagline }}

- - View project on GitHub - -
-
- -
-
-
- {{ content }} -
- - -
-
- - - \ No newline at end of file diff --git a/docs/index.md b/docs/index.md deleted file mode 100644 index dd895f7..0000000 --- a/docs/index.md +++ /dev/null @@ -1,3 +0,0 @@ -# About - -Welcome to the documentation source for developers. This is the homepage. diff --git a/docs/pages/General-Structure.md b/docs/pages/General-Structure.md deleted file mode 100644 index 0067c76..0000000 --- a/docs/pages/General-Structure.md +++ /dev/null @@ -1,17 +0,0 @@ -# Structure - -Here's an example page. - -This project template aims to be as clear as possible with minimal root noise. - -## ./artifacts - -Generated upon building, this folder contains everything created by the project. Deleting this folder leaves the project in a clean state. - -## Directory.Build.props - -Contains common build properties and dependencies shared among all child projects/folders. - -## .editorconfig - -Contains rules for all child projects/folders. Instances under src & tests generally contain analyzer settings. diff --git a/src/Build/Build.csproj b/src/Build/Build.csproj index a31310b..d90b907 100644 --- a/src/Build/Build.csproj +++ b/src/Build/Build.csproj @@ -1,7 +1,7 @@ - net10.0 + net11.0 exe false $(MSBuildProjectName) diff --git a/src/Build/Program.cs b/src/Build/Program.cs index cdf94f6..28db3f6 100644 --- a/src/Build/Program.cs +++ b/src/Build/Program.cs @@ -13,6 +13,9 @@ internal static class Program "artifacts" ); + /// Base directory for build tools. + private static readonly string _ToolsDir = Path.Combine(_ArtifactDir, "tools"); + /// Console application entry point. /// Command-line arguments. public static Task Main(string[] args) @@ -25,10 +28,13 @@ public static Task Main(string[] args) Target("coverage", dependsOn: ["compile"], CoverageAsync); Target("pack", dependsOn: ["compile"], PackAsync); Target("debugCrash", dependsOn: ["compile"], DebugCrashAsync); + Target("buildSite", dependsOn: ["restore"], BuildSiteAsync); + Target("serveSite", dependsOn: ["buildSite"], ServeSiteAsync); return RunTargetsAndExitAsync(args); } /// Downloads all packages for the solution. + /// A that represents the asynchronous operation. private static async Task RestoreAsync() { await RunAsync("dotnet", "tool update -g csharpier").ConfigureAwait(false); @@ -37,6 +43,7 @@ private static async Task RestoreAsync() /// Builds the solution. /// Build configuration to use. + /// A that represents the asynchronous operation. private static Task CompileAsync(string configuration) { return RunAsync("dotnet", $"build --no-restore --configuration {configuration}"); @@ -44,6 +51,7 @@ private static Task CompileAsync(string configuration) /// Tests the solution. /// Build configuration to use. + /// A that represents the asynchronous operation. private static Task TestAsync(string configuration) { return RunAsync("dotnet", $"test --no-restore --no-build --configuration {configuration}"); @@ -51,6 +59,7 @@ private static Task TestAsync(string configuration) /// Tests the solution with file logging. /// For debugging test harness crashes. + /// A that represents the asynchronous operation. private static Task DebugCrashAsync() { string logDir = Path.Combine(_ArtifactDir, "logs"); @@ -62,13 +71,38 @@ private static Task DebugCrashAsync() return RunAsync("dotnet", testArgs + "--configuration Debug"); } + /// Builds the documentation and site. + /// A that represents the asynchronous operation. + private static async Task BuildSiteAsync() + { + string siteDir = Path.Combine(_ArtifactDir, "site"); + string apiDir = Path.Combine(_ArtifactDir, "api"); + EnsureEmpty(siteDir); + EnsureEmpty(apiDir); + + await RunAsync("dotnet", $"tool update docfx --tool-path {_ToolsDir}") + .ConfigureAwait(false); + + await RunAsync($"{_ToolsDir}/docfx", "metadata site/docfx.json").ConfigureAwait(false); + await RunAsync($"{_ToolsDir}/docfx", "build site/docfx.json").ConfigureAwait(false); + } + + /// Builds the documentation and site. + /// A that represents the asynchronous operation. + private static Task ServeSiteAsync() + { + string siteDir = Path.Combine(_ArtifactDir, "site"); + + return RunAsync($"{_ToolsDir}/docfx", $"serve {siteDir}"); + } + /// Tests and analyzes test code coverage. + /// A that represents the asynchronous operation. private static async Task CoverageAsync() { const string prefix = "coverage"; const string postfix = ".cobertura.xml"; - string toolsDir = Path.Combine(_ArtifactDir, "tools"); string coverageDir = Path.Combine(_ArtifactDir, "coverage"); string testDir = Path.Combine(coverageDir, "testResults"); string reportDir = Path.Combine(coverageDir, "report"); @@ -103,17 +137,18 @@ string result in Directory.GetFiles( await RunAsync( "dotnet", - $"tool update dotnet-reportgenerator-globaltool --tool-path {toolsDir}" + $"tool update dotnet-reportgenerator-globaltool --tool-path {_ToolsDir}" ) .ConfigureAwait(false); await RunAsync( - $"{toolsDir}/reportgenerator", + $"{_ToolsDir}/reportgenerator", $"-reports:{coverageDir}/*.xml -targetdir:{reportDir}" ) .ConfigureAwait(false); } /// Packs the solution for release. + /// A that represents the asynchronous operation. private static Task PackAsync() { string releaseDir = Path.Combine(_ArtifactDir, "releases"); diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 167bb74..c557922 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -6,7 +6,7 @@ true All true - Werecodent.UltimateProjectStarter.$(MSBuildProjectName) + Werecodent.SharpProjectStarter.$(MSBuildProjectName) v diff --git a/src/Library/Library.csproj b/src/Library/Library.csproj index 2808c48..3d58703 100644 --- a/src/Library/Library.csproj +++ b/src/Library/Library.csproj @@ -1,5 +1,5 @@  - net10.0 + net11.0 diff --git a/src/Library/TextChecker.cs b/src/Library/TextChecker.cs index ad5c065..87248a8 100644 --- a/src/Library/TextChecker.cs +++ b/src/Library/TextChecker.cs @@ -1,4 +1,4 @@ -namespace Werecodent.UltimateProjectStarter.Library; +namespace Werecodent.SharpProjectStarter.Library; /// Verifies string contents. public static class TextChecker diff --git a/src/Terminal/Program.cs b/src/Terminal/Program.cs index d895243..49e944b 100644 --- a/src/Terminal/Program.cs +++ b/src/Terminal/Program.cs @@ -1,6 +1,6 @@ -using Werecodent.UltimateProjectStarter.Library; +using Werecodent.SharpProjectStarter.Library; -namespace Werecodent.UltimateProjectStarter.Terminal; +namespace Werecodent.SharpProjectStarter.Terminal; /// Handles running chess on the console. internal static class Program diff --git a/src/Terminal/Terminal.csproj b/src/Terminal/Terminal.csproj index 5d9aa54..2787c9e 100644 --- a/src/Terminal/Terminal.csproj +++ b/src/Terminal/Terminal.csproj @@ -1,7 +1,7 @@ Exe - net10.0 + net11.0 diff --git a/tests/Directory.Build.props b/tests/Directory.Build.props index 907fa5c..1697163 100644 --- a/tests/Directory.Build.props +++ b/tests/Directory.Build.props @@ -7,7 +7,7 @@ All true false - Werecodent.UltimateProjectStarter.$(MSBuildProjectName) + Werecodent.SharpProjectStarter.$(MSBuildProjectName) diff --git a/tests/Library.Tests/Library.Tests.csproj b/tests/Library.Tests/Library.Tests.csproj index 6cdcd7d..a1826ff 100644 --- a/tests/Library.Tests/Library.Tests.csproj +++ b/tests/Library.Tests/Library.Tests.csproj @@ -1,6 +1,6 @@  - net10.0 + net11.0 diff --git a/tests/Library.Tests/TextCheckerTests.cs b/tests/Library.Tests/TextCheckerTests.cs index 3ad4446..d58080a 100644 --- a/tests/Library.Tests/TextCheckerTests.cs +++ b/tests/Library.Tests/TextCheckerTests.cs @@ -3,7 +3,7 @@ using CreateAndFake.Fluent; using Xunit; -namespace Werecodent.UltimateProjectStarter.Library.Tests; +namespace Werecodent.SharpProjectStarter.Library.Tests; public static class TextCheckerTests { diff --git a/tests/Terminal.Tests/ProgramTests.cs b/tests/Terminal.Tests/ProgramTests.cs index 8462087..3213561 100644 --- a/tests/Terminal.Tests/ProgramTests.cs +++ b/tests/Terminal.Tests/ProgramTests.cs @@ -1,7 +1,7 @@ using CreateAndFake.Fluent; using Xunit; -namespace Werecodent.UltimateProjectStarter.Terminal.Tests; +namespace Werecodent.SharpProjectStarter.Terminal.Tests; public static class ProgramTests { diff --git a/tests/Terminal.Tests/Terminal.Tests.csproj b/tests/Terminal.Tests/Terminal.Tests.csproj index 0e0d716..aad8cf5 100644 --- a/tests/Terminal.Tests/Terminal.Tests.csproj +++ b/tests/Terminal.Tests/Terminal.Tests.csproj @@ -1,6 +1,6 @@ - net10.0 + net11.0 From 55d6924fc3a269c609366bd71717dbb0aae79400 Mon Sep 17 00:00:00 2001 From: Werebunny <18252929+Werebunny@users.noreply.github.com> Date: Tue, 24 Nov 2026 22:40:10 -0700 Subject: [PATCH 2/3] Add site folder. --- site/docfx.json | 66 +++++++++ site/docs/essentials/GettingStarted.md | 5 + site/docs/introduction/Installation.md | 5 + site/docs/toc.yml | 6 + site/images/SharpProjectStarterLogo.svg | 174 ++++++++++++++++++++++++ site/index.md | 19 +++ site/template/public/main.css | 17 +++ site/template/public/main.js | 15 ++ site/template/toc.extension.js | 28 ++++ site/toc.yml | 4 + 10 files changed, 339 insertions(+) create mode 100644 site/docfx.json create mode 100644 site/docs/essentials/GettingStarted.md create mode 100644 site/docs/introduction/Installation.md create mode 100644 site/docs/toc.yml create mode 100644 site/images/SharpProjectStarterLogo.svg create mode 100644 site/index.md create mode 100644 site/template/public/main.css create mode 100644 site/template/public/main.js create mode 100644 site/template/toc.extension.js create mode 100644 site/toc.yml diff --git a/site/docfx.json b/site/docfx.json new file mode 100644 index 0000000..e19ba9b --- /dev/null +++ b/site/docfx.json @@ -0,0 +1,66 @@ +{ + "$schema": "https://raw.githubusercontent.com/dotnet/docfx/main/schemas/docfx.schema.json", + "metadata": [ + { + "src": [ + { + "src": "../src", + "files": [ + "**/*.csproj" + ], + "exclude": [ + "Build/*.csproj" + ] + } + ], + "output": "../artifacts/api", + "noRestore": true, + "namespaceLayout": "flattened", + "memberLayout": "separatePages" + } + ], + "build": { + "content": [ + { + "files": [ + "**/*.{md,yml}" + ] + }, + { + "src": "../artifacts", + "files": [ + "api/**" + ] + } + ], + "resource": [ + { + "files": [ + "images/**" + ] + } + ], + "output": "../artifacts/site", + "template": [ + "default", + "modern", + "template" + ], + "globalMetadata": { + "_appName": "Sharp Project Starter", + "_appTitle": "Sharp Project Starter", + "_appLogoPath": "images/SharpProjectStarterLogo.svg", + "_appFaviconPath": "images/SharpProjectStarterLogo.svg", + "_enableSearch": true, + "_disableContribution": true, + "pdf": false + }, + "sitemap": { + "baseUrl": "https://werecodent.github.io/SharpProjectStarter", + "changefreq": "monthly" + }, + "xref": [ + "https://learn.microsoft.com/en-us/dotnet/.xrefmap.json" + ] + } +} \ No newline at end of file diff --git a/site/docs/essentials/GettingStarted.md b/site/docs/essentials/GettingStarted.md new file mode 100644 index 0000000..e07fb37 --- /dev/null +++ b/site/docs/essentials/GettingStarted.md @@ -0,0 +1,5 @@ +# Getting Started + +## Overview + +Welcome! This page is for instructions on how to use. diff --git a/site/docs/introduction/Installation.md b/site/docs/introduction/Installation.md new file mode 100644 index 0000000..b8c67e7 --- /dev/null +++ b/site/docs/introduction/Installation.md @@ -0,0 +1,5 @@ +# Installation + +## Overview + +Welcome! This page is for instructions on how to install. diff --git a/site/docs/toc.yml b/site/docs/toc.yml new file mode 100644 index 0000000..6d8e662 --- /dev/null +++ b/site/docs/toc.yml @@ -0,0 +1,6 @@ +- name: Introduction +- href: ../index.md +- href: introduction/Installation.md + +- name: Essentials +- href: essentials/GettingStarted.md diff --git a/site/images/SharpProjectStarterLogo.svg b/site/images/SharpProjectStarterLogo.svg new file mode 100644 index 0000000..59760d3 --- /dev/null +++ b/site/images/SharpProjectStarterLogo.svg @@ -0,0 +1,174 @@ + + + + + Sharp Project Starter Logo + + + + + + + + + + + + + + + + + + + + + + + Sharp Project Starter Logo + + + Werecodent LLC + + + + + Werecodent LLC + + + + + SharpProjectStarter + Logo + Icon + + + The logo for the Sharp Project Starter project (https://github.com/Werecodent/SharpProjectStarter). + + + + + + + + + + + + diff --git a/site/index.md b/site/index.md new file mode 100644 index 0000000..3a0cfb7 --- /dev/null +++ b/site/index.md @@ -0,0 +1,19 @@ +# About + +## Overview + +Welcome! This is the homepage. + +This project template aims to be as clear as possible with minimal root noise. Here's some details for the template: + +### ./artifacts + +Generated upon building, this folder contains everything created by the project. Deleting this folder leaves the project in a clean state. + +### Directory.Build.props + +Contains common build properties and dependencies shared among all child projects/folders. + +### .editorconfig + +Contains rules for all child projects/folders. Instances under src & tests generally contain analyzer settings. diff --git a/site/template/public/main.css b/site/template/public/main.css new file mode 100644 index 0000000..3ce7901 --- /dev/null +++ b/site/template/public/main.css @@ -0,0 +1,17 @@ +#logo { + max-height: 48px; + width: auto; + padding-right: 8px; +} + +.typelist.extensionMethods { + display: none; +} + +footer { + display: none; +} + +h1 { + text-decoration-line: underline; +} diff --git a/site/template/public/main.js b/site/template/public/main.js new file mode 100644 index 0000000..163ae5a --- /dev/null +++ b/site/template/public/main.js @@ -0,0 +1,15 @@ +export default { + /** A list of icons to show in the header next to the theme picker */ + iconLinks: [ + { + icon: 'heart', + href: 'https://github.com/sponsors/Werecodent', + title: 'Sponsor' + }, + { + icon: 'github', + href: 'https://github.com/Werecodent/SharpProjectStarter', + title: 'GitHub' + } + ] +} diff --git a/site/template/toc.extension.js b/site/template/toc.extension.js new file mode 100644 index 0000000..4064e0f --- /dev/null +++ b/site/template/toc.extension.js @@ -0,0 +1,28 @@ +/** + * This method will be called at the start of exports.transform in toc.html.js and toc.json.js + */ +exports.preTransform = function (model) { + simplifyTocNamespaces(model); + return model; + + /** + * Cleans up titles in the table of contents by removing the common project namespace. + * @param {*} item Model with a potential title name to clean. + */ + function simplifyTocNamespaces(item) { + if (item.name) { + if (item.name == "Werecodent.SharpProjectStarter") { + item.name = "SharpProjectStarter"; + } else { + item.name = item.name.replace("Werecodent.SharpProjectStarter.", ''); + } + } + + if (item.items) { + var length = item.items.length; + for (var i = 0; i < length; i++) { + simplifyTocNamespaces(item.items[i]); + }; + } + } +} diff --git a/site/toc.yml b/site/toc.yml new file mode 100644 index 0000000..954ce4d --- /dev/null +++ b/site/toc.yml @@ -0,0 +1,4 @@ +- name: Docs + href: docs/ +- name: API + href: ../artifacts/api/ From 558771356dc68d771b1f11b06e48f15390f79b3b Mon Sep 17 00:00:00 2001 From: Werebunny <18252929+Werebunny@users.noreply.github.com> Date: Tue, 24 Nov 2026 22:50:32 -0700 Subject: [PATCH 3/3] Tidy up. --- .github/workflows/pages.yml | 2 -- README.md | 7 +++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 10c1bef..b15d446 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -3,8 +3,6 @@ name: Pages on: push: branches: [ main ] - pull_request: - branches: [ main ] workflow_dispatch: permissions: diff --git a/README.md b/README.md index 7a5737c..7403358 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # Sharp Project Starter -[![Build](https://github.com/Werecodent/SharpProjectStarter/actions/workflows/integration.yml/badge.svg?branch=main)](https://github.com/Werecodent/SharpProjectStarter/actions/workflows/integration.yml) -[![CodeCov Coverage](https://codecov.io/gh/Werecodent/SharpProjectStarter/branch/main/graph/badge.svg)](https://codecov.io/gh/Werecodent/SharpProjectStarter/branch/main) +[![Build](https://github.com/Werecodent/SharpProjectStarter/actions/workflows/integration.yml/badge.svg?branch=main)](https://github.com/Werecodent/SharpProjectStarter/actions/workflows/integration.yml) [![CodeCov Coverage](https://codecov.io/gh/Werecodent/SharpProjectStarter/branch/main/graph/badge.svg)](https://codecov.io/gh/Werecodent/SharpProjectStarter/branch/main) [![GitHub Sponsors](https://img.shields.io/github/sponsors/Werecodent?logo=githubsponsors)](https://github.com/sponsors/Werecodent) (This project is under construction at the moment; be cautious of incomplete instructions.) @@ -24,9 +23,9 @@ Customize the project for your own use by following these steps: ## Documentation -The documentation site is located here: https://Werecodent.github.io/SharpProjectStarter/ +Visit the [documentation site](https://werecodent.github.io/SharpProjectStarter/) for more information and how to get started. -The raw files can be viewed from the [docs](docs) folder or built into a local site using Jekyll. +A local site can be built from the source code using the terminal command "./build/run.sh serveSite". ## Sponsors