00624: multiple (:keywords

:)

Summary: multiple (:keywords:)
Created: 2005-12-19 08:14
Status: Closed - cookbook
Category: Feature
From: Blues
Assigned:
Priority: 5
Version: 2.1.beta9
OS: all

Description: multiple (:keywords:) directives in the pages will generate multiple <meta name='keywords' ... in the HTML.

all the listed keywords should be collected and added as a single HTML meta tag.

this will be particularly useful for example when there is one (:keywords:) in the group header containing keywords which are general to all the group, and an additional (:keywords:) on a particular page being more specific.


Why does it need to be a single HTML meta tag?

-- Pm


i checked on the w3.org, it seems that HTML specifications supports multiple meta tags with same name. this is necessary for example if we want to put keywords (or author, or copyright, etc) in different languages adding a lang attribute)...
though in some sources i found that if multiple meta with same name are found (and they don't have a language spec) they can be just ignored by search engines or even treated as a spamming technique.

Blues December 29, 2005, at 04:32 AM


Since multiple meta tags are valid in HTML, I think PmWiki's current implementation is the one we'll go with for now, as it more accurately describes what authors write.

However, combining the keywords into a single meta tag can be done as a local customization or cookbook recipe, so I think I'll leave it to that.

Pm


I am trying to do a cookbook recipe for this but in the stdmarkup.php file there is a line

 HTMLHeaderFmt['meta'] = 'function:PrintMetaTags';

which does not use the SDV() or SDVA() function to assign a default value, so I cannot override it with my own function... how can I do it?
Maybe you have to change it to use SDV or there is another way?

Blues January 23, 2006, at 09:14 AM


See the new cookbook recipe Cookbook.MergeMetaTags.

Blues February 01, 2006, at 03:59 AM