CouchCMS Meta tags added from blog content

293 Views Asked by At

I need a way of adding the article content from the blog as also the meta description of the page. I have tried :

<meta name="description" content="<cms:excerptHTML count='40' ignore='img'><cms:show blog_content /></cms:excerptHTML>" />

...but what this will do is simply place the blog content above my website and not as the meta description...

1

There are 1 best solutions below

1
Illya Moskvin On

It sounds like you might be placing the <meta> tag in the <body> of the page, rather than in the <head>. Additionally, I recommend that you use the excerpt tag rather than excerptHTML. This will remove <p> and other tags, which you don't really want in your meta description. In this case, you won't need to include ignore='img' in your code.

If you place the following between the <head></head> tags in your page, it should work:

<meta name="description" content="<cms:excerpt count='40'><cms:show blog_content /></cms:excerpt>" />