1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | <!doctype html> <!--title:brcl: static site generator--> <!--date:2023/05/15--> <html lang='en'> <head> <meta charset='UTF-8'> <meta name='viewport' content='width=device-width, initial-scale=1.0'> <meta name='author' content='Maciej Spychala' /> <title>brcl: static site generator</title> <link type='text/css' rel='stylesheet' href='/assets/style.css'> </head> <body> <header> <a id='title' href='/'>mcksp</a></span> <div id='navbar'> <a href='/blog'>blog</a> <a href='/tech'>tech</a> <a href='https://git.mcksp.com'>git</a> <a href='/about'>about</a> <a href='/rss.xml'>rss</a> </div> </header> <h1>brcl: static site generator</h1> <p> <b><code>brcl</code></b> is static site generator, that relies on you actually writing html. You can find it <a href="https://git.mcksp.com/brcl">here</a> </p> There are mainly 4 features of brcl: <ul> <li>replacing <code>header</code> and <code>footer</code> with prepared template,</li> <li>generating <code>index</code> files for given folders,</li> <li>generating <code>rss</code> feed,</li> <li>preparing files for new articles.</li> </ul> <p> It also supports simple variables in templates, that's why you will find <code><!--date:2023/05/15--></code> comment in source of this article. </p> <p> Minimal template for <code>brcl</code> consists of two parts and looks like this: </p> header: <pre><code><!doctype html> <!--title:%s--> <!--date:%s--> <html lang='en'> <head> <meta charset='UTF-8'> <title>%s</title> <link type='text/css' rel='stylesheet' href='/style.css'> </head> <body> <header> <a id='title' href='/'>mcksp</a></span> <div> <a href='/blog'>blog</a> <a href='/about'>about</a> <a href='/rss.xml'>rss</a> </div> <h1>%s</h1> <span id='date'>%s</span> </header> </code></pre> footer: <pre><code> <footer> have a nice day! </footer> </body> </html> </code></pre> <p> And now promise of the <code>brcl</code> is that everything between those template parts will be untouched by it, and anytime template will change, it will swap it for any existing article. </p> <p> If you want to create new article you can copy existing one and change title and date values, or you can call </p> <pre><code>brcl [dir] [filename] [title...] brcl blog tart My recipe for lemon tart </code></pre> <p> that will create a new file in <code>blog/tart.html</code> with the title <code>My recipe for lemon tart</code> and current date. </p> <p> I created that mostly because I was tired of setting up Jekyll environment from zero every two years that I remind myself that I own a blog webpage. </p> <footer> made with <a href='https://git.mcksp.com/brcl'>brcl</a> </footer> </body> </html> |