If you want to get started quickly the easiest way to get going is to use one of the Templates available. The templates are used to create a new project from scratch and not to add CMS functionality to an existing application.
If you want to add Piranha into an application, it's still a good start to create a new project from one of the templates and examine what happens in the Startup.cs
.
Project Templates for .NET Core are installed from the CLI using the dotnet new
command. If you're updating an already installed template, make sure you specify the version you want to install.
> dotnet new -i Piranha.Templates
The Web Template includes models, controllers and views for:
When creating a new project with dotnet new
you should first create a new empty folder. The default behaviour is that the new project is named after its containing folder. Please note that naming your project Piranha
(even if it is a test project) will result in a circular reference error when you try to restore the packages.
> dotnet new piranha.web
> dotnet restore
> dotnet run
The Blog Template includes models, controllers and views for:
When creating a new project with dotnet new
you should first create a new empty folder. The default behaviour is that the new project is named after its containing folder. Please note that naming your project Piranha
(even if it is a test project) will result in a circular reference error when you try to restore the packages.
> dotnet new piranha.blog
> dotnet restore
> dotnet run
The blog template is also available for Razor Pages.
> dotnet new piranha.blog.razor
> dotnet restore
> dotnet run