aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2011-11-29 16:23:27 +0000
committerIan Campbell <ian.campbell@citrix.com>2011-11-29 16:23:27 +0000
commit2b5171b2c43c2770bdcc6b98847d3b4facf8e0e6 (patch)
treef5395243c6a582422b794a2ddb115da0765157ba
parentec2c0a84c9ca9086c5230966d72d7f5569cb67d6 (diff)
downloadxen-2b5171b2c43c2770bdcc6b98847d3b4facf8e0e6.tar.gz
xen-2b5171b2c43c2770bdcc6b98847d3b4facf8e0e6.tar.bz2
xen-2b5171b2c43c2770bdcc6b98847d3b4facf8e0e6.zip
docs: improve index.html generation
Include hypercall documentation, fixing link generation for top level links to use the INDEX. Allow subsection links to be renamedi in the INDEX too. Strip .txt suffixes as well as .html ones by moving the regex to the right place instead of placing the literal text "(?:html|txt)" into the backlink to the top level page. (oops) Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
-rw-r--r--docs/INDEX8
-rw-r--r--docs/gen-html-index13
2 files changed, 13 insertions, 8 deletions
diff --git a/docs/INDEX b/docs/INDEX
index 3ed1e99d09..e238bcdc59 100644
--- a/docs/INDEX
+++ b/docs/INDEX
@@ -1,6 +1,10 @@
-misc/hvm-emulated-unplug Xen HVM emulated device unplug protocol
+hypercall/index Hypercall Interfaces
+
+man Man Pages
-misc/console.txt Xen PV Console notes
+misc Miscellaneous Documentation
+misc/hvm-emulated-unplug Xen HVM emulated device unplug protocol
+misc/console Xen PV Console notes
# These are not all that useful anymore, hide them from the index
reference/interface/index NO-INDEX
diff --git a/docs/gen-html-index b/docs/gen-html-index
index 06d7f62edb..0ce06601bd 100644
--- a/docs/gen-html-index
+++ b/docs/gen-html-index
@@ -45,7 +45,7 @@ sub make_page ($$$) {
}
else
{
- $h1 = "<a href=\"../index.(?:html|txt)\">Xen Documentation</a> - $title";
+ $h1 = "<a href=\"../index.html\">Xen Documentation</a> - $title";
$title = "Xen Documentation - $title";
}
$o .= <<END;
@@ -63,7 +63,7 @@ END
sub make_linktext ($) {
my ($l) = @_;
return "$1($2)" if $l =~ m,^man/(.*)\.([0-9].*)\.html,;
- $l =~ s/.(html)$//g;
+ $l =~ s/.(?:html|txt)$//g;
return $index{$l} if exists $index{$l};
return basename($l);
}
@@ -109,13 +109,14 @@ foreach my $od (sort { $a cmp $b } uniq map { dirname($_) } @docs) {
my @d = (grep /^\Q$od\E/, @docs);
if ( @d == 1 and $d[0] eq "$od/index.html" )
{
- $top .= "<li><a href=\"${od}/index.html\">${od}/index.html</a></li>\n";
+ $top .= make_link("$od/index.html", 0);
}
else
{
my $links = make_links($od,0,@d);
+ my $secttitle = make_linktext($od);
$top .= <<END;
-<li><a href=\"${od}/index.html\">$od</a></li>
+<li><a href=\"${od}/index.html\">$secttitle</a></li>
<ul>
$links
</ul>
@@ -124,12 +125,12 @@ END
$links = make_links($od,1,@d);
my $idx = '';
$idx .= <<END;
-<li>$od</li>
+<li>$secttitle</li>
<ul>
$links
</ul>
END
- make_page("$outdir/$od/index.html", $od, $idx);
+ make_page("$outdir/$od/index.html", $secttitle, $idx);
}
}