From a8233923bf56782a53ea48e655e4a9a111b22279 Mon Sep 17 00:00:00 2001 From: sanine Date: Fri, 14 Jan 2022 22:39:20 -0600 Subject: add refactor-argent blog post and updated favicon --- .gitignore | 1 + layouts/base.lua | 1 + site_root/about.lua | 4 +- site_root/blog/announcing_honeysuckle.lua | 48 ++++----- site_root/blog/refactor-argent.lua | 24 +++++ site_root/cgit.css | 172 ++++++++++++++++++++++++++++++ site_root/favicon.svg | 159 +++++++++++++++++++++++++++ site_root/index.lua | 4 +- site_root/style.css | 18 ++-- 9 files changed, 399 insertions(+), 32 deletions(-) create mode 100644 site_root/blog/refactor-argent.lua create mode 100644 site_root/cgit.css create mode 100644 site_root/favicon.svg diff --git a/.gitignore b/.gitignore index 9b4a572..c79a3e0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *~ public/ +publish.sh diff --git a/layouts/base.lua b/layouts/base.lua index aae2081..def4183 100644 --- a/layouts/base.lua +++ b/layouts/base.lua @@ -26,6 +26,7 @@ return function(html, page_tbl) + %s diff --git a/site_root/about.lua b/site_root/about.lua index ea832e1..9f87357 100644 --- a/site_root/about.lua +++ b/site_root/about.lua @@ -3,10 +3,12 @@ about me ======== hey! i'm kate (aka sanine) and i like to write code, hack circuits, and grow plants. -i mostly use this site for documenting and sharing various projects. +i mostly use this site for documenting and sharing various projects, with the exception +of my game engine honey, which [has its own website](https://honey3d.org). i also (very occasionally) make games!! you can see them [over on itch.io](https://sanine.itch.io/). if you need to get in contact with me, you can send me an email at `kate AT sanine DOT net`. + i hope you're having a good day. <3 ]] diff --git a/site_root/blog/announcing_honeysuckle.lua b/site_root/blog/announcing_honeysuckle.lua index 5fb97fb..f078585 100644 --- a/site_root/blog/announcing_honeysuckle.lua +++ b/site_root/blog/announcing_honeysuckle.lua @@ -3,35 +3,35 @@ return { layout='blog', date='2021-05-23', markdown=[[ -As I’ve been working on various projects for the past couple of years -I have continued to find that a combination of C and Lua is my favorite -way to write code. The ongoing development of [my game engine honey](https://honey3d.org/) -uses that pair and I’m planning on using it (whenever I get around to it) for my [dream -atlas project](https://sanine.net/projects/dream-atlas). But, and I’ll be the first -to admit this, the C API is a little clunky. -I don’t generally mind that all too much (after all, one of my favorite things about -both C and Lua is that they’re languages you can carry around in your head, and having -a very explicit API means you only need to understand the fundamental concepts to use it) +as i’ve been working on various projects for the past couple of years +i have continued to find that a combination of c and lua is my favorite +way to write code. the ongoing development of [my game engine honey](https://honey3d.org/) +uses that pair and i’m planning on using it (whenever i get around to it) for my [dream +atlas project](https://sanine.net/projects/dream-atlas). but, and i’ll be the first +to admit this, the c api is a little clunky. +i don’t generally mind that all too much (after all, one of my favorite things about +both c and lua is that they’re languages you can carry around in your head, and having +a very explicit api means you only need to understand the fundamental concepts to use it) but it does mean that dev work goes a bit slower. -I did a good bit of work streamlining the process of writing Lua bindings in C when -tinkering with honey and ever since then I’ve found myself peeking back at that code -and re-implementing it in other projects. A colleague of mine once said that the time +i did a good bit of work streamlining the process of writing lua bindings in c when +tinkering with honey and ever since then i’ve found myself peeking back at that code +and re-implementing it in other projects. a colleague of mine once said that the time to write a library is when you’ve done something once, you’re doing it now, and you -re pretty sure you’ll do it again, and I think I’ve quite handily cleared that condition -So! I’m splitting that code out and refactoring it into its own library which, due -to its historical roots, I’ve chosen to call honeysuckle. +re pretty sure you’ll do it again, and i think i’ve quite handily cleared that condition +so! i’m splitting that code out and refactoring it into its own library which, due +to its historical roots, i’ve chosen to call honeysuckle. -honeysuckle is still under development – the API is a bit different from the one I +honeysuckle is still under development – the api is a bit different from the one i came up with when working on honey and imo is easier to use – but when it’s ready -it will provide a whole host of helpful functions that make integrating Lua scripting -into C applications simple and fast. I am (attempting) to employ readme-driven development -so I’ve written up a readme for honeysuckle. Any feedback on the proposed API and -features would be much appreciated! As of writing, honeysuckle is planned to include -functions for parsing arguments to C functions from Lua, creating and processing tables -throwing and handling Lua errors, using the Lua registry, and creating printf-formatted strings. +it will provide a whole host of helpful functions that make integrating lua scripting +into c applications simple and fast. i am (attempting) to employ readme-driven development +so i’ve written up a readme for honeysuckle. any feedback on the proposed api and +features would be much appreciated! as of writing, honeysuckle is planned to include +functions for parsing arguments to c functions from lua, creating and processing tables +throwing and handling lua errors, using the lua registry, and creating printf-formatted strings. -I’ve already created a repository for honeysuckle. There’s just a README in there -for now, but that will probably have changed even just later today, since I’m planning +i’ve already created a repository for honeysuckle. there’s just a readme in there +for now, but that will probably have changed even just later today, since i’m planning on working on it more this afternoon. :p ]]} diff --git a/site_root/blog/refactor-argent.lua b/site_root/blog/refactor-argent.lua new file mode 100644 index 0000000..6b7ca4d --- /dev/null +++ b/site_root/blog/refactor-argent.lua @@ -0,0 +1,24 @@ +local md = [[ +hey there! you might be noticing that things look a little... different around here. +that's because i've refactored this site to use my custom static site generator, [argent]. +i used to use jekyll, but i wanted to be able to do more *direct programming* in building my +pages, and i wanted to be able to do that in lua. i tried looking at some of the other +static site generators out there using lua (and python too) but so many of them rely on +packages that no longer exist, or language features from seven versions ago, or similar +types of problems, that i wanted to have a site generator that *just works*. + +so i wrote one! i called it argent because (a) it sounds kinda cool and (b) argent, as a +silver-white color, is used in heraldry to represent the moon, and i like the oblique reference +to lua. it relies on posix filesystem calls (sorry windows users, you'll need msys or something +to run it) but otherwise is totally standalone -- it packages its own lua interpreter, so language +version (ideally) will never change. + +[argent]: /git/argent +]] + +return { + title = 'refactor: argent', + date = '2022-01-13', + layout = 'blog', + markdown = md, +} diff --git a/site_root/cgit.css b/site_root/cgit.css new file mode 100644 index 0000000..0f9e5a3 --- /dev/null +++ b/site_root/cgit.css @@ -0,0 +1,172 @@ +:root { + --light: #eee; + --dark: #1c1c1c; + --highlight: #ff3a21 +} + +body { + color: var(--light); + background: var(--dark); + font-family: monospace; + font-size: 16px; +} + +#navigation { + text-align: center; +} + +.centered { + text-align: center; +} + +#content { + width: 600px; + max-width: 100%; + margin: auto; +} + +a { + color: var(--highlight); +} + +a:hover { + color: var(--dark); + background: var(--highlight); + text-decoration: none; +} + +ul { + list-style: none; +} + +li:before { + content: '* '; +} + +code { + background: black; + padding: 0 6px; + border-radius: 4px; +} + + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + * + * cgit-specific css + * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + */ + +div#cgit { + width: 700px; + max-width: 100%; + margin: auto; +} + +div#cgit table#header { + width: 100%; + margin-bottom: 1em; +} + +div#cgit table#header tbody tr td.logo a { + display: none; +} + +div#cgit table#header td.form { + text-align: right; + vertical-align: bottom; + padding-right: 1em; + padding-bottom: 2px; + white-space: nowrap; +} + +div#cgit table.tabs { + border-bottom: solid 3px var(--highlight); + border-collapse: collapse; + margin-top: 2em; + margin-bottom: 0; + width: 100%; +} + +div#cgit table.tabs td { + padding: 0px 1em; + vertical-align: bottom; +} + +div#cgit table.tabs td a { + padding: 2px 0.75em; + text-decoration: none; +} + +div#cgit table.tabs td a.active { + color: var(--dark); + background-color: var(--highlight); +} + + +div#cgit table.tabs td.form { + text-align: right; +} + +div#cgit table.tabs td.form form { + padding-bottom: 2px; + white-space: nowrap; +} + + +div#cgit div.content { + margin: 0px; + padding: 2em 0; + border-bottom: solid 3px var(--light); +} + +div#cgit select, input { + font-family: monospace; +} + + +div#cgit table.list { + width: 100%; + border: none; + border-collapse: collapse; +} + +div#cgit table.list tr { + background: white; +} + +div#cgit table.list tr.logheader { + background: #eee; +} + +div#cgit table.list tr:nth-child(even) { + background: #151515; +} + +div#cgit table.list tr:nth-child(odd) { + background: var(--dark); +} + + +div#cgit table.blob td.hashes, +div#cgit table.blob td.lines { + margin: 0; padding: 0 0 0 0.5em; + vertical-align: top; + background-color: #151515; +} + +div#cgit table.blob td.lines code { + background-color: #151515; +} + +div#cgit span.decoration { + margin: 0 1em; +} + +div#cgit span.decoration a::before { + content: "["; +} + +div#cgit span.decoration a::after { + content: "]"; +} diff --git a/site_root/favicon.svg b/site_root/favicon.svg new file mode 100644 index 0000000..5cc89a7 --- /dev/null +++ b/site_root/favicon.svg @@ -0,0 +1,159 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/site_root/index.lua b/site_root/index.lua index cc5f699..c419830 100644 --- a/site_root/index.lua +++ b/site_root/index.lua @@ -2,7 +2,9 @@ local tk = require 'toolkit' function get_blog_links() local links = '