[How-To]: Create Modern SharePoint Communication and Team Site Templates / Site Designs

In this quick how-to video, we look at how you can easily script site template provisioning in SharePoint Online modern communication and team sites.

Links in this video:

Code used in the video:

//------------------------------
// Theme Provisioning

$themepallette = @{
"themePrimary" = "#9b59b6";
"themeLighterAlt" = "#faf7fb";
"themeLighter" = "#f5eef8";
"themeLight" = "#ebdef0";
"themeTertiary" = "#d5b9e0";
"themeSecondary" = "#a569bc";
"themeDarkAlt" = "#8e4ba8";
"themeDark" = "#6e3a83";
"themeDarker" = "#572e67";
"neutralLighterAlt" = "#f8f8f8";
"neutralLighter" = "#f4f4f4";
"neutralLight" = "#eaeaea";
"neutralQuaternaryAlt" = "#dadada";
"neutralQuaternary" = "#d0d0d0";
"neutralTertiaryAlt" = "#c8c8c8";
"neutralTertiary" = "#d6d6d6";
"neutralSecondary" = "#474747";
"neutralPrimaryAlt" = "#2e2e2e";
"neutralPrimary" = "#333333";
"neutralDark" = "#242424";
"black" = "#1c1c1c";
"white" = "#ffffff";
"primaryBackground" = "#ffffff";
"primaryText" = "#333333";
"bodyBackground" = "#ffffff";
"bodyText" = "#333333";
"disabledBackground" = "#f4f4f4";
"disabledText" = "#c8c8c8";
}

Add-SPOTheme -Name "Origami Purple" -Palette $themepallette -IsInverted $false

//------------------------------
//Site Structure Provisioning

$site_script = @'
{
  "$schema": "schema.json",
  "actions": [
    {
		"verb": "applyTheme",
		"themeName": "Origami Purple"
    },
    {
	   "verb": "addNavLink",
	   "url": "/",
	   "displayName": "Employee Services",
	   "isWebRelative": true
	},
    {
	   "verb": "addNavLink",
	   "url": "/",
	   "displayName": "Business Services",
	   "isWebRelative": true
	},
    {
	   "verb": "addNavLink",
	   "url": "/",
	   "displayName": "Workspaces",
	   "isWebRelative": true
	},
	{
    "verb": "setSiteLogo",
    "url": "https://sharemuch.sharepoint.com/sites/OrigamiV10/SiteAssets/static1.squarespace.com.png"
	}
  ],
  "bindata": { },
  "version": 1
}
'@


Add-SPOSiteScript -Title "Origami" -Content $site_script -Description "Creates Origami Site Script"
Add-SPOSiteDesign -Title "Origami" -WebTemplate "68" -SiteScripts "" -Description "Origami Site"


//------------------------------
// Cleanup
Remove-SPOTheme -Name "Origami Purple"
Remove-SPOSiteScript 
Remove-SPOSiteDesign 

Leave your comments on what are some of the things you're curious about so we can feature the most popular topics

ypentsarskyy_2016_small.jpg

Yaroslav Pentsarskyy is the founder of OrigamiConnect, a rapidly growing service and product offering which enables organizations to get an intranet designed for them without starting from a blank page. He's also 8 time Microsoft MVP, speaker at many local and worldwide tech events, and a published author of several SharePoint related books.

@spentsarsky