Orchard Core Recipes - Prompt Templates
Create a Recipe
You are an Orchard Core expert. Generate a recipe JSON file for configuring an Orchard Core site.
Guidelines
- Recipes are JSON files with a specific structure containing steps.
- Each step has a
nameproperty that determines its type. - Steps are executed in order during recipe execution.
- Use
Featurestep to enable features before configuring them. - Use
ContentDefinitionstep to define content types and parts. - Use
Contentstep to create content items. - Recipe files are placed in the module's
Recipesfolder. - For recipe-generated content items, do not hard-code manually invented
ContentItemIdorContentItemVersionIdvalues. - Prefer recipe variables and JavaScript expressions such as
[js: uuid()],[js: new Date().toISOString()], andvariables('name')when you need reusable ids, timestamps, concatenation, or other computed values. - Treat
references/recipe-schemas/recipe.schema.jsonas the authoritative schema for the full recipe document. - Before writing any step payload, open
references/recipe-schemas/index.json, find the exact step file, and use that<step>.schema.jsonas the authoritative contract for allowed properties, required properties, casing, and enum values. - Do not invent step names, property names, or alternate casing. Copy the exact
namevalue required by the step schema. - When using
ContentDefinition, also consult theorchardcore-content-fieldsandorchardcore-content-partsskills for valid field settings, editors, display modes, and part-specific options, then make sure the final JSON still conforms toreferences/recipe-schemas/ContentDefinition.schema.json. - If a step schema and an example conflict, follow the schema.
Required Reference Workflow
- Start with
references/recipe-schemas/recipe.schema.jsonto shape the root recipe object. - Open
references/recipe-schemas/index.jsonto locate the per-step schema file for every step you plan to emit. - Validate each step against its own
.schema.jsonfile before returning the final recipe. - For
ContentDefinitionrecipes, combine the schema with the specialized content-field and content-part skills instead of guessing field editors or settings.
Recipe Schema References
references/recipe-schemas/recipe.schema.json— full recipe schema with thestepsarray.references/recipe-schemas/index.json— map of recipe step names to per-step schema files.references/recipe-schemas/*.schema.json— one file per supported recipe step.references/recipe-schemas/README.md— guidance on how to use the generated schema files with this skill.
Recipe Structure
{
"name": "{{RecipeName}}",
"displayName": "{{DisplayName}}",
"description": "{{Description}}",
"author": "{{Author}}",
"website": "{{Website}}",
"version": "1.0.0",
"issetuprecipe": false,
"categories": ["{{Category}}"],
"tags": [],
"steps": []
}
This structure is illustrative. The generated schema files in references/recipe-schemas/ are the source of truth.
Common Recipe Steps
Feature Step
{
"steps": [
{
"name": "Feature",
"enable": [
"OrchardCore.ContentManagement",
"OrchardCore.ContentTypes",
"OrchardCore.Title",
"OrchardCore.Autoroute"
],
"disable": []
}
]
}
Use references/recipe-schemas/feature.schema.json for the exact schema, especially the valid feature IDs and property casing.
Content Definition Step
{
"steps": [
{
"name": "ContentDefinition",
"ContentTypes": [
{
"Name": "{{ContentTypeName}}",
"DisplayName": "{{DisplayName}}",
"Settings": {
"ContentTypeSettings": {
"Creatable": true,
"Listable": true,
"Draftable": true,
"Versionable": true
}
},
"ContentTypePartDefinitionRecords": [
{
"PartName": "TitlePart",
"Name": "TitlePart",
"Settings": {}
}
]
}
],
"ContentParts": []
}
]
}
Use references/recipe-schemas/ContentDefinition.schema.json for the step wrapper and content-definition structure, then consult orchardcore-content-fields and orchardcore-content-parts for field- and part-specific option catalogs.
Content Step
{
"variables": {
"now": "[js: new Date().toISOString()]",
"year": "[js: new Date().getFullYear()]",
"featuredCategoryId": "[js: uuid()]"
},
"steps": [
{
"name": "Content",
"data": [
{
"ContentItemId": "[js: uuid()]",
"ContentItemVersionId": "[js: uuid()]",
"ContentType": "{{ContentTypeName}}",
"DisplayText": "[js: 'Spring of ' + variables('year')]",
"Latest": true,
"Published": true,
"ModifiedUtc": "[js: variables('now')]",
"PublishedUtc": "[js: variables('now')]",
"CreatedUtc": "[js: variables('now')]",
"TitlePart": {
"Title": "[js: 'Spring of ' + variables('year')]"
}
},
{
"ContentItemId": "[js: variables('featuredCategoryId')]",
"ContentItemVersionId": "[js: uuid()]",
"ContentType": "{{ContentTypeName}}",
"DisplayText": "Summer Program",
"Latest": true,
"Published": true,
"ModifiedUtc": "[js: variables('now')]",
"PublishedUtc": "[js: variables('now')]",
"CreatedUtc": "[js: variables('now')]",
"TitlePart": {
"Title": "Summer Program"
}
}
]
}
]
}
Use references/recipe-schemas/content.schema.json for the exact step contract.