Microsoft recently announced a major feature rollout, SharePoint Online Hub Sites, for Targeted Release Users. This is expected to be rolled out for all by end of May 2018. This has created a lot of buzz and rightly so, with the set of features it comes packed with. A common landing page for related sites was one of the most sought after requirements from various customer I have worked with.
What is SharePoint Hub Site
We can’t create a hub site directly using create site option. There is not specific or separate template for that. This is just regular Team Site (using modern pages) or Communication site registered to a be hub site. Of course we can create multiple hub sites by registering those as hub with a simple PowerShell command. A hub site essentially rolls up (aggregates) some content from the associated sites and rolls down some settings to associated sites. This makes it really useful landing page for all associated sites and a starting point for those site users.
We can have max 100 Hub Sites in a SharePoint Tenant currently
What Gets Rolled Up
Before we jump in on “How” to do it, let’s understand “Why” first. Rolled up essentially means, it aggregates some content from associated sites and can show those in corresponding web parts in a hub site. This list is not so big currently, but I am sure it will grow over time. However, as a landing page of related sites, the current list provides good enough base to start with.
- News: All news articles published in the associated sites
- Site Activities: All user activities done in the associated sites
- Search: Behaves as a custom search, scoped to all associated sites
- Highlighted Content: This web part gets another source “All sites in hub”
Let’s take a detailed look at each of these to find out what those and and any additional steps required to make these work.
As mentioned above, Hub sites work with Modern Interface. So to be able to fetch News Articles, the associated sites need to publish News using the Modern Interface.
A site based on classic interface can also be associated to a hub site, but you need to go to a list/library which is based on modern interface to get the “Site Information” option visible in the Gear icon.
Either the News Article should be created directly or site pages should be promoted as News
But we also need to do a little change in our News web part in hub site before it can show up all the aggregated news articles from associated sites.
By default the News web part of the hub site is configured to show News articles from within the same site. We need to change that to look into either all or selected associated sites.
Go to the Hub site landing page and edit the News Web Part. Under the option “Select a news source”, select “All sites in the hub”.
You can also select specific sites if you don’t want news to be rolled up from all associated sites by clicking on the Select sites option.
And that’s it, the news web part in the hub site will now start showing the aggregated news articles from selected associated sites.
The aggregation is based on Search so published articles may take few minutes to few hours to appear in the hub site
Look closely and you will see if even shows the number of views of each of these articles. Neat 🙂
Another important aggregation happen at hub site level is of Users activities across the associated sites. Unfortunately, I could not get this working even after multiple attempts – Removing and adding the Site Activities web part on hub site, Adding that web part in each of the associated sites, etc. It continued to show the Site Activities only from within the Hub Site only and not from any of the associated sites. But I would like to believe some issue with my tenant is causing this behavior and you should see all the site activities combined from associated sites aggregated at hub site level.
I find this one most powerful out of the three features currently integrated with hub. Out of the box, in modern sites, we can either search within the current site or all sites combined. SharePoint huh site gives us a great feature of searching within all associated sites (from across multiple site collections too) directly from the hub site interface. This is enabled by default without any additional configuration.
Again, when a new site is associated with a hub site, it will take some time before hub site will start showing search results from that associated site.
For some reason, I could not get any results from an associated Office 365 Group from within the Hub Site, even though the content was searchable from all other site collections/Office 365 Groups.
This is actually an extension of the Search feature itself but due to its significance, I found it worth mentioning here. Once a site is registered as a hub site, the Highlighted Content web part gets another source listed as “All sites in the hub” which dynamically refers all the associated sites. So, now the hub site can show all the documents based on the query (like recent documents from across all associated sites) in one single view.
What Gets Rolled Down
Let’s take a look at what the hub site pushed back to the associated sites to ensure users get a seamless experience when browsing through an associated site from the hub site.
- Top Navigation: Appears on top of the hub site and all associated sites
- Theme: All associated sites share the theme of the hub site
- Site Logo: Logo applied in the hub site settings appears as site logo in all associated sites
Let’s take a detailed look at each of these and find out how to work with these.
When I was exploring the hub site, somehow I was under the impression that links of associated sites will appear on top navigation of hub site automatically. Of course, I was not correct. By default, only the link of the Hub Site appears on top. We need to build rest of the Top Navigation manually in the hub site.
Now, we can add links of associated sites or any other site as well. We can put external links as well. This just behaves as an independent top navigation and doesn’t put any restrictions on the type of links than can be added with an exception that link headers must also have a valid URL. Something like http://# that we used to do to make links non-clickable doesn’t work 🙁
If we try to add the links header like above, it won’t throw any error but won’t save it as well. So, Let’s just give any URL there to move forward. I want to show how to add links, so that those appear as a drop down. Once we provide a valid name in the address field and save that, it would appear in top navigation next to the hub site link.
Add link of one of your associated sites by clicking on the (+) icon, give the URL and Name that want to show it as and save that.
Now, click on the icon (…) next to it and select “Make sub link” and save it.
That’s it, now the link will appear as a sub menu under Associated Sites. We can add other links likewise.
Once all the desired links have been added in the Top Navigation, all we have to do it to “wait”. It will take sometime (say between 15 mins to 4 hours) before the entire top navigation starts appearing in the associated sites too.
You can try cleaning local storage from your browser cache to make the updated top navigation appear faster in associated sites.
Let’s now change the theme of the hub site and see what happens to the associated sites. In the hub site, Go to the Gear icon on top and click on “Change the look”.
Select one of the themes and apply.
Again, like other features, it take a few minutes before the applied theme at hub site level gets propagated to all associated sites. Wait for a few minutes and then browse to one of the associated sites. You can see the associated sites will have the same theme applied as of the hub site.
What happens if we try to change the theme of an associated site manually? Click on the Top Gear icon and select “Change the look”. It shows a nice message “Your site is connected to the IT Home hub site and is set to automatically adopt the same theme.”
So apparently, using same theme as of the hub site is NOT an optional feature. All associates sites will use the same theme as of the hub site.
Now this one can be confusing a bit. In a hub site, there are now two places from where the Site Logo can be changed. One from the “Site Information” and another from “Hub Site Settings”.
If we change it from the Site Information option, it will update the Site Logo associated with the hub site that appears before the site title. This is NOT the logo which will be pushed to the associated sites.
When you click Save, you can see the Site Logo gets updated immediately like any other site and appears before the Title.
The Site Logo that gets pushed to all associated sites, appear before the Top Navigation and doesn’t actually replaces the Site Logo which normally appear before the Title of the sites. We need to update the Logo from the “Hub site settings”.
After saving the logo, it appears before the Top Navigation.
After a few minutes, the same logo will appear in all the associated sites. So essentially, all associated sites will have their own Site Logos as well and this will be an additional logo appearing with Top Navigation to give some common identity to all associated sites.
How to Register a Hub Site
Now that we know what is expected from the Hub Sites, let’s take a quick look at how to get that created. If you don’t have a communication site or a team site created already, create a separate site based on either template.
Add-Type -Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" Connect-SPOService -Url "https://xxxx-admin.sharepoint.com" Register-SPOHubSite "https://xxxx.sharepoint.com/sites/ITHub"
If the command gets executed successfully, it would show the output
If you get an error message “The term ‘Register-SPOHubSite’ is not recognized as the name of a cmdlet”, download latest SPO Management Shell from https://www.microsoft.com/en-us/download/details.aspx?id=35588
Browse to the newly created site and you could see additional Hub Site related options became visible.
The hub site can now be configured with required web parts, top navigation and Site Logo as explained above in this article.
We can see the list of all Hub Sites in the tenant by running the Get-SPOHubSite PowerShell Command.
If any Hub Site needs to be Unregistered, following PowerShell command can be used.
Associate Sites with Hub Site
Once the Hub Site has been created, site admins can associate their sites easily with that. In all sites, under Site Information section, one additional section will appear “Hub site association”. This lists all the hub sites available in the tenant with which the current site can be associated with. Hub association drop down will appear only at site collection level and NOT at sub site levels. All sub sites inherit the same hub from the site collection and that can’t be changed.
You must be on a modern page or list/library using modern interface to get this Site Information option under the settings gear.
The site admin just needs to select the desired hub site and save it. Within a few minutes the associated site will start showing the Top Navigation, Site Theme and Site Logo from the selected hub site.
As you can guess from the above interface, one site can be associated with only one hub site. Associating a site with hub site doesn’t change any permissions of the site.
Permissions on Hub Sites
Ideally, not all site admins should be allowed to able to associate their sites to any hub site directly. Otherwise this may lead to governance issues with hub sites. To control who can associate their site with hub sites, use the following PowerShell command – you can give “Join” rights to individual users.
Grant-SPOHubSiteRights -Identity https://xxxx.sharepoint.com/sites/ITHub "[email protected]" -Rights Join
And that’s all I had for today. Hope you now have a little better idea about SharePoint Hub Sites.