Skip to content

Commit

Permalink
(#902) Formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
steviecoaster committed Dec 14, 2023
1 parent 6ab7c0b commit 60ebad0
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions input/en-us/guides/create/create-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@ Chocolatey templates are one of the more lesser-known, yet very powerful, featur
- Runs an exe installer
- Copies files to specific places
- Makes registry edits
- **Insert more ideas here**

The key takeway is templates are only limited by your imagination, and can be as flexible as you need them to be.

One of the most powerful advantages of templates is there ability to use key:value pairs to pass specific data into a package. For example, you may have a need to create multiple packages whose only difference is the location in which they will be used. In this situation,
One of the most powerful advantages of templates is their ability to use key-value pairs to pass specific data into a package. For example, you may have a need to create multiple packages whose only difference is the location in which they will be used. In this situation,

### Creating your template
### Creating Your Template

Templates are stored in the **C:\ProgramData\chocolatey\templates** directory. The name of the folder must match the name you wish to give the template.
Templates are stored in the `C:\ProgramData\chocolatey\templates` directory. The name of the folder must match the name you wish to give the template.

#### Create Template Directories

Expand All @@ -30,7 +29,7 @@ New-Item -Path 'C:\ProgramData\chocolatey\templates\TutorialTemplate','C:\Progra

#### Create Install Script

We'll next create a _very_ simple chocolateyInstall.ps1 script for our template.
We'll next create a _very_ simple `chocolateyInstall.ps1` script for our template.

Execute the following in an **elevated** PowerShell window to create the script.

Expand Down Expand Up @@ -78,7 +77,7 @@ Placeholders are addressed as `key:value` pairs on the commandline where the `k
Let's see this usage of a template in practice. In an **elevated** PowerShell window execute the following

```powershell
#Substitute the country USA with your own Country below
# Substitute the country USA with your own Country below
Set-Location '~\tutorials'
choco new template-tutorial --version='1.0.0' --template='TutorialTemplate' Country:USA --build-package
```
Expand Down

0 comments on commit 60ebad0

Please sign in to comment.