[Moin-user] Specifying robot meta tags for selected pages

Thomas Waldmann tw-public at gmx.de
Tue Jul 13 03:55:04 EDT 2004


> In a wiki that I am setting up, I have changed the front page of the site 
> using page_front_page.
> 
> By default Moin outputs index,nofollow for all pages other than TitleIndex or 
> FrontPage. Now that I have changed the front page, how do I make moin 
> generate correct meta tags(index,follow) for this new frontpage?

Modify wikiutil.py, about line 894 to read:

# if it is a special page, index it and follow the links - we do it for
# the original, english pages as well as for (the possible modified)
# frontpage:
elif pagename in ['FrontPage', page_front_page, config.page_front_page,
                   page_title_index, ]:
     user_head += '''<meta name="robots" content="index,follow">\n'''

Of course, keep the original indenting of the wikiutil.py source at the 
same level.

This now catches "FrontPage" and whatever you set config.page_front_page 
  to - including a maybe existing translation for it (although I don't 
know if google uses something different than english for its requests).

Similar thing for title index, but only one version (as this should 
contain only one and the same macro anyway).

Hope this helps, this will be also in moin 1.2.3.





More information about the Moin-user mailing list