-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsitemap.1
159 lines (120 loc) · 7.82 KB
/
sitemap.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
.\"Generated by db2man.xsl. Don't modify this, modify the source.
.de Sh \" Subsection
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Ip \" List item
.br
.ie \\n(.$>=3 .ne \\$3
.el .ne 3
.IP "\\$1" \\$2
..
.TH "SITEMAP" 1 "" "" ""
.SH NAME
sitemap \- make a site map from meta tags in an HTML tree
.SH "SYNOPSIS"
.nf
\fBsitemap\fR [\fB\fIstart-dir\fR\fR | \fB\fIconfig-file\fR\fR]
.fi
.SH "DESCRIPTION"
.PP
\fBsitemap\fR indexes all pages under the start directory and writes an HTML map page to standard output. The code looks for description information for each page in a META DESCRIPTION header; if it doesn't find one, the page is omitted from the index. That is, HTML pages to be indexed should have a meta tag with its name attribute set to description and its content attribute set to a brief description ofthe contents. For example,
<head>
<title>Sitemap documentation</title>
<meta name="description"
content="Documentation for \fBsitemap\fR program to index HTML pages.">
</head>
.PP
The output of \fBsitemap\fR is an HTML page that contains a list of descriptions and links to the indexed pages. This output can be configured via an rc file (see below).
.SH "ARGUMENTS"
.PP
If no options are supplied, the start directory is the directory indicated by the DOCUMENT_ROOT or HOME environment variables, in that order. If neither variable is specified on a UNIX system, the effective user's home directory (as indicated in the passwd file) will be used. If a \fIstart-dir\fR directory is supplied as an argument, then that directory will be used as the start directory. In both of these cases, the configuration will be read from a file named .sitemaprc in the start directory. If the configuration file does not exist, \fBsitemap\fR will run with a set of default parameters, which is usually not what you want.
.PP
If a \fIconfig-file\fR configuration file is specified, then the configuration for \fBsitemap\fR will be read from that file. In this case, the start directory will be the directory containing the configuration file.
.SH "CONFIGURATION FILE"
.PP
\fBsitemap\fR is a Python script. To configure the strings used in the index page header and footer, you can create a configuration file in your home directory called .sitemaprc (or as indicated by the command-line parameter). A skeleton of a configuration file is provided with the program. The file should start with the text [sitemap] on a line by itself. Subsequent lines should be name=value pairs. Lines beginning with the # character are treated as comments and are ignored. The possible field names in the configuration file are listed below:
.TP
Hometitle=\fItitle\fR
The title of your homepage. The generated site map will contain a link with this text.
.TP
Homepage=\fIurl\fR
The URL of your homepage. The generated site map will contain a link back to this page.
.TP
Indextitle=\fItitle\fR
The title for the generated site map page.
.TP
Headinfo=\fIany Html Text\fR
Any additional HTML you want to include in the <head> section of the site map. Use with care - only certain tags are legal in the <head> of a page.
.TP
Body=\fIattributes\fR
Any additional attributes to be included in the <body> tag.
.TP
Prefix=\fIurl\fR
An optional URL prefix to put before each pathname. Normally, \fBsitemap\fR outputs each filename as a site-relative path beginning with a '/', in the assumption that the start-directory can be accessed with the URL '/'. (That is, the start directory would be the directory indciated by the web server's DOCUMENT_ROOT.) If this is incorrect (e.g. you are indexing a user's home page whose URL begins with '/~username') you can supply the alternative URL prefix here.
.TP
Dirtitle=\fItitle\fR
The title string to use for directories. Directories are listed and linked in the generated site map page with this text.
.TP
Fullname=\fIname\fR
Your full name. This name will be included in one corner of the generated site map page. You may want to list a company name or a copyright statement instead, for example.
.TP
Mailaddr=\fIaddress\fR
E-mail address of a contact person. Since the e-mail address will be linked on the generated site map page, you may want to set this parameter to the e-mail address of a contact person or a webmaster.
.TP
Language=\fIlanguage\fR
The language for the boilerplate text included in the output (Czech, English, French, German, Italian, Norwegian, Spanish, or Swedish).
.TP
Icondirs=\fIicon Path\fR
The path (relative to the start directory or a URL) of the icon for directories. The icon must be 33 pixels wide (or scaleable to that size). If omitted, no icon will be displayed next to site map entries for directories.
.TP
Icontext=\fIicon Path\fR
The path (relative to the start directory or a URL) of the icon for HTML files. The icon must be 33 pixels wide (or scaleable to that size). If omitted, no icon will be displayed next to site map entries for HTML pages.
.TP
Indexfiles=\fIfile1 File2 File3\fR
A space-separated list of files to treat as index or main pages for a directory. Any file with a filename exactly equal to one of the indicated filenames will be treated as an index page. Index pages sort to the top of the list of files in a directory. For example, index.html or default.htm might be good candidates for this parameter.
.TP
Exclude=\fIword1 Word2\fR
A space-separated list of words to ignore when scanning files and directories. \fBsitemap\fR will skip any file or entire subdirectories the contain any of the words in their path. For example, Test or CVS may be good candidates for this parameter.
.TP
processalso=\fIfile1 file2 file3\fR
A space-separated list of filenames, which will also be parsed by \fBsitemap\fR. Here you can put your PHP, or Perl Pages, which contains also a HTML header.
.TP
webdevelop=\fIy\fR
If set to y, the output will also display the "Keywords" and also the lenght of "Description" and "title". This is ideal while making some search engine optimisation.
.TP
ignoredirs=\fIy\fR
If set to y, there won't be any Directory Entry in the output. This is perfect, if you actually have in each directory an index-file, or if you don't want to have users browsing all directories in yout site tree.
.TP
Debug=\fIy\fR
Set this parameter to view the computed configuration file name, start directory, document root, and prefix in the generated site map page. You'll need to view the source of the generated HTML file because these values will be listed within and HTML comment. Search for the word Debugging in the generated HTML page.
.TP
preemble=\fI<div>\fR
Sets the element which will be placed just after <body>. This is an optional parameter for better controll of the layout.
.TP
postemble=\fI</div>\fR
Sets the element which will be placed just before </body>. This is an optional parameter for better controll of the layout.
.SH "USE UNDER CGI"
.PP
You can use \fBsitemap\fR to generate site maps on the fly. Any command-line argument can be passed as the query string (i.e. a string immediately following the URL of the CGI script and a '?' character).
.PP
\fBsitemap\fR will deduce that it is running under the CGI by virtue of the fact that the REMOTE_ADDR environment variable is defined. If so, it outputs a content-type header (text/html) ahead of the HTML page.
.PP
When running as a CGI script, \fBsitemap\fR does not assume that the document root is necessarily identical with the start directory. It inspects the DOCUMENT_ROOT environment variable and constructs a prefix in an attempt to get from the server document root to the start directory. This will fail if the start directory is not a subdirectory under the document root, in which case the prefix directive in the configuration file should be used.
.SH "AUTHORS"
.PP
Eric S. Raymond <[email protected]>.
.PP
Immo Huneke <[email protected]>.
.PP
Tom Bryan <[email protected]>.
.PP
Claudio Clemens <[email protected]>.