summaryrefslogtreecommitdiff
path: root/sitemap.buetow.org/content
diff options
context:
space:
mode:
Diffstat (limited to 'sitemap.buetow.org/content')
-rw-r--r--sitemap.buetow.org/content/home.xml21
-rw-r--r--sitemap.buetow.org/content/sitemap.inc.pl33
2 files changed, 54 insertions, 0 deletions
diff --git a/sitemap.buetow.org/content/home.xml b/sitemap.buetow.org/content/home.xml
new file mode 100644
index 0000000..a6d72ad
--- /dev/null
+++ b/sitemap.buetow.org/content/home.xml
@@ -0,0 +1,21 @@
+<?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="https://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.</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 () { "&nbsp;" 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;