initial commit
This commit is contained in:
commit
5b839e0543
174 changed files with 12261 additions and 0 deletions
14
werc/bin/aux/gensitemaptxt.rc
Executable file
14
werc/bin/aux/gensitemaptxt.rc
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/rc
|
||||
# DEPRECATED: sitemap.tpl now generates and updates a sitemap.txt when requested, and is also more smart than this simplistic script.
|
||||
|
||||
for(d in sites/*/) {
|
||||
echo $d
|
||||
9 du -a $d | awk '/\.(md|html)$/ { print $2 }; {}' | 9 sed -e 's/\.(md|html)$//' -e 's,/index$,/,' -e 's,^sites/,http://,' > $d/sitemap.txt
|
||||
|
||||
if(! test -f $d/robots.txt) {
|
||||
echo generating missing robots.txt for $d
|
||||
echo $d|sed 's,sites/,Sitemap: http://,; s/$/sitemap.txt/;' > $d/robots.txt
|
||||
cat $d/robots.txt
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue