From 014dd0c6cc510a225b60a93ca65326824140bdf3 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Wed, 6 Oct 2021 18:46:16 +0200 Subject: Update --- refresh.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'refresh.sh') diff --git a/refresh.sh b/refresh.sh index e20e303..e7af57f 100755 --- a/refresh.sh +++ b/refresh.sh @@ -20,10 +20,11 @@ build_links() { for p in $(find ${projects}/ -maxdepth 1 -mindepth 1 -type d) do name=$(basename $p) + beautiful_name=$(cat $p/name.txt) [ "$name" == "$main" ] && link="./index.html" || link=${name}.html [ $name == $1 ] && active="active" || active="" - links="${links}\n"''${name}'' + links="${links}\n"''${beautiful_name}'' done tmp=$(mktemp) echo -e "$links" > $tmp @@ -36,12 +37,14 @@ do [ "$name" == "$main" ] && html=${public}/index.html || html=${public}/${name}.html js=./projects/$name/index.js content=$p/index.html + beautiful_name=$(cat $p/name.txt) # Create HTML page cp -r $p $public/projects/ cat $template |sed "/\${CONTENT}/r $content"|sed '/\${CONTENT}/d' > $html sed -i "s#\${JS}#${js}#g" $html sed -i "s#\${project_name}#${name}#g" $html + sed -i "s#\${beautiful_name}#${beautiful_name}#g" $html echo $html # Create links -- cgit v1.2.3