Added Root Parameter

Christopher Vollick [2010-03-21 02:29]
Added Root Parameter

This is meant to give each template the path from where it will end up to the root directory.
Filename
gitsite
diff --git a/gitsite b/gitsite
index cabeaba..d6f87c7 100755
--- a/gitsite
+++ b/gitsite
@@ -93,13 +93,13 @@ for index in $(seq 1 $numArticles); do
 	./markup_engine < "articles/$title" > "$tmpArticleDir/$title"

 	# Now, run the article template on the content.
-	templates/article Content "|$tmpArticleDir/$title" Title "$title" NextTitle "$next" NextLink "$nextLink" PreviousTitle "$prev" PreviousLink "$prevLink" CreationDate "$published" ModificationDate "$modified" ID "$id" Self "$self" > "$tmpArticleTemplateDir/$title"
+	templates/article Content "|$tmpArticleDir/$title" Title "$title" NextTitle "$next" NextLink "$nextLink" PreviousTitle "$prev" PreviousLink "$prevLink" CreationDate "$published" ModificationDate "$modified" ID "$id" Self "$self" Root "../../" > "$tmpArticleTemplateDir/$title"

 	# Make the destination dir
 	mkdir -p "$articleDestDir/${encTitle}"

 	# Finish off with the site template
-	templates/site Content "|$tmpArticleTemplateDir/$title" Title "$title" NextTitle "$next" NextLink "$nextLink" PreviousTitle "$prev" PreviousLink "$prevLink" CreationDate "$published" ModificationDate "$modified" ID "$id" Self "$self" > "$articleDestDir/${encTitle}/index.html"
+	templates/site Content "|$tmpArticleTemplateDir/$title" Title "$title" NextTitle "$next" NextLink "$nextLink" PreviousTitle "$prev" PreviousLink "$prevLink" CreationDate "$published" ModificationDate "$modified" ID "$id" Self "$self" Root "../../" > "$articleDestDir/${encTitle}/index.html"

 	# Make the permalink dir
 	mkdir -p "$idDestDir/$id"
ViewGit