@@ -28,6 +28,24 @@ class Options:
2828 uplink = "index.html"
2929 uptitle = "Python Documentation Index"
3030
31+ # The "Aesop Meta Tag" is poorly described, and may only be used
32+ # by the Aesop search engine (www.aesop.com), but doesn't hurt.
33+ #
34+ # There are a number of values this may take to roughly categorize
35+ # a page. A page should be marked according to its primary
36+ # category. Known values are:
37+ # 'personal' -- personal-info
38+ # 'information' -- information
39+ # 'interactive' -- interactive media
40+ # 'multimedia' -- multimedia presenetation (non-sales)
41+ # 'sales' -- sales material
42+ # 'links' -- links to other information pages
43+ #
44+ # Setting the aesop_type value to one of these strings will cause
45+ # get_header() to add the appropriate <meta> tag to the <head>.
46+ #
47+ aesop_type = None
48+
3149 def __init__ (self ):
3250 self .args = []
3351 self .variables = {"address" : "" ,
@@ -96,6 +114,12 @@ def get_header(self):
96114 link = '<link rel="up" href="%s">' % self .uplink
97115 repl = " %s\n </head>" % link
98116 s = s .replace ("</head>" , repl , 1 )
117+ if self .aesop_type :
118+ meta = '\n <meta name="aesop" content="%s">'
119+ # Insert this in the middle of the head that's been
120+ # generated so far, keeping <meta> and <link> elements in
121+ # neat groups:
122+ s = s .replace ("<link " , meta + "<link " , 1 )
99123 return s
100124
101125 def get_footer (self ):
0 commit comments