important fixes
This commit is contained in:
parent
1ee325176d
commit
54e0416497
6
lb
6
lb
|
@ -33,7 +33,7 @@ getTitle() { \
|
|||
|
||||
postNew() { \
|
||||
mkdir -p $dir/blog/.drafts
|
||||
echo -e "<h2 id='$url'>$title</h2><small>[<a aria-hidden=\"true\" href=\"$blogfile#$url\">link</a>—<a href=\"blog/$url.html\">standalone</a>]</small>\n\n<++>" >> $dir/blog/.drafts/$url.html && $EDITOR $dir/blog/.drafts/$url.html ;}
|
||||
echo -e "<h2 id='$url'>$title</h2>\n<small>[<a href=\"$blogfile#$url\">link</a>—<a href=\"blog/$url.html\">standalone</a>]</small>\n\n<++>" >> $dir/blog/.drafts/$url.html && $EDITOR $dir/blog/.drafts/$url.html ;}
|
||||
|
||||
finalize() { \
|
||||
listandReturn $dir/blog/.drafts finalize
|
||||
|
@ -47,9 +47,9 @@ finalize() { \
|
|||
echo -e "\n<div class=\"entry\">\n$(cat $dir/blog/.drafts/$chosen)\n<small>$webdate</small>\n</div>\n" > $tmpdir/html.html
|
||||
sed -i "/<!-- LB -->/r $tmpdir/html.html" $blogfile
|
||||
sed -i "/<!-- LB -->/r $tmpdir/rss.xml" $rssfile
|
||||
header="<html>\n<head>\n<title>$title<\/title>\n<link rel='stylesheet type='text\/css' href='$stylesheet'>\n<meta charset='utf-8'\/>\n<\/head>\n<body>"
|
||||
header="<html>\n<head>\n<title>$title<\/title>\n<link rel='stylesheet' type='text\/css' href='$stylesheet'>\n<meta charset='utf-8'\/>\n<\/head>\n<body>"
|
||||
footer="<\/body>\n<footer>by <strong>$author<\/strong><\/footer>\n<\/html>"
|
||||
sed "0,/^/s//$header/;0,/<h2 id=/s//<h1 id=/;0,/h2>/s//h1>/;\$a$footer" $dir/blog/.drafts/$chosen > $dir/blog/$chosen
|
||||
sed "s/href=\"/href=\"..\//g;s/\.\.\/http/http/g;0,/^/s//$header/;0,/<h2 id=/s//<h1 id=/;0,/h2>/s//h1>/;\$a$footer" $dir/blog/.drafts/$chosen > $dir/blog/$chosen
|
||||
rm $dir/blog/.drafts/$chosen
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue