Umbraco 7 SEO 标签 [英] Umbraco 7 SEO tags

查看:31
本文介绍了Umbraco 7 SEO 标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网站,我想在 Umbraco 中为其创建 SEO 标签.我想知道它是如何完成的?是否有任何最佳实践文档或建议?

I have website I want to create SEO tags for in Umbraco. I was wondering how it is done? are there any best practice documents or advice?

推荐答案

您需要为每个文档中的那些项目拥有属性,这些项目应该有它们并且将被显示/索引等.您可以通过以下几种方式实现目标:

You need to have properties for those items inside each document which should have them and will be displayed / indexed etc. You can achieve the goal with couple ways:

  1. 您可以创建一个包含所有必需属性(SeoTitleSeoDescriptionSeoKeywords 以及任何您想要的更多属性的小型合成文档类型)) 并将其附加到您的文档类型(甚至可能是用于在您的网站上呈现和索引的所有网页的某些主文档类型).然后,您可以创建局部视图或在主模板上呈现其中的值.在我看来,这种方式可以让您最好地控制那里的内容,我们正在为我们所有的项目都这样做(只需导入导出的组合文档类型并将其附加到特定解决方案中的所需项目).

  1. You can create a small composition document type with all required properties (SeoTitle, SeoDescription, SeoKeywords and whatever you want more) and attach it to your document types (maybe even some master document type used for all webpages rendered and indexed across your site). Then you can create a partial view or render the values from it on the master template. In my opinion this way is giving you the best control over what's there and we're doing it for all of our projects (just importing exported composition doctype and attaching it to desired items in specific solution).

你可以使用一个包,例如https://our.umbraco.org/projects/backoffice-extensions/seo-metadata-for-umbraco/ 以稍微不同的方式做完全相同的事情,使您可以从 CurrentPage 对象中检索这些属性.您可以在此处阅读有关该软件包的更多信息:https://ryanl.me/2015/04/13/seo-metadata-for-umbraco/.

You can use a package e.g. https://our.umbraco.org/projects/backoffice-extensions/seo-metadata-for-umbraco/ which is doing exactly the same thing in a little bit different way, gives you the possibility to retrieve those properties from CurrentPage object. You can read more about the package here: https://ryanl.me/2015/04/13/seo-metadata-for-umbraco/.

这篇关于Umbraco 7 SEO 标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