Changes between Version 21 and Version 22 of AddHeadersPlugin


Ignore:
Timestamp:
Jan 17, 2016, 3:45:52 PM (8 years ago)
Author:
figaro
Comment:

Cosmetic changes

Legend:

Unmodified
Added
Removed
Modified
  • AddHeadersPlugin

    v21 v22  
    2828== Installation
    2929
    30 Install as normal and enable this plugin by adding the following into your `trac.ini` file, normally found at `../conf/trac.ini`:
     30General instructions on installing Trac plugins can be found on the [TracPlugins#InstallingaTracplugin TracPlugins] page.
     31
     32Enable this plugin by adding the following into your `trac.ini` file, normally found at `../conf/trac.ini`:
    3133{{{#!ini
    3234[components]
     
    6567   * ''<name>''`.class = `''<(CSS?) class of link>''
    6668
    67  `add_meta = `''<name1>''`,`''<name2>''`,``...`:: Will add [http://en.wikipedia.org/wiki/Meta_element `meta` tags] for all given names. There is no default setting.[[BR]]
     69 `add_meta = `''<name1>''`,`''<name2>''`,``...`:: Will add [wikipedia:Meta_element `meta` tags] for all given names. There is no default setting.[[BR]]
    6870  [[BR]]One and only one of the following settings must be given:
    6971   * ''<name>''`.http_equiv = `''<equivalent HTTP header>''
     
    7577   * ''<name>''`.lang = `''<language of meta tag>''
    7678
    77 See also the [#Examples example] below.
     79See also the [#Examples examples] below.
    7880
    7981== Examples
     
    8183=== Multi-Style
    8284
    83 The following example shows how to add files for a multi-style implementation, ie the user can select between different graphics styles:
     85The following example shows how to add files for a multi-style implementation, so that the user can select between different graphics styles:
    8486The !JavaScript file is located at `$TRAC_PROJECT_DIR/htdocs/js/multistyle.js` and all CSS files are located at `$TRAC_PROJECT_DIR/htdocs/css/`.
    85 A general style file `common.css` is included which holds all common style definition. The default style is in `default.css` and the alternative styles in `theme1.css` and `theme2.css`.
     87A general style file `common.css` is included, which holds all common style definition. The default style is in `default.css` and the alternative styles in `theme1.css` and `theme2.css`.
    8688
    8789Note that general CSS files are added using `add_styles`, while the others are using `add_links`. This has HTML and Trac API related reasons.
     
    121123{{{#!html
    122124<link title="default" type="text/css" href="/chrome/site/style.css" rel="stylesheet" />
    123 <link title="theme1" type="text/css" href="/chrome/site/theme1.css" rel="alternate stylesheet"/>
    124 <link title="theme2" type="text/css" href="/chrome/site/theme2.css" rel="alternate stylesheet"/>
     125<link title="theme1" type="text/css" href="/chrome/site/theme1.css" rel="alternate stylesheet" />
     126<link title="theme2" type="text/css" href="/chrome/site/theme2.css" rel="alternate stylesheet" />
    125127<meta http-equiv="keywords" content="Trac Wiki page" />
    126128<meta http-equiv="Content-Type" content="text/html" />
     
    134136# in trac.ini
    135137[addheaders]
    136 default_style_base  = site/css/
     138default_style_base = site/css/
    137139default_script_base = site/js/
    138140
    139 add_scripts  = abc_one,abc_two,abc_tree
    140 add_styles   = style_print,style_screen
     141add_scripts = abc_one,abc_two,abc_tree
     142add_styles = style_print,style_screen
    141143}}}
    142144
     
    146148# in trac.ini
    147149[addheaders]
    148 default_style_base  = site/css/abc_
     150default_style_base = site/css/abc_
    149151default_script_base = site/js/style_
    150152
    151 add_scripts  = one,two,tree
    152 add_styles   = print,screen
     153add_scripts = one,two,tree
     154add_styles = print,screen
    153155}}}
    154156
     
    161163[addheaders]
    162164
    163 add_scripts  = short
     165add_scripts = short
    164166
    165167short.filename = /site/somewhere/Very,weird,filename @;'öäßÖÄß¼€.js
     
    173175=== General `link` tag
    174176
    175 The `link` tags are used to define ''relations'' between the page and other pages, e.g. 'My startpage is at ..., the next page is at ...'. Trac itself adds a couple of link tags for `help`, `up`, `prev`, etc. for some pages.
     177The `link` tags are used to define ''relations'' between the page and other pages, for example 'My startpage is at ..., the next page is at ...'. Trac itself adds a couple of link tags for `help`, `up`, `prev`, etc. for some pages.
    176178
    177179The following example would add a linked copyright notice (written in plain text) and a shortcut icon to every Trac page. Note that the information is not displayed by default to the user in any way and most browsers are ignoring link tags which aren't used for style sheets or shortcut icons.