SEO Metadata for Umbraco is a property editor that is used for maintaining common SEO-related information for a page. It gives users a visual representation of how the page would look on a Google search result page and hints to when the title and description is too long, with optional validation.
0.4.0
0.3.0
0.2.1
0.2.0
Install the latest version through NuGet.
Install-Package Epiphany.SeoMetadata
After installing via Nuget, create a property editor of type SEO Metadata and include on your page. We recommend the property name "metadata" to work with all features out-of-the-box (see the URL Name section for configuration options)
Alternatively, if you want to hack around with the project, you can fork, checkout and develop locally. See the Developing SEO Metadata section.
The SEO Metadata is stored as JSON, so can be used dynamically.
Title: @CurrentPage.Metadata.Title
Description: @CurrentPage.Metadata.Description
Do Not Index?: @CurrentPage.Metadata.NoIndex
URL Name: @CurrentPage.Metadata.UrlName
A Property Editor Value Converter is installed for getting a strongly-typed SeoMetadata instance.
@{
var metadata = Model.Content.GetPropertyValue<Epiphany.SeoMetadata.SeoMetadata>("metadata");
}
Title: @metadata.Title
Description: @metadata.Description
Do Not Index?: @metadata.NoIndex
URL Name: @metadata.UrlName
The following snippet can be used for using the Do Not Index checkbox.
@if (Model.Content.GetPropertyValue<Epiphany.SeoMetadata.SeoMetadata>("metadata").NoIndex)
{
<meta name="robots" content="noindex">
}
If you're a fan of ZpqrtBnk Umbraco Models Builder or the new Umbraco Models Builder, you can add something like the following in your partial class
[ImplementPropertyType("metadata")]
public virtual SeoMetadata Metadata
{
get { return this.GetPropertyValue<SeoMetadata>("metadata"); }
}
SEO Metadata also installs a UrlSegmentProvider to ensure the URL Name property works as intended. By default, it expects your SEO Metadata property to be called metadata. You can configure this property by adding the following setting to your appSettings in your web.config
<add key="SeoMetadata.PropertyName" value="seoMetadata" />
If you want to disable the SeoMetadataUrlSegmentProvider altogether (to add manually, or implement yourself), you can set the following appSetting to disable it.
<add key="SeoMetadata.NoSegmentProvider" value="true" />
git clone https://github.com/ryanlewis/seo-metadata.git
cd seo-metadata
npm install -g grunt-cli
npm install
build.cmd
grunt
If you wish to build it to a local Umbraco directory, use the target option.
grunt --target=c:\dev\path-to-umbraco-root-dir