What is SiteMap ?
SiteMap is a program to generate a map of your site plus
navigation banners on each html page (header and footer) as you
see on this site. It aims to provide clarity and freedom of movement for
the visitors to your site.
The value of SiteMap is that it will
update all navigation banners and the site map itself each time you run it
- presumably each time you edit, add or delete pages on your site. This
will give you peace of mind over two common webmaster's
troubles : visitors annoyed with dangling links
and worst - pages that can't be reached.
SiteMap
does not conflict with your choice of html page design tool nor does it
have any impact on the user's choice of web browser. You can run it first
off to generate the skeleton of a new site (directory tree and templates
for each html page) and you can run it again after editing your html code.
Graphic Answer has chosen to place this utility in the
public domain as our modest contribution to the wealth of
software freely available on the internet.
The banners comprise
the name of your site and links for Home, Map, Prev, Next and Email. The
map is automatically generated with the correct indentation from a script
file you supply. SiteMap is free and runs both on Linux and Win32.
Check out
another reference site using SiteMap
Download SiteMap
The source code in Perl can be downloaded
here.
The source code in C++ can be downloaded
here.
For installation on Win32create a new
console application project, compile and run or just download this ready
made executable sitemap.exe
For Linux strip the /r/n end of line pairs with a
command such as :
tr -d '\015' < sourcefile > sitemap.cpp
Then compile with :
g++ -DLINUX -o sitemap sitemap.cpp
Running SiteMap
This is how you tell SiteMap what to do. Don't worry about typing all
what you see below - the program will generate this sample script if you
run it with no arguments. Later use a spreadsheet program to edit the
script as some editors are notorious to replace tabs with spaces which
will confuse SiteMap. (Use the option save as Text with Tabs).
# Sitemap.txt demo script file |
#comments start with a # |
#each row has 6 numbers and 2 text fields
delimited by tabs |
#the first row is a dummy to store your
comapny name and email address |
0 |
1 |
1 |
1 |
1 |
1 |
© My Company |
myemail@mysite.com.au |
#the second row is an entry for the sitemap
page itself |
1 |
1 |
1 |
1 |
1 |
1 |
/sitemap.html |
Site Map |
#then come the rows to describe each html
page in respective order |
#the first column is the outline identation
starting at one |
#2nd column =1 to see a home link |
#3rd column =1 to see a map link |
#4th column =1 to see a previous link |
#5th column =1 to see a next link |
#6th column =1 to see a email link |
#7th column =path to the html page relative
to path of this file |
#8th column =title tag of html page |
1 |
1 |
1 |
1 |
1 |
1 |
/index.html |
Homepage |
2 |
1 |
1 |
1 |
1 |
1 |
/background.html |
About us |
1 |
1 |
1 |
1 |
1 |
1 |
/groupa/groupa.html |
Group A |
2 |
1 |
1 |
1 |
1 |
1 |
/groupa/groupa1.html |
Group A Item 1 |
2 |
1 |
1 |
1 |
1 |
1 |
/groupa/groupa2.html |
Group A Item 2 |
3 |
1 |
1 |
1 |
1 |
1 |
/groupa/groupa2a.html |
Group A Item 2.a |
3 |
1 |
1 |
1 |
1 |
1 |
/groupa/groupa2b.html |
Group A Item 2.b |
1 |
1 |
1 |
1 |
1 |
1 |
/groupb/groupb.html |
Group B |
2 |
1 |
1 |
1 |
1 |
1 |
/groupb/groupb1.html |
Group B Item 1 |
2 |
1 |
1 |
1 |
1 |
1 |
/groupb/groupb2.html |
Group B Item 2 |
3 |
1 |
1 |
1 |
1 |
1 |
/groupb/groupb2a.html |
Group B Item 2.a |
3 |
1 |
1 |
1 |
1 |
1 |
/groupb/groupb2b.html |
Group B Item 2.b |
#Sometimes you want to stamp pages not to
be included in the map |
#Put 0 for indentation |
#add |real/path to the url if sitemap can't
guess the path from it |
0 |
1 |
1 |
0 |
1 |
1 |
/cgi/ok.html|/ok.html |
Order Processed |
You can start from scratch and have SiteMap generate templates for each
html file you define in your script or you can have SiteMap stamp
navigation banners on existing html pages. Running SiteMap without any
command line arguments will generate a sample script file as per the table
below and the html templates to match. Directories can be generated
recursively as long as each parent is defined before its children in the
order of the script. |