Skip to content

Commit e35997f

Browse files
committed
adding more content for site design
1 parent 32ddcf0 commit e35997f

9 files changed

+343
-88
lines changed

docs/declarative-customization/get-started-create-site-design.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
1+
---
2+
title: Get started creating SharePoint site designs and site scripts
3+
description: Get started creating SharePoint site designs and site scripts for users to create their own sites from.
4+
ms.date: 12/14/2017
5+
---
6+
17
# Get started creating site designs and site scripts
28

9+
> [!NOTE]
10+
> Site designs and site scripts are currently in preview and are subject to change. They are not currently supported for us in production environments.
11+
312
Build site designs to provide reusable lists, themes, layouts, pages, or custom actions so that your users can quickly build new SharePoint sites with the features they need. In this article you'll build a simple site design that adds a SharePoint list for tracking customer orders. Then you'll use the site design to create a new SharePoint site with the custom list.
413

5-
This article shows how to use SharePoint PowerShell cmdlets to create site scripts and site designs. You can also use CSOM and REST APIs to perform the same actions. The corresponding CSOM and REST calls are shown for reference in each step.
14+
This article shows how to use SharePoint PowerShell cmdlets to create site scripts and site designs. You can also use REST APIs to perform the same actions. The corresponding REST calls are shown for reference in each step.
615

716
## Create the site script in JSON
817

