Changes between Version 5 and Version 6 of AddHeadersPlugin


Ignore:
Timestamp:
Nov 1, 2008, 2:36:13 PM (15 years ago)
Author:
Martin Scharrer
Comment:

Added general link tag example.

Legend:

Unmodified
Added
Removed
Modified
  • AddHeadersPlugin

    v5 v6  
    143143}}}
    144144
     145=== General `link` tag ===
     146The `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.
     147
     148The following example would add a linked copyright notice (written  plain text) and a shortcut icon to every Trac page. Please 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 an shortcut icons.
     149
     150{{{
     151# in trac.ini
     152[addheaders]
     153add_links    = cpyrght,icon
     154
     155cpyrght.rel   = copyright
     156cpyrght.type  = text/plain
     157cpyrght.title = Copyright notice
     158cpyrght.href  = /chrome/site/copyright.txt
     159
     160icon.rel  = shortcut icon
     161icon.type = image/x-icon
     162icon.href = /chrome/site/favicon.ico
     163}}}
     164
     165This will result in the following added header:
     166{{{
     167<link title="Copyright notice" type="text/plain" href="/chrome/site/copyright.txt" rel="copyright">
     168<link type="image/x-icon" href="/chrome/site/icon.ico" rel="shortcut icon">
     169}}}
    145170
    146171== Recent Changes ==