TerevintoSoftware.StaticSiteGenerator
2.1.0
dotnet add package TerevintoSoftware.StaticSiteGenerator --version 2.1.0
NuGet\Install-Package TerevintoSoftware.StaticSiteGenerator -Version 2.1.0
<PackageReference Include="TerevintoSoftware.StaticSiteGenerator" Version="2.1.0" />
paket add TerevintoSoftware.StaticSiteGenerator --version 2.1.0
#r "nuget: TerevintoSoftware.StaticSiteGenerator, 2.1.0"
// Install TerevintoSoftware.StaticSiteGenerator as a Cake Addin #addin nuget:?package=TerevintoSoftware.StaticSiteGenerator&version=2.1.0 // Install TerevintoSoftware.StaticSiteGenerator as a Cake Tool #tool nuget:?package=TerevintoSoftware.StaticSiteGenerator&version=2.1.0
Static Site Generator
This project aims to provide a way for c# developers to benefit from very cheap/free hosting through static files, while allowing them to use familiar ASP.NET MVC concepts (Views, Partials, Layouts, etc). This also allows you to have an initial static site that you can then update to a dynamic website backed by ASP.NET Core without starting from scratch.
Since this project converts Views into HTML files, it is not possible (at least yet) to use Models.
Packages
This project is divided in two packages:
Package | Purpose |
---|---|
TerevintoSoftware.StaticSiteGenerator | Contains the main logic of the project, depends on ASP.NET Core. |
TerevintoSoftware.StaticSiteGenerator.Tool | Contains a .NET Tool that can be invoked to perform the generation. |
Sample usage
SSG.NET has its own website that lists the different features here: https://www.staticsitegenerator.net/.
There is also a sample GitHub repository that shows how to use the tool for a Blog: https://github.com/CamiloTerevinto/StaticBlogTemplate.
How to build
- Install Visual Studio 2022 (.NET 6 required), if needed. The ASP.NET Core workload is required to build the project.
- Install git, if needed.
- Clone this repository.
- Build from Visual Studio or through
dotnet build
.
Running tests
Once the solution is compiled, tests can be run either from Visual Studio's Test Explorer window, or through dotnet test
.
License
This project is licensed under the MIT license.
Bug reports and feature requests
Please use the issue tracker and ensure your question/feedback was not previously reported.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- HtmlAgilityPack (>= 1.11.61)
- Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (>= 6.0.25)
- Spectre.Console (>= 0.49.1)
-
net8.0
- HtmlAgilityPack (>= 1.11.61)
- Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (>= 8.0.7)
- Spectre.Console (>= 0.49.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
[2.1.0]: Remove support for deprecated .NET 7.
[2.0.0]: Add support for .NET 8 and move to Spectre.Console.
[1.4.1]: Minor improvements.
[1.4.0]: Re-work culture-based link generation.
[1.3.5]: Delete accidentally pushed code.
[1.3.4]: Further improvements to word separation in the generation of kebab-cased URLs.
[1.3.3]: Improves URL generation for kebab-cased URLs.
[1.3.2]: Improves URL generation for kebab-cased URLs.
[1.3.1]: Improves view rendering so that views/components/partials can be found in the same folder as views being rendered.
[1.3.0]: Add a new option to skip deleting existing output. Makes the view generation run inside the project's folder.
[1.2.2]: Fixes an issue where a single culture always generated structures/links as if there were multiple cultures.
[1.2.1]: Internal re-archicture and improve code coverage to over 90%.
[1.2.0]: Adds an initial implementation for path-based views based on culture.
[1.1.1]: Fixes a URL generation bug for the default Controller actions. Previous versions were deprecated as unstable.