安装OrchardCore模板
dotnet new -i OrchardCore.ProjectTemplates::1.0.0-rc2-16043 --nuget-source https://nuget.cloudsmith.io/orchardcore/preview/v3/index.json
创建CMS
dotnet new occms --framework net5.0
创建Module
dotnet new ocmodulecms
dotnet new ocmodulecms -n ModuleName.OrchardCore --AddPart true
dotnet new ocmodulecms -n ModuleName.OrchardCore --AddPart true --PartName Test` </pre>
选项 | 帮助 |
---|---|
-A--AddPart | 向项目中Startup.cs添加依赖注入,默认为Ture |
-P--PartName | 项目名称 |
-ov--orchard-version | 指定版本 |
创建自定义主题
dotnet new octheme -n "ThemeName.OrchardCore"
using OrchardCore.DisplayManagement.Manifest;
[assembly: Theme(
Name = "TemplateTheme.OrchardCore",
Author = "The Orchard Team",
Website = "https://orchardproject.net",
Version = "0.0.1",
Description = "The TemplateTheme."
)]
网友评论