aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/man.cgi.3
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-03-15 13:18:53 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-03-15 13:18:53 +0000
commitf88b6897fb2359e45d69b78cf233849c6e5552da (patch)
treed258ff4402c0c32210291922ab2fa62ac8d3d71d /man.cgi.3
parent4765dc18ce4546a42d3aa2ce149a3c3fb4d79b00 (diff)
downloadmandoc-f88b6897fb2359e45d69b78cf233849c6e5552da.tar.gz
mandoc-f88b6897fb2359e45d69b78cf233849c6e5552da.tar.zst
mandoc-f88b6897fb2359e45d69b78cf233849c6e5552da.zip
Mention the manual page name and section in the HTML page <title>.
Based on a patch from <Anton dot Lindqvist at gmail dot com>, but simplified and also covering apropos(1) search results.
Diffstat (limited to 'man.cgi.3')
-rw-r--r--man.cgi.311
1 files changed, 8 insertions, 3 deletions
diff --git a/man.cgi.3 b/man.cgi.3
index 472d4119..e83248cc 100644
--- a/man.cgi.3
+++ b/man.cgi.3
@@ -1,6 +1,6 @@
-.\" $Id: man.cgi.3,v 1.3 2017/03/15 10:17:29 schwarze Exp $
+.\" $Id: man.cgi.3,v 1.4 2017/03/15 13:18:53 schwarze Exp $
.\"
-.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
+.\" Copyright (c) 2016, 2017 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
@@ -237,13 +237,18 @@ and
are used.
The highest level result generators are:
.Bl -tag -width 1n
-.It Ft void Fn resp_begin_html "int code" "const char *msg"
+.It Ft void Fn resp_begin_html "int code" "const char *msg" "const char *file"
This generator calls
.Fn resp_begin_http
to print the HTTP headers, then prints the HTML header up to the
opening tag of the <body> element, then copies the file
.Pa header.html
to the output, if it exists and is readable.
+If
+.Fa file
+is not
+.Dv NULL ,
+it is used for the <title> element.
.It Ft void Fn resp_searchform "const struct req *req" "enum focus focus"
This generator prints a search form, filling it with data
from the provided request object.