commit cedf13e6c646660087c5a7138761fe96d29a4811
parent 69378b1d76c386c1b1182c7c4bd21b1a88413bc3
Author: Matsuda Kenji <contact2655@matsudakenji.xyz>
Date: Tue, 14 Dec 2021 14:01:16 +0900
change index
Diffstat:
4 files changed, 37 insertions(+), 74 deletions(-)
diff --git a/bin/blog_update b/bin/blog_update
@@ -1,12 +1,14 @@
#!/bin/sh
cd $(dirname $0)/..
-tmp=man/blog/tmp
+man=$(pwd)/man
+pub=$(pwd)/pub
+tmp=$(pwd)/.tmp
#blog index
-grep "\<h1\>" man/blog/posts/*.html | sort -r | sed 's/^.*blog\///;s/:<h1>/ /;s/<\/h1>//' |
-awk '{print $1,$1,$2}' | sed 's/^[^ 0-9]*\([0-9]*\)[^ ]*/\1/' | awk 'BEGIN{print "<h1>日記</h1><ul>"}END{print "</ul>"}{printf "<li>[%s]<a href=\"%s\">%s</a></li>\n",$1,$2,$3}' > man/blog/blog_index.html
+grep "\<h1\>" $man/blog/posts/*.html | sort -r | sed 's/^.*blog\///;s/:<h1>/ /;s/<\/h1>//' |
+awk '{print $1,$1,$2}' | sed 's/^[^ 0-9]*\([0-9]*\)[^ ]*/\1/' | awk 'BEGIN{print "<h1>日記</h1><ul>"}END{print "</ul>"}{printf "<li>[%s]<a href=\"%s\">%s</a></li>\n",$1,$2,$3}' > $man/blog/blog_index.html
#index
-find man/blog/posts -name *.html | sort -r | head -n5 | xargs grep '<h1>' | sed 's/man\(.*\/\([0-9]*\)\.html\):<h1>\(.*\)<\/h1>/<li>[\2]<a href="\1">\3<\/a><\/li>/' > $tmp
-sed -i "/<\!--entries-->/,/<\!--\/entries-->/{/^<\!--/!d;};/<\!--entries-->/r $tmp" man/index.html
+find $man/blog/posts -name *.html | sort -r | head -n5 | xargs grep '<h1>' | sed 's/^.*man\(.*\/\([0-9]*\)\.html\):<h1>\(.*\)<\/h1>/<li>[\2]<a href="\1">\3<\/a><\/li>/' > $tmp
+sed -i "/<\!--entries-->/,/<\!--\/entries-->/{/^<\!--/!d;};/<\!--entries-->/r $tmp" $pub/index.html
rm $tmp
diff --git a/bin/update b/bin/update
@@ -26,7 +26,6 @@ list_files_to_replace(){
render_sitemap(){
echo '<?xml version="1.0" encoding="UTF-8"?>'
echo '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'
-
(cd $pub && find . -name '*.html' | xargs ls -lT ) |
awk '{print $9 "-" $6 "-" $7, $10}' |
sed 's/\(^....-\)Jan/\11/;s/\(^....-\)Feb/\12/;s/\(^....-\)Mar/\11/;
diff --git a/pub/.files b/pub/.files
@@ -1,40 +1,2 @@
-./blog/posts/20200719.html
-./blog/posts/20200723.html
-./blog/posts/20200725.html
-./blog/posts/20200727.html
-./blog/posts/20200801.html
-./blog/posts/20200802.html
-./blog/posts/20200804.html
-./blog/posts/20200808.html
-./blog/posts/20200917.html
-./blog/posts/20200918.html
-./blog/posts/20200919.html
-./blog/posts/20200925.html
-./blog/posts/20200926.html
-./blog/posts/20201003.html
-./blog/posts/20201201.html
-./blog/posts/20201202.html
-./blog/posts/20201209.html
-./blog/posts/20201210.html
-./blog/posts/20210106.html
-./blog/posts/20210806.html
-./blog/posts/20211129.html
./blog/blog_index.html
-./computer/archlinux_installation.html
-./computer/what-i-use.html
-./farm/journal/2021.html
-./misc/migration.html
-./error/404.html
-./plants/myrica_rubra.html
-./static/icon.jpeg
-./static/base.css
-./static/monacoin.png
-./static/monacoin_logo.png
-./static/btc_logo.png
-./static/btc.png
-./static/xcoin.png
-./static/xcoin_logo.png
-./static/favicon.ico
-./static/matsuda_kenji.txt
-./about.html
./index.html
diff --git a/pub/sitemap.xml b/pub/sitemap.xml
@@ -1,33 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
-<url><loc>https://www.matsudakenji.xyz/about.html</loc><lastmod>2021-12-13</lastmod></url>
-<url><loc>https://www.matsudakenji.xyz/blog/blog_index.html</loc><lastmod>2021-12-13</lastmod></url>
-<url><loc>https://www.matsudakenji.xyz/blog/posts/20200719.html</loc><lastmod>2021-12-13</lastmod></url>
-<url><loc>https://www.matsudakenji.xyz/blog/posts/20200723.html</loc><lastmod>2021-12-13</lastmod></url>
-<url><loc>https://www.matsudakenji.xyz/blog/posts/20200725.html</loc><lastmod>2021-12-13</lastmod></url>
-<url><loc>https://www.matsudakenji.xyz/blog/posts/20200727.html</loc><lastmod>2021-12-13</lastmod></url>
-<url><loc>https://www.matsudakenji.xyz/blog/posts/20200801.html</loc><lastmod>2021-12-13</lastmod></url>
-<url><loc>https://www.matsudakenji.xyz/blog/posts/20200802.html</loc><lastmod>2021-12-13</lastmod></url>
-<url><loc>https://www.matsudakenji.xyz/blog/posts/20200804.html</loc><lastmod>2021-12-13</lastmod></url>
-<url><loc>https://www.matsudakenji.xyz/blog/posts/20200808.html</loc><lastmod>2021-12-13</lastmod></url>
-<url><loc>https://www.matsudakenji.xyz/blog/posts/20200917.html</loc><lastmod>2021-12-13</lastmod></url>
-<url><loc>https://www.matsudakenji.xyz/blog/posts/20200918.html</loc><lastmod>2021-12-13</lastmod></url>
-<url><loc>https://www.matsudakenji.xyz/blog/posts/20200919.html</loc><lastmod>2021-12-13</lastmod></url>
-<url><loc>https://www.matsudakenji.xyz/blog/posts/20200925.html</loc><lastmod>2021-12-13</lastmod></url>
-<url><loc>https://www.matsudakenji.xyz/blog/posts/20200926.html</loc><lastmod>2021-12-13</lastmod></url>
-<url><loc>https://www.matsudakenji.xyz/blog/posts/20201003.html</loc><lastmod>2021-12-13</lastmod></url>
-<url><loc>https://www.matsudakenji.xyz/blog/posts/20201201.html</loc><lastmod>2021-12-13</lastmod></url>
-<url><loc>https://www.matsudakenji.xyz/blog/posts/20201202.html</loc><lastmod>2021-12-13</lastmod></url>
-<url><loc>https://www.matsudakenji.xyz/blog/posts/20201209.html</loc><lastmod>2021-12-13</lastmod></url>
-<url><loc>https://www.matsudakenji.xyz/blog/posts/20201210.html</loc><lastmod>2021-12-13</lastmod></url>
-<url><loc>https://www.matsudakenji.xyz/blog/posts/20210106.html</loc><lastmod>2021-12-13</lastmod></url>
-<url><loc>https://www.matsudakenji.xyz/blog/posts/20210806.html</loc><lastmod>2021-12-13</lastmod></url>
-<url><loc>https://www.matsudakenji.xyz/blog/posts/20211129.html</loc><lastmod>2021-12-13</lastmod></url>
-<url><loc>https://www.matsudakenji.xyz/computer/archlinux_installation.html</loc><lastmod>2021-12-13</lastmod></url>
-<url><loc>https://www.matsudakenji.xyz/computer/what-i-use.html</loc><lastmod>2021-12-13</lastmod></url>
-<url><loc>https://www.matsudakenji.xyz/error/404.html</loc><lastmod>2021-12-13</lastmod></url>
-<url><loc>https://www.matsudakenji.xyz/farm/journal/2021.html</loc><lastmod>2021-12-13</lastmod></url>
-<url><loc>https://www.matsudakenji.xyz/</loc><lastmod>2021-12-13</lastmod></url>
-<url><loc>https://www.matsudakenji.xyz/misc/migration.html</loc><lastmod>2021-12-13</lastmod></url>
-<url><loc>https://www.matsudakenji.xyz/plants/myrica_rubra.html</loc><lastmod>2021-12-13</lastmod></url>
+<url><loc>https://www.matsudakenji.xyz/about.html</loc><lastmod>2021-12-14</lastmod></url>
+<url><loc>https://www.matsudakenji.xyz/blog/blog_index.html</loc><lastmod>2021-12-14</lastmod></url>
+<url><loc>https://www.matsudakenji.xyz/blog/posts/20200719.html</loc><lastmod>2021-12-14</lastmod></url>
+<url><loc>https://www.matsudakenji.xyz/blog/posts/20200723.html</loc><lastmod>2021-12-14</lastmod></url>
+<url><loc>https://www.matsudakenji.xyz/blog/posts/20200725.html</loc><lastmod>2021-12-14</lastmod></url>
+<url><loc>https://www.matsudakenji.xyz/blog/posts/20200727.html</loc><lastmod>2021-12-14</lastmod></url>
+<url><loc>https://www.matsudakenji.xyz/blog/posts/20200801.html</loc><lastmod>2021-12-14</lastmod></url>
+<url><loc>https://www.matsudakenji.xyz/blog/posts/20200802.html</loc><lastmod>2021-12-14</lastmod></url>
+<url><loc>https://www.matsudakenji.xyz/blog/posts/20200804.html</loc><lastmod>2021-12-14</lastmod></url>
+<url><loc>https://www.matsudakenji.xyz/blog/posts/20200808.html</loc><lastmod>2021-12-14</lastmod></url>
+<url><loc>https://www.matsudakenji.xyz/blog/posts/20200917.html</loc><lastmod>2021-12-14</lastmod></url>
+<url><loc>https://www.matsudakenji.xyz/blog/posts/20200918.html</loc><lastmod>2021-12-14</lastmod></url>
+<url><loc>https://www.matsudakenji.xyz/blog/posts/20200919.html</loc><lastmod>2021-12-14</lastmod></url>
+<url><loc>https://www.matsudakenji.xyz/blog/posts/20200925.html</loc><lastmod>2021-12-14</lastmod></url>
+<url><loc>https://www.matsudakenji.xyz/blog/posts/20200926.html</loc><lastmod>2021-12-14</lastmod></url>
+<url><loc>https://www.matsudakenji.xyz/blog/posts/20201003.html</loc><lastmod>2021-12-14</lastmod></url>
+<url><loc>https://www.matsudakenji.xyz/blog/posts/20201201.html</loc><lastmod>2021-12-14</lastmod></url>
+<url><loc>https://www.matsudakenji.xyz/blog/posts/20201202.html</loc><lastmod>2021-12-14</lastmod></url>
+<url><loc>https://www.matsudakenji.xyz/blog/posts/20201209.html</loc><lastmod>2021-12-14</lastmod></url>
+<url><loc>https://www.matsudakenji.xyz/blog/posts/20201210.html</loc><lastmod>2021-12-14</lastmod></url>
+<url><loc>https://www.matsudakenji.xyz/blog/posts/20210106.html</loc><lastmod>2021-12-14</lastmod></url>
+<url><loc>https://www.matsudakenji.xyz/blog/posts/20210806.html</loc><lastmod>2021-12-14</lastmod></url>
+<url><loc>https://www.matsudakenji.xyz/blog/posts/20211129.html</loc><lastmod>2021-12-14</lastmod></url>
+<url><loc>https://www.matsudakenji.xyz/computer/archlinux_installation.html</loc><lastmod>2021-12-14</lastmod></url>
+<url><loc>https://www.matsudakenji.xyz/computer/what-i-use.html</loc><lastmod>2021-12-14</lastmod></url>
+<url><loc>https://www.matsudakenji.xyz/error/404.html</loc><lastmod>2021-12-14</lastmod></url>
+<url><loc>https://www.matsudakenji.xyz/farm/journal/2021.html</loc><lastmod>2021-12-14</lastmod></url>
+<url><loc>https://www.matsudakenji.xyz/</loc><lastmod>2021-12-14</lastmod></url>
+<url><loc>https://www.matsudakenji.xyz/misc/migration.html</loc><lastmod>2021-12-14</lastmod></url>
+<url><loc>https://www.matsudakenji.xyz/plants/myrica_rubra.html</loc><lastmod>2021-12-14</lastmod></url>
</urlset>