diff options
Diffstat (limited to 'sitemap.buetow.org')
| -rw-r--r-- | sitemap.buetow.org/SITEMAP | 0 | ||||
| -rw-r--r-- | sitemap.buetow.org/content/home.xml | 25 | ||||
| -rw-r--r-- | sitemap.buetow.org/content/sitemap.inc.pl | 33 |
3 files changed, 58 insertions, 0 deletions
diff --git a/sitemap.buetow.org/SITEMAP b/sitemap.buetow.org/SITEMAP new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/sitemap.buetow.org/SITEMAP diff --git a/sitemap.buetow.org/content/home.xml b/sitemap.buetow.org/content/home.xml new file mode 100644 index 0000000..84784e6 --- /dev/null +++ b/sitemap.buetow.org/content/home.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?> +<content> + <pagetitle>Sitemap</pagetitle> + <textheader>All sites hosted</textheader> + <text> + <noop>Here are all sites hosted within this instance of </noop> + <namedlink href="http://xerl.buetow.org">Xerl</namedlink> + <noop>.</noop> + </text> + <important> + <text> + <strong>Important notice:</strong> + <noop>The host </noop> + <strong>.alpha.buetow.org</strong> + <noop>contains only development, test and PoC stuff. Replace </noop> + <strong>$shomething.alpha.buetow.org</strong> + <noop> with </noop> + <strong>$something.buetow.org</strong> + <noop> (if exists) to get the stable stuff.</noop> + </text> + </important> + <text> + <includerun>sitemap.inc.pl</includerun> + </text> +</content> diff --git a/sitemap.buetow.org/content/sitemap.inc.pl b/sitemap.buetow.org/content/sitemap.inc.pl new file mode 100644 index 0000000..6b08b82 --- /dev/null +++ b/sitemap.buetow.org/content/sitemap.inc.pl @@ -0,0 +1,33 @@ +my $hostroot = $config->get_hostroot(); + +sub space () { " " x 10 } +sub nl () { "<br />\n" } + +sub list (*) { + my $tag = shift; + my @homepages = sort `find $hostroot -name $tag`; + my @ret = (); + + for my $homepage (sort @homepages) { + my ($host) = $homepage =~ /.*hosts.(.*?).$tag/; + push @ret, "<b><a href='http://$host'>$host</a></b>", nl; + + my $sitepath = "$hostroot/$host"; + + my @pages = sort `find $sitepath -name \*.xml`; + for my $page (sort @pages) { + my ($site) = $page =~ m#$host/content/(.*)\.xml$#; + $site =~ s#\.sub/#/#g; + $site =~ s#\d\d\.##g; + next if $site eq 'home'; + my $sitelink = "http://$host?site=$site"; + push @ret, space, "<a href='$sitelink'>$site</a>", nl; + } + + push @ret, nl; + } + + join '', @ret; +} + +list SITEMAP; |
