From dbae9472bd08b9e5edd5bbdc5dcd8a0781010511 Mon Sep 17 00:00:00 2001 From: p4bl0 Date: Sun, 25 Jul 2010 18:11:03 +0200 Subject: reorganised includes in default templates --- default-files/archives.html | 30 ++--------------------------- default-files/article.html | 30 ++--------------------------- default-files/bottom.html | 16 +++++++++++++++ default-files/top.html | 47 +++++++++++++++++++++++++++++++++++++++++++++ post-commit.sh | 2 ++ 5 files changed, 69 insertions(+), 56 deletions(-) create mode 100644 default-files/bottom.html create mode 100644 default-files/top.html diff --git a/default-files/archives.html b/default-files/archives.html index 5cb8981..87c3bea 100644 --- a/default-files/archives.html +++ b/default-files/archives.html @@ -1,27 +1,4 @@ - - - - - <?fugitive-install name ?>'s blog: archives - - - - - - - - - - - - - - - - - -
- +

Archives

@@ -50,7 +27,4 @@
- - - - + diff --git a/default-files/article.html b/default-files/article.html index 40066c5..5b59e06 100644 --- a/default-files/article.html +++ b/default-files/article.html @@ -1,27 +1,4 @@ - - - - - <?fugitive-install name ?>'s blog: <?fugitive article_title ?> - - - - - - - - - - - - - - - - - -
- +

@@ -43,7 +20,4 @@
- - - - + diff --git a/default-files/bottom.html b/default-files/bottom.html new file mode 100644 index 0000000..b1a6625 --- /dev/null +++ b/default-files/bottom.html @@ -0,0 +1,16 @@ + + + + diff --git a/default-files/top.html b/default-files/top.html new file mode 100644 index 0000000..4e2d8dc --- /dev/null +++ b/default-files/top.html @@ -0,0 +1,47 @@ + + + + + <?fugitive-install name ?>'s blog: <?fugitive page_title ?> + + + + + + + + + + + + + + + + + +
+ +
+

's blog

+ fugitive: a blog engine for hackers. +
diff --git a/post-commit.sh b/post-commit.sh index d4894d8..4d9cd25 100644 --- a/post-commit.sh +++ b/post-commit.sh @@ -266,6 +266,7 @@ generate_article() { cat "$templates_dir/article.html" | \ replace_file "article_content" "`get_article_content \"$art\"`" | \ replace_includes | \ + replace_str "page_title" "`get_article_title \"$art\"`" | \ replace_commit_info "-1" | \ replace_article_info "$art" | \ sed "/^\s*$/d" > "$public_dir/$art.html" @@ -339,6 +340,7 @@ if [ $modification -gt 0 ]; then replace_foreach "article" "$articles_sorted" | \ replace_foreach "commit" "$commits" | \ replace_empty_article_info | \ + replace_str "page_title" "archives" | \ replace_commit_info "-1" | \ sed "/^\s*$/d" > "$public_dir/archives.html" echo "done." -- cgit v1.2.3