DeckPC style changes
[web-old.git] / blogit
diff --git a/blogit b/blogit
index e54f9e38a57297145f032f13c32f6ecba4ec445d..c1063d11a0296e607d3b0b8259fb95ee53fb312e 100755 (executable)
--- a/blogit
+++ b/blogit
@@ -6,10 +6,11 @@ include config
 endif
 
 # The following can be configured in config
-BLOG_DATE_FORMAT_INDEX ?= %x
-BLOG_DATE_FORMAT ?= %x %X
+BLOG_DATE_FORMAT_INDEX ?= %d/%m/%Y
+BLOG_DATE_FORMAT ?= %d/%m/%Y %X
 BLOG_TITLE ?= blog
 BLOG_DESCRIPTION ?= blog
+BLOG_AUTHOR ?= John Doe
 BLOG_URL_ROOT ?= http://localhost/blog
 BLOG_FEED_MAX ?= 20
 BLOG_FEEDS ?= rss atom
@@ -67,6 +68,8 @@ blog/index.html: $(ARTICLES) $(TAGFILES) $(addprefix templates/,$(addsuffix .htm
        export TITLE; \
        DESCRIPTION="$(BLOG_DESCRIPTION)"; \
        export DESCRIPTION; \
+       AUTHOR="$(BLOG_AUTHOR)"; \
+       export AUTHOR; \
        envsubst < templates/header.html > $@; \
        envsubst < templates/index_header.html >> $@; \
        envsubst < templates/tag_list_header.html >> $@; \
@@ -107,6 +110,8 @@ blog/@%.html: $(TAGFILES) $(addprefix templates/,$(addsuffix .html,header tag_in
        mkdir -p blog
        TITLE="$(BLOG_TITLE) - Articles tagged $*"; \
        TAGS="$*"; \
+       AUTHOR=""; \
+       export AUTHOR; \
        export TITLE; \
        export TAGS; \
        envsubst < templates/header.html > $@; \
@@ -133,7 +138,7 @@ blog/%.html: $(BLOG_SRC)/%.md $(addprefix templates/,$(addsuffix .html,header ar
        mkdir -p blog
        TITLE=" $(BLOG_TITLE) - $(shell head -n1 $<)"; \
        export TITLE; \
-       AUTHOR="$(shell git log -n 1 --reverse --format="%cn" -- "$<")"; \
+       AUTHOR="$(shell git log -n 1 --reverse --format="%an" -- "$<")"; \
        export AUTHOR; \
        DATE_POSTED="$(shell git log --diff-filter=A --date="format:$(BLOG_DATE_FORMAT)" --pretty=format:'%ad' -- "$<")"; \
        export DATE_POSTED; \