[pmwiki-users] add meta tags to html - how to?

Tegan Dowling tmdowling at gmail.com
Fri Aug 25 09:01:16 CDT 2006


bump

On 8/16/06, Tegan Dowling <tmdowling at gmail.com> wrote:
> On 8/16/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> > On Wed, Aug 16, 2006 at 11:27:06AM +0200, Moni Kellermann wrote:
> > > Hi everybody,
> > >
> > > how can I add some meta tags to all of the pages in a way that I can
> > > keep that code in case I upgrade?
> > >
> > > The standard pmwiki installation creates the header like this:
> > >
> > > <head>
> > > <title>PmWiki | Main / HomePage </title>
> > > <meta http-equiv='Content-Style-Type' content='text/css' />
> > > <link rel='stylesheet' href='..../pub/skins/pmwiki/pmwiki.css'
> > > type='text/css' />
> > > <!--HeaderText--><style type='text/css'>
> > >   [...]
> > > </style>
> > > <meta name='robots' content='index,follow' />
> > > </head>
> > >
> > > So, where can I add keywords and description and other stuff?
> >
> > If you want to add keywords or descriptions to individual
> > pages, you can just use the (:keywords:) and (:description:)
> > markups.
> >
> > Similarly, if you want to add keywords or a description
> > for an entire wikigroup, then place (:keywords:) or
> > (:description:) statements into the GroupHeader for the
> > group.
> >
> > If you want to add meta tags for the entire site, then
> > use the $HTMLHeaderFmt array:
> >
> >     $HTMLHeaderFmt[] = "<meta name='keywords' content='special' />";
>
> This topic needs more documentation.  I'm pretty sure I'm not the
> person to provide it, though:
>
> That $HTMLHeaderFmt[] goes in config.php, right?
>
> Can $HTMLHeaderFmt[] be populated from within the wiki?  Maybe by
> setting something like $HTMLHeaderFmt[] = "<meta name='keywords'
> content=$ScriptUrl/Site/Keywords/>";
> where the page Site/Keywords contains (:keywords word1,word2, etc:)
> for the site?
>
> Then (independent of the answers to my first two questions), to set
> the site's description, I'm guessing you don't just add a second line
> that begins, "$HTMLHeaderFmt[]" - instead, you need to use some array
> syntax?  If so, what would that look like?
>
> I just searched PmWiki.org for "$HTMLHeaderFmt[]" and find it
> introduced on http://www.pmwiki.org/wiki/PmWiki/LayoutVariables, which
> doesn't mention using it for keywords or desciption.  On the other
> hand, keywords and description are introduced here on
> http://www.pmwiki.org/wiki/PmWiki/PageDirectives, where there's no
> mention of $HTMLHeaderFmt.
>
> I'd like to understand this, and I hope my questions - coming from
> someone who obviously isn't well-versed in php or html - will be
> useful to someone who cares to supplement the documentation, as well.
>
> Many thanks!
>
> Tegan
>




More information about the pmwiki-users mailing list