adding proper headers

This commit is contained in:
shockrahwow 2019-04-30 13:36:36 -07:00
parent 74ca17a621
commit 5a61593d73

13
make.sh
View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
rootDir='./tmp/' rootDir='./tmp/'
targetDir='' targetDir='post/'
[[ -z $rootDir/post/ ]] && mkdir -p $rootDir/post [[ -z $rootDir/post/ ]] && mkdir -p $rootDir/post
@ -13,19 +13,14 @@ post() {
sed -i "5i <title>${base%.*}</title>" $tmp sed -i "5i <title>${base%.*}</title>" $tmp
sed -i "s/<img/<img class=\"pure-img\"/g" $tmp sed -i "s/<img/<img class=\"pure-img\"/g" $tmp
sed -i 's/<table>/<table class="pure-table">/g' $tmp sed -i 's/<table>/<table class="pure-table">/g' $tmp
# turn the header into an actual header
sed -i '30i <div class="header">' $tmp
sed -i '32i </div>' $tmp # change this to 33 once we finalized for the subheading
# finally move this post to its proper location in the _rootDir # finally move this post to its proper location in the _rootDir
mv $tmp "$rootDir/$targetDir/${base%.*}.html" mv $tmp "$rootDir/$targetDir/${base%.*}.html"
rm -f $tmp rm -f $tmp
} }
if [[ $1 == "r" ]]
then
targetDir=''
shift
else
targetDir='post/'
fi
for file in $@;do for file in $@;do
post $file post $file
done done