diff --git a/README b/README index edd4815..7711b32 100644 --- a/README +++ b/README @@ -231,6 +231,12 @@ fugitive: README Its value is the date and time of the last commit that provoked the (re)generation of the file. +
commit_datetime_html5
+
+ Its value is the date and time of the last commit that provoked the + (re)generation of the file, but in an html5 <time> + compliant format. +
commit_date
Its value is the date of the last commit that provoked the (re)generation @@ -286,6 +292,11 @@ fugitive: README the articles-dir directory (see configuration)).
+
article_cdatetime_html5
+
+ Same as previous, but in an html5 <time> compliant + format. +
article_cdate
Its value is the date of the publication of the article. @@ -303,6 +314,11 @@ fugitive: README Its value is the date and time of the last modification of the article (the date of the last commit which changed the article file).
+
article_mdatetime_html5
+
+ Same as previous, but in an html5 <time> compliant + format. +
article_mdate
Its value is the date of the last modification of the article. diff --git a/default-files/archives.html b/default-files/archives.html index 87c3bea..1b0e8bf 100644 --- a/default-files/archives.html +++ b/default-files/archives.html @@ -7,7 +7,7 @@
-
@@ -17,7 +17,7 @@
last update on - diff --git a/default-files/article.html b/default-files/article.html index 02920a2..c32a927 100644 --- a/default-files/article.html +++ b/default-files/article.html @@ -7,12 +7,12 @@ diff --git a/html-gen.sh b/html-gen.sh index ef03fc8..a0f4422 100644 --- a/html-gen.sh +++ b/html-gen.sh @@ -165,6 +165,8 @@ replace_commit_info() { commit_author=`get_commit_info "%an" "$1"` commit_author_email=`get_commit_info "%ae" "$1" | sanit_mail` commit_datetime=`get_commit_info "%ai" "$1"` + commit_datetime_html5=`echo "$commit_datetime" | \ + sed "s/ /T/;s/ \(+\|-\)\([0-9][0-9]\)/\1\2:/"` commit_date=`echo $commit_datetime | cut -d' ' -f1` commit_time=`echo $commit_datetime | cut -d' ' -f2` commit_timestamp=`get_commit_info "%at" "$1"` @@ -177,6 +179,7 @@ replace_commit_info() { replace_str "commit_author" "$commit_author" | \ replace_str "commit_author_email" "$commit_author_email" | \ replace_str "commit_datetime" "$commit_datetime" | \ + replace_str "commit_datetime_html5" "$commit_datetime_html5" | \ replace_str "commit_date" "$commit_date" | \ replace_str "commit_time" "$commit_time" | \ replace_str "commit_timestamp" "$commit_timestamp" | \ @@ -188,12 +191,16 @@ replace_commit_info() { replace_article_info() { article_title=`get_article_title "$1"` article_cdatetime=`get_article_info "%ai" "$1" | tail -1` + article_cdatetime_html5=`echo "$article_cdatetime" | \ + sed "s/ /T/;s/ \(+\|-\)\([0-9][0-9]\)/\1\2:/"` article_cdate=`echo "$article_cdatetime" | cut -d' ' -f1` article_ctime=`echo "$article_cdatetime" | cut -d' ' -f2` article_ctimestamp=`get_article_info "%at" "$1" | tail -1` u=`get_article_info "%ai" "$1" | wc -l` article_mdatetime=`if test "$u" -gt 1; then get_article_info "%ai" "$1" | \ head -1; fi` + article_mdatetime_html5=`echo "$article_mdatetime" | \ + sed "s/ /T/;s/ \(+\|-\)\([0-9][0-9]\)/\1\2:/"` article_mdate=`echo "$article_mdatetime" | cut -d' ' -f1` article_mtime=`echo "$article_mdatetime" | cut -d' ' -f2` article_mtimestamp=`if test "$u" -gt 1; then get_article_info "%at" \ @@ -211,10 +218,12 @@ replace_article_info() { replace_str "article_file" "$1" | \ replace_str "article_title" "$article_title" | \ replace_str "article_cdatetime" "$article_cdatetime" | \ + replace_str "article_cdatetime_html5" "$article_cdatetime_html5" | \ replace_str "article_cdate" "$article_cdate" | \ replace_str "article_ctime" "$article_ctime" | \ replace_str "article_ctimestamp" "$article_ctimestamp" | \ replace_str "article_mdatetime" "$article_mdatetime" | \ + replace_str "article_mdatetime_html5" "$article_mdatetime_html5" | \ replace_str "article_mdate" "$article_mdate" | \ replace_str "article_mtime" "$article_mtime" | \ replace_str "article_mtimestamp" "$article_mtimestamp" | \