Changes between Version 12 and Version 13 of AddHeadersPlugin


Ignore:
Timestamp:
Feb 8, 2011, 5:31:30 PM (13 years ago)
Author:
Martin Scharrer
Comment:

Added description of meta tags.

Legend:

Unmodified
Added
Removed
Modified
  • AddHeadersPlugin

    v12 v13  
    44== Description ==
    55
    6 This plug-in allows Trac 0.11 server admins to add `script` and `link` headers into all trac pages without having to create a Chrome template file.
     6This plug-in allows Trac 0.11/0.12 server admins to add `script`, `link` and `meta` headers into all trac pages without having to create a Chrome template file.
    77This allows the easy usage of own !JavaScript and CSS files. Also all other kinds of `link` headers can be added.
    88
     
    2525 `default_style_base = `''<path relative to base URL>'' (default: `default_base`):: To provide an different default path for style files.
    2626
     27 `default_meta_lang = `''default language>'' (default: None):: Default language for meta tags (i.e. `lang` and `xml:lang` attributes)
     28
    2729 `add_scripts = `''<name1>''`,`''<name2>''`,``...`:: Will add `script` tags for all given names. The mime-type and filename can be defined by:
    2830   * ''<name>''`.mimetype = `''<MIME-type>'' (default: '`text/javascript`')
     
    3739   * ''<name>''`.rel = `''<Relation of the link>''
    3840   * ''<name>''`.href = `''<Relative URL of the link>''
    39   [[BR]]The following settings are obtional:
     41  [[BR]]The following settings are optional:
    4042   * ''<name>''`.title = `''<Link title>''
    4143   * ''<name>''`.type = `''<MIME-type of linked content>''
    4244   * ''<name>''`.class = `''<(CSS?) class of link>''
     45
     46 `add_meta = `''<name1>''`,`''<name2>''`,``...`:: Will add [http://en.wikipedia.org/wiki/Meta_element `meta` tags] for all given names. There exists no default setting.[[BR]]
     47  [[BR]]One and only one of the following settings must be given:
     48   * ''<name>''`.http_equiv = `''<equivalent HTTP header>''
     49   * ''<name>''`.name = `''<name of meta tag>''
     50   * ''<name>''`.scheme = `''<scheme>''
     51  [[BR]]The content is set using:
     52   * ''<name>''`.content = `''<content of meta tag>''
     53  [[BR]]Optionally the language can be set using:
     54   * ''<name>''`.lang = `''<language of meta tag>''
    4355
    4456
     
    92104style2.title = theme2
    93105style2.href  = /chrome/site/theme2.css
     106
     107add_metas = keywords conttype
     108keywords.content = "Trac Wiki page"
     109
     110conttype.name = Content-Type
     111conttype.content = text/html
    94112}}}
    95113
    96 This will result in the following added headers:
     114This will result in the following added headers (not necessary in that order):
    97115{{{
    98 <link title="default" type="text/css" href="/chrome/site/style.css" rel="stylesheet">
     116<link title="default" type="text/css" href="/chrome/site/style.css" rel="stylesheet" />
    99117<link title="theme1" type="text/css" href="/chrome/site/theme1.css" rel="alternate stylesheet"/>
    100118<link title="theme2" type="text/css" href="/chrome/site/theme2.css" rel="alternate stylesheet"/>
     119<meta http-equiv="keywords" content="Trac Wiki page" />
     120<meta http-equiv="Content-Type" content="text/html" />
    101121}}}
    102122