TerevintoSoftware.StaticSiteGenerator.Tool 1.2.2

.NET 6.0
dotnet tool install --global TerevintoSoftware.StaticSiteGenerator.Tool --version 1.2.2
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local TerevintoSoftware.StaticSiteGenerator.Tool --version 1.2.2
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=TerevintoSoftware.StaticSiteGenerator.Tool&version=1.2.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package TerevintoSoftware.StaticSiteGenerator.Tool --version 1.2.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Static Site Generator

Coverage Status Nuget version

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

  1. Install the tool: dotnet tool install TerevintoSoftware.StaticSiteGenerator.Tool
  2. (optional) Create a new project: dotnet new mvc -o MyProject
  3. (optional) See the available options with ssg -h
  4. Run the static site generation: ssg --project [project-path] --output [output-path]

The main website for testing out the basic set of features in this tool is here.

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

The .NET Tool and this solution are 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
.NET net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
1.2.2 69 6/27/2022
1.2.1 67 6/11/2022
1.2.0 64 6/5/2022
1.1.1 79 5/30/2022

[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.