Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r75660 - website/public_html/beta
From: dnljms_at_[hidden]
Date: 2011-11-25 03:22:12


Author: danieljames
Date: 2011-11-25 03:22:11 EST (Fri, 25 Nov 2011)
New Revision: 75660
URL: http://svn.boost.org/trac/boost/changeset/75660

Log:
Website: Crude sitemap to point to documentation.
Added:
   website/public_html/beta/sitemap.xml.php (contents, props changed)
Text files modified:
   website/public_html/beta/robots.txt | 1 +
   1 files changed, 1 insertions(+), 0 deletions(-)

Modified: website/public_html/beta/robots.txt
==============================================================================
--- website/public_html/beta/robots.txt (original)
+++ website/public_html/beta/robots.txt 2011-11-25 03:22:11 EST (Fri, 25 Nov 2011)
@@ -1,3 +1,4 @@
 User-agent: *
 Disallow: /development # Hide huge zip files
 Crawl-delay: 10
+Sitemap: http://www.boost.org/sitemap.xml.php

Added: website/public_html/beta/sitemap.xml.php
==============================================================================
--- (empty file)
+++ website/public_html/beta/sitemap.xml.php 2011-11-25 03:22:11 EST (Fri, 25 Nov 2011)
@@ -0,0 +1,35 @@
+<?php
+ header('Content-Type: application/xml');
+ echo '<?xml version="1.0" encoding="UTF-8"?>', "\n";
+ define('USE_SERIALIZED_INFO', true);
+ require_once(dirname(__FILE__) . '/common/code/boost_libraries.php');
+?>
+<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
+<?php
+
+function xmlentities($text) {
+ return str_replace(
+ array('&', '<', '>', '"', "'"),
+ array('&amp;', '&lt;', '&gt;', '&quot;', '&apos;'),
+ $text);
+}
+
+$libs = USE_SERIALIZED_INFO ?
+ unserialize(file_get_contents(dirname(__FILE__) . '/doc/libraries.txt')) :
+ new boost_libraries(dirname(__FILE__) . '/doc/libraries.xml');
+
+$base_url = "http://$_SERVER[HTTP_HOST]/doc/libs/release";
+
+foreach ($libs->get() as $lib) {
+ $loc_xml = xmlentities($lib['documentation']);
+ echo <<<EOL
+<url>
+<loc>$base_url/$loc_xml</loc>
+<priority>1.0</priority>
+</url>
+
+EOL;
+}
+
+?>
+</urlset>
\ No newline at end of file


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk