-
Notifications
You must be signed in to change notification settings - Fork 28
Sitemap
patrickdemooij9 edited this page Jan 16, 2022
·
1 revision
If you want to use Sitemap for your Umbraco project then these are the steps to install the package:
- You only have to download the NuGet package to your project. You can use
dotnet add package uSeoToolkit.Umbraco.Sitemap
to download the NuGet package. Make sure to build your project after that!
After you are done with the installation, the sitemap will work straight away. You can go to /sitemap.xml and you'll see the sitemap rendering. If you have multiple domains like "test.com/en/" and "test.com/nl/", it'll show you a sitemap index on /sitemap.xml and the specific sitemaps for the domains can then be found at "test.com/en/sitemap.xml" and "test.com/nl/sitemap.xml".
You are able to change the configuration of the sitemap within your appsettings. The section lives under uSeoToolkit and the options to change are:
- ShowAlternatePages (default: true). Determines if alternate pages should be rendered in the sitemap.xml. Is only used if your page has multiple languages
- LastModifiedFieldAlias (default: "lastModifiedDate"). The field alias of the field that is used to determine the Last Modified date. If this field doesn't exist, then the publish date is used.
- ChangeFrequencyFieldAlias (default: "changeFrequency"). The field alias of the field that is used to determine the change frequency. If this field doesn't exist, then the change frequency isn't generated.
- PriorityFieldAlias (default: "priority). The field alias of the field that is used to determine the priority. If this field doesn't exist, then the priority isn't generated.