File:  [NetBSD Developer Wiki] / wikisrc / templates / man.mdwn
Revision 1.19: download - view: text, annotated - select for diffs
Wed May 20 06:17:25 2015 UTC (5 years, 11 months ago) by snj
Branches: MAIN
CVS tags: HEAD
per a hint from mlelstv, use templatebody to get rid of the linefeed
that was being inserted after generated man page links.

    1: [[!templatebody  <<ENDBODY
    2: [<TMPL_VAR NAME="name"><TMPL_IF NAME="section">(<TMPL_VAR NAME="section">)</TMPL_IF>](http://netbsd.gw.com/cgi-bin/man-cgi?<TMPL_VAR ESCAPE=URL NAME="name">+<TMPL_IF NAME="section"><TMPL_VAR ESCAPE=URL NAME="section"></TMPL_IF><TMPL_IF NAME="arch">.<TMPL_VAR ESCAPE=URL NAME="arch"></TMPL_IF>+<TMPL_VAR ESCAPE=URL NAME="collection" DEFAULT="NetBSD-current">)<TMPL_UNLESS name>
    3: ## Description
    4: 
    5: Use this template to create a man page link. The template can use four parameters:
    6: 
    7: * `name` - This required parameter is the name of the manpage.
    8: * `section` - This recommended parameter is the manpage section.
    9: * `arch` - This optional parameter is the machine architecture.
   10: * `collection` - This optional parameter refers to the NetBSD version and defaults to "NetBSD-current".
   11: 
   12: ## Examples
   13: 
   14: Link to [[!template id=man name="ls"]] man page:
   15: 
   16:         \[[!template id=man name="ls"]]
   17: 
   18: Link to [[!template id=man name="ls" section="1"]] man page, with section:
   19: 
   20:         \[[!template id=man name="ls" section="1"]]
   21: 
   22: Link to [[!template id=man name="ls" section="1" arch="i386"]] man page, specifying section and architecture:
   23: 
   24:         \[[!template id=man name="ls" section="1" arch="i386"]]
   25: 
   26: Link to [[!template id=man name="ls" section="1" arch="i386" collection="NetBSD-5.0"]] man page, specifying section, architecture and collection:
   27: 
   28:         \[[!template id=man name="ls" section="1" arch="i386" collection="NetBSD-5.0"]]
   29: </TMPL_UNLESS>
   30: ENDBODY]]

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb