statiqdev / Statiq.Web

Statiq Web is a flexible static site generator written in .NET.
https://statiq.dev/web
Other
1.64k stars 235 forks source link

Add Statiq.Web .NET CLI template #915

Closed devlead closed 3 years ago

devlead commented 3 years ago

This adds a .NET CLI template, simplifies getting started with Statiq.Web

Currently just a project template, but nuget could contain more in the future.

Usage

dotnet new statiq-web -n MyWeb

Result

└───MyWeb
    │   MyWeb.csproj
    │   Program.cs
    │
    └───input
            index.md

When on nuget it would just be installed

dotnet new -i Statiq.Web.Templates

To test pr

dotnet pack .\src\Statiq.Web.Templates\Statiq.Web.Templates.csproj
dotnet new -i .\src\Statiq.Web.Templates\bin\Debug\Statiq.Web.Templates.1.0.0-beta.3.nupkg
CLAassistant commented 3 years ago

CLA assistant check
All committers have signed the CLA.

devlead commented 3 years ago

@daveaglick build error seems to be relative project references to Statiq. Framework which is in another repo.

daveaglick commented 3 years ago

Thanks!!! This is great, anything to help onboarding is hugely appreciated.

Yeah, build errors are due to ongoing in-process increments between Framework and Web, need to figure out how to handle that at some point.

devlead commented 3 years ago

Yeah, build errors are due to ongoing in-process increments between Framework and Web, need to figure out how to handle that at some point.

Ok for now I've added so Statiq framework is cloned out too and now PR builds.

devlead commented 3 years ago

@daveaglick rebased and conflicts sorted against latest main.

daveaglick commented 3 years ago

Thanks! Hopefully I get to this one soon 🤞

daveaglick commented 3 years ago

Thanks a bunch for this, it'll make onboarding a lot easier I think!

I can see expanding the set of templates as we go to include themes or other styles of sites. I think Statiq.Web is the right place for this too. I was considering a separate repo for templates earlier, but it's probably better to make sure they cycle versions and release with the specific project. We can create a separate Statiq.Docs.Templates later once that's mature enough.