@@ -14,9 +23,6 @@ Each action is specified by the "verb" value in the JSON scipt. Also, actions ca
1423
1. Follow the instructions at [Connect to SharePoint Online PowerShell](https://technet.microsoft.com/en-us/library/fp161372.aspx) to connect to your SharePoint tenant.
1524
1. Create and assign the JSON that descripts the new script to a variable as shown in the PowerShell code below.
1625

17-
> ![NOTE]
18-
> You can also specify the script in a CSV format. (TBD link to more info on CSV example)
19-
2026
```powershell
2127
$site_script = @'
2228
{
@@ -71,31 +77,31 @@ The previous script will create a new SharePoint list named Customer Tracking. I
7177

7278
## Add the site script
7379

74-
Each site script must be registered in SharePoint so that it is available to. Add a new site design by using the **Add-SPOSiteScript** command. The following example shows how to add the JSON script described previously.
80+
Each site script must be registered in SharePoint so that it is available to. Add a new site design by using the **Add-SPOSiteScript** cmdlet. The following example shows how to add the JSON script described previously.
7581

7682
```powershell
7783
C:\> Add-SPOSiteScript -Title "Create customer tracking list" -Content $site_script -Description "Creates list for tracking customer contact information"
7884
```
7985

80-
After running the command you will get a result that lists the site script **ID** of the added script. Keep track of this ID somewhere because you will need it later when you create the site design.
86+
After running the cmdlet you will get a result that lists the site script **ID** of the added script. Keep track of this ID somewhere because you will need it later when you create the site design.
8187

82-
The REST API to add a new site script is **CreateSiteScript**. (TBD add CSOM link)
88+
The REST API to add a new site script is **CreateSiteScript**.
8389

8490
## Create the site design
8591

8692
Next you need to create the site design. The site design will appear in a drop down list when someone creates a new site from one of the templates. It can run one or more site scripts that have already been added.
8793

88-
- Run the following command to add a new site design. Replace \<ID\> with the site script ID from when you added the site script.
94+
- Run the following cmdlet to add a new site design. Replace \<ID\> with the site script ID from when you added the site script.
8995

9096
```powershell
9197
C:\> Add-SPOSiteDesign -Title "Contoso customer tracking" -WebTemplate "64" -SiteScripts "<ID>" -Description "Tracks key customer data in a list"
9298
```
9399

94-
The previous command creates a new site design named Contoso customer tracking. The -WebTemplate value selects which base template to associate with. The value "64" indicates Team site template, and the value "68" indicates the communication site template.
100+
The previous cmdlet creates a new site design named Contoso customer tracking. The -WebTemplate value selects which base template to associate with. The value "64" indicates Team site template, and the value "68" indicates the communication site template.
95101

96-
The JSON response will display the **ID** of the new site design. You can use in subsequent commands to update or modify the site design.
102+
The JSON response will display the **ID** of the new site design. You can use in subsequent cmdlets to update or modify the site design.
97103

98-
The REST API to add a new site design is **CreateSiteDesign**. (TBD add CSOM link)
104+
The REST API to add a new site design is **CreateSiteDesign**.
99105

100106
## Use the new site design
101107

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: Applying a site design to a default SharePoint template
3+
description: Customize the SharePoint team site or communications site template by applying a site design
4+
ms.date: 12/14/2017
5+
---
6+
7+
# Applying a site design to a default SharePoint template
8+
9+
> [!NOTE]
10+
> Site designs and site scripts are currently in preview and are subject to change. They are not currently supported for us in production environments.

docs/declarative-customization/site-design-json-schema.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
---
2-
# Mandatory fields. See more on aka.ms/skyeye/meta.
32
title: Site design JSON schema
43
description: JSON schema reference for building site designs for SharePoint.
5-
ms.date: 11/19/2017
4+
ms.date: 12/14/2017
65
---
76

87
# Site design JSON schema
98

9+
> [!NOTE]
10+
> Site designs and site scripts are currently in preview and are subject to change. They are not currently supported for us in production environments.
11+
1012
The site design is a list of actions. For more complex actions, such as creating a list, there are also subactions. Each action is specified by a "verb" value. Verb actions are run in the order they appear in the JSON script.
1113

1214
The overall JSON structure is specified as follows:
@@ -210,13 +212,16 @@ JSON value:
210212

211213
Example:
212214

215+
<!-- TBD: add link to Doug's Blue Yonder theme with note you need to create it first -->
216+
213217
```json
214218
{
215219
"verb": "applyTheme",
216220
"themeName": "Blue Yonder"
217221
}
218222
```
219223

224+
<!--
220225
## Create a page
221226
222227
Use the **createPage** verb to create a new page on the site.
@@ -247,6 +252,7 @@ Example:
247252
"setAsHomePage": true
248253
}
249254
```
255+
-->
250256

251257
## Set a site logo
252258

@@ -267,7 +273,7 @@ Example:
267273

268274
## Join a hub site
269275

270-
Use the **joinHubSite** verb to join the site to a hub. <TBD provide link to more information on hubs and how to get the id>
276+
Use the **joinHubSite** verb to join the site to a hub. <!-- TBD provide link to more information on hubs and how to get the id -->
271277

272278
JSON value:
273279

@@ -285,6 +291,7 @@ Example:
285291
## Trigger a flow
286292

287293
Use the **triggerFlow** verb to kick off a custom flow.
294+
<!-- update this with example from trigger workflow topic -->
288295

289296
JSON values:
290297

docs/declarative-customization/site-design-overview.md

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
---
22
title: SharePoint site design and site script overview
3-
description: Use site scripts and site designs to automate provisioning new SharePoint sites with custom configurations.
4-
ms.date: 11/19/2017
3+
description: Use SharePoint site scripts and site designs to automate provisioning new SharePoint sites with custom configurations.
4+
ms.date: 12/14/2017
55
---
66

77
# SharePoint site design and site script overview
88

9+
> [!NOTE]
10+
> Site designs and site scripts are currently in preview and are subject to change. They are not currently supported for us in production environments.
11+
912
Use site designs and site scripts to automate provisioning new SharePoint sites using your own custom configurations. When people in your organization create new SharePoint sites, you often need to ensure some level of consistency. For example, you may need proper branding and theming applied to each new site. You may also have detailed site provisioning scripts, such as using the PnP provisioning engine, that need to be applied each time a new site is created. This article describes how you can use site designs and site scripts to provide custom configurations to apply when new sites are created.
1013

1114
## How site designs work
@@ -18,15 +21,24 @@ Once a site design is selected, SharePoint creates the new site, and then runs a
1821

1922
![Progress pane listing completed actions from a site design](images/progress-pane.png)
2023

21-
You can create a site design by using PowerShell, CSOM, or the REST API. Here's an example of creating a new site design for the purpose of applying company branding.
24+
You can create a site design by using PowerShell, or the REST API. Here's an example that creates a new site design that creates a customer list and applies a theme.
2225

26+
```powershell
27+
C:\> Add-SPOSiteDesign `
28+
-Title "Contoso customer tracking" `
29+
-WebTemplate "64" `
30+
-SiteScripts ("607aed52-6d61-490a-b692-c0f58a6981a1","5d4756e9-e1f5-42f7-afa7-5fa5aac170aa") `
31+
-Description "Creates customer list and applies standard theme" `
2332
```
24-
TBD Powershell example of creating site design for brand (show isdefault)
33+
34+
```javascript
35+
RestRequest("/_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility.CreateSiteDesign", {info:{Title:"Contoso customer tracking", Description:"Creates customer list and applies standard theme", SiteScriptIds:["607aed52-6d61-490a-b692-c0f58a6981a1","5d4756e9-e1f5-42f7-afa7-5fa5aac170aa"], WebTemplate:"64"}});
2536
```
2637

27-
You can also make a site design the default for the team or communication site template. Then when someone chooses only the template, you can still apply a custom design. This is done by setting the **IsDefault** property to true as shown previously.
38+
In the previous example, the **SiteScripts** parameter contains the ID of two scripts that detail each action to run. We'll look at the site script contents in more detail later. The scripts will run in the order listed. The **WebTemplate** parameter value 64 indicates to register this site design with the team site template. The **Title** and **Description** parameters will be displayed when a user views site designs as they create a new team site. For more information on creating a site design, see [Get started creating site designs](get-started-create-site-design.md)
2839

29-
For more information, see [Get started creating site designs](get-started-create-site-design.md)
40+
> [!NOTE]
41+
> You can also make a site design the default for the team or communication site template. In this way you can modify the out-of-the-box base templates. For more information, see [Applying a site design to a default SharePoint template](site-design-apply-default-template.md).
3042
3143
## Anatomy of a site script
3244

@@ -86,7 +98,7 @@ Site scripts are JSON files that specify an ordered list of actions to run when
8698

8799
Each action in a site script is specified by a **verb** value in the JSON. In the previous script the first action is specified by the **applyTheme** verb. Then the **createSPList** verb creates the list. Notice that the **createSPList** verb contains its own set of verbs which run additional actions on just the list.
88100

89-
Actions include:
101+
Available actions include:
90102

91103
- Creating a new list
92104
- Applying a theme
@@ -95,7 +107,7 @@ Actions include:
95107
- Adding navigation
96108
- Triggering a Microsoft flow
97109

98-
You can create site scripts by using PowerShell, CSOM, or the REST API. Here's an example of how to create a site script that applies the Blue Yonder theme.
110+
You can create site scripts by using PowerShell or the REST API. Here's an example of how to create a site script that applies the Blue Yonder theme.
99111

100112
```
101113
TBD PowerShell example create a script for blue yonder theme
@@ -120,16 +132,25 @@ The process works as follows:
120132
1. The message triggers a call to an Azure function that you have configured.
121133
1. The Azure function runs your custom script, such as the PnP provisioning engine, to apply your custom configurations.
122134

123-
For a step-by-step tutorial on how to configure your own Microsoft flow with PnP provisioning, see [Build a complete site design using the PnP provisioning engine](site-design-pnp-provisioning)
135+
For a step-by-step tutorial on how to configure your own Microsoft flow with PnP provisioning, see [Build a complete site design using the PnP provisioning engine](site-design-pnp-provisioning.md)
124136

125137
## Scoping
126138

127139
You can configure site designs to only appear for specific groups or people in your organization. This is useful to ensure that people only see the site designs intended for them. For example, you may want the accounting department to only see site designs specific for them. And the accounting site designs may not make sense to show to anyone else.
128140

129-
Scopes are applied when you register a site design. You can specify the scope by user, Office 365 group, or a mail-enabled security group. Here is an example of registering a site design for only the accounting Office 365 group:
141+
Scopes are applied when you register a site design. You can specify the scope by user, or a mail-enabled security group. Here is an example of registering a site design for only the accounting Office 365 group:
130142

143+
Here's an example of how to scope an existing site design so that only Nestor (a user at the fictional Contoso site) can view and use the site design.
144+
145+
```powershell
146+
Grant-SPOSiteDesignRights `
147+
-Identity 44252d09-62c4-4913-9eb0-a2a8b8d7f863 `
148+
-Principals "[email protected]" `
149+
-Rights View
131150
```
132-
TBD: PowerShell example register a scoped site design
151+
152+
```javascript
153+
RestRequest("/_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility.GrantSiteDesignRights", {id:"44252d09-62c4-4913-9eb0-a2a8b8d7f863", principalNames:["[email protected]”], grantedRights:1});
133154
```
134155
135156
For more information, see [Apply a scope to your site design](site-design-scopes.md).

docs/declarative-customization/site-design-pnp-provisioning.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
---
2-
# Mandatory fields. See more on aka.ms/skyeye/meta.
3-
title: Build a complete site design using the PnP provisioning engine
4-
description: Build a complete site design using the PnP provisioning engine
5-
ms.date: 11/19/2017
2+
title: Build a complete SharePoint site design using the PnP provisioning engine
3+
description: Build a complete SharePoint site design using the PnP provisioning engine
4+
ms.date: 12/14/2017
65
---
76

87
# Calling the PnP Provisioning Engine from a Site Script
98

9+
> [!NOTE]
10+
> Site designs and site scripts are currently in preview and are subject to change. They are not currently supported for us in production environments.
11+
1012
Site Designs offer a great way to standardize the look and feel of your site collections. But if you want to take this one step further, by for instance adding a footer to every page, you might notice that Site Designs do not offer you that option. With the PnP Provisioning engine you can hover create a template which allows you to provision an application customizer to a site. This application customizer then can register a footer on every page. In this article you will learn how to create a site design that applies a PnP Provisioning Template to a site which in turn will add an application customizer to render a footer.
1113

1214
We use the following components in our setup:

0 commit comments

Comments
 (0)