no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | tech:others:dokuwiki_sitemap [2014/11/15 15:13] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Dokuwiki sitemap ====== | ||
+ | Dokuwiki has a sitemap button which is convenient, but not search engine friendly. | ||
+ | |||
+ | <code php> | ||
+ | # | ||
+ | <?php | ||
+ | // | ||
+ | // Call from shell by passing output of find command to wiki path | ||
+ | // Example: If wikipath is / | ||
+ | // MAINWIKIPATH=/ | ||
+ | // Usage: find $MAINWIKIPATH | cut -d"/" | ||
+ | // The sort is important so it can group and title the pages correctly | ||
+ | // | ||
+ | $f = fopen( ' | ||
+ | $replaceo = 1; | ||
+ | |||
+ | while( $line = fgets( $f ) ) | ||
+ | { | ||
+ | $nocrline = str_replace(" | ||
+ | //$fline = preg_replace("/ | ||
+ | $fline = $nocrline; | ||
+ | $pos = strpos($line, | ||
+ | if ($pos === false) | ||
+ | { | ||
+ | echo " | ||
+ | } | ||
+ | else | ||
+ | { | ||
+ | $lline = preg_replace("/ | ||
+ | // This line to replace / with : may not be required if wiki is configured to use clean URLs | ||
+ | $lline = preg_replace("/ | ||
+ | echo " | ||
+ | } | ||
+ | } | ||
+ | |||
+ | fclose( $f ); | ||
+ | ?> | ||
+ | </ | ||