uni

Thing1's amazing uni repo
Log | Files | Refs | Submodules

new.sh (1749B)


      1 #!/bin/sh
      2 
      3 [ -z "$1" ] && echo "blog name needed" && exit
      4 
      5 tmp=$(mktemp)
      6 
      7 vi $tmp
      8 
      9 echo """
     10 <!DOCTYPE html>
     11 <html lang=en>
     12         <head>
     13 		<meta charset='UTF-8'>
     14                 <title>The amazing blogs of Lucas Standen!</title>
     15                 <link rel="stylesheet" href="../style.css">
     16         </head>
     17 
     18         <body>
     19                 <header>
     20                         <h1 class="title">The amazing blogs of Lucas Standen!</h1>
     21                         <h2 class="title">You've stumbled right into my rants!</h2>
     22 
     23                         <hr>
     24 
     25                         <nav>
     26                                 <table>
     27                                         <thead>
     28                                                 <tr>
     29                                                         <th><a href="../index.html">Home</a></th>
     30                                                         <th><a href="../blog.html">Blog</a></th>
     31                                                         <th><a href="../cv.html">CV</a></th>
     32                                                 </tr>
     33                                         </thead>
     34                                 </table>
     35                         </nav>
     36 
     37                         <hr>
     38                 </header>
     39 
     40                 <div id="mainbody">
     41 """ > $1.html
     42 cat $tmp >> $1.html
     43 echo """
     44                 </div>
     45 
     46                 <hr>
     47 
     48                 <footer>
     49                         <a href="../disclaimer.html">Disclaimer</a>
     50                         <a href="https://analognowhere.com/_/cohelg/">Background source</a>
     51                         <small id="pageLastChanged"></small>
     52                         <script src="../scripts/lastmodified.js"></script>
     53                 </footer>
     54         </body>
     55 </html>
     56 
     57 
     58 """ >> $1.html