~npisanti/npisantidotcomssg

88cdde99b2328f6ba743af66967b9d063f55c83f — Nicola Pisanti a month ago 03e1840
finished fish script
1 files changed, 22 insertions(+), 3 deletions(-)

M build_fish.sh
M build_fish.sh => build_fish.sh +22 -3
@@ 120,7 120,6 @@ function navigation_header #----------------------------------------------------
end 

function navigation_footer #-----------------------------------------------------

    set numpage "$argv[1]"
    set maxpage "$argv[2]"
    set archive_enable "$argv[3]"


@@ 285,8 284,7 @@ function build_archives #-------------------------------------------------------
			end

			set -l post_name ( basename "$p" .html | string sub -s 12 | string replace -a _ " " )

		    set -a text "\n$post_date <a href=\"../posts/$p\">$post_name</a><br/>"		
		    set -a text "\n$post_date <a href=\"../posts/$p\">$post_name</a><br/>"
		end

        set -a text "\n</section>"


@@ 336,13 334,34 @@ function build_rss #------------------------------------------------------------
    printf "\n"
end

function build_index_redirect #--------------------------------------------------
	echo "creating index redirect..."
	set    text '<!DOCTYPE html>'
	set -a text '\n<html>\n<head>\n<meta charset="utf-8" />'
	set -a text "\n<title>[ npisanti.com]</title>"
    set -a text "\n"(cat input/base/head.html) 
	set -a text (og_image_path) 
	set -a text '\n<meta property="og:image:height" content="230" />'
	set -a text '\n<meta property="og:image:width" content="230" />'
	set -a text '\n<meta http-equiv="refresh" content="0;url=main/index.html" />'
	set -a text "\n</head>"
	set -a text "\n<body>"
	set -a text "\nredirecting to main/index.html"
	set -a text "\n</body>"
	set text (echo $text | sed -e "s|SITEROOTPATH|.|g") 
	echo -e $text > "$OUTFOLDER/index.html"
end

#--------------------- EXECUTES ALL THE FUNCTIONS -------------------------------
cd $SCRIPTFOLDER

build_pages
build_feed "main"
for dir in $CATEGORIES; build_feed $dir; end
build_posts
build_archives
build_rss
build_index_redirect

# retrocompatibiliy
mkdir -p "$OUTFOLDER/journal"