From 2e720a45c3a9a006a9455680117d3df7d4ca3fc8 Mon Sep 17 00:00:00 2001 From: voidarc Date: Sat, 21 Mar 2026 13:34:00 +0000 Subject: [PATCH] initial --- .session | 53 ++++++++++++++++++++++++ index.norg | 22 ++++++++++ posts/index.norg | 19 +++++++++ posts/site.norg | 102 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 196 insertions(+) create mode 100644 .session create mode 100644 index.norg create mode 100644 posts/index.norg create mode 100644 posts/site.norg diff --git a/.session b/.session new file mode 100644 index 0000000..e6aecd0 --- /dev/null +++ b/.session @@ -0,0 +1,53 @@ +let SessionLoad = 1 +let s:so_save = &g:so | let s:siso_save = &g:siso | setg so=0 siso=0 | setl so=-1 siso=-1 +let v:this_session=expand(":p") +silent only +silent tabonly +cd ~/Documents/voidarc/content +if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == '' + let s:wipebuf = bufnr('%') +endif +let s:shortmess_save = &shortmess +if &shortmess =~ 'A' + set shortmess=aoOA +else + set shortmess=aoO +endif +badd +100 posts/site.norg +argglobal +%argdel +edit posts/site.norg +argglobal +setlocal foldmethod=expr +setlocal foldexpr=v:lua.vim.treesitter.foldexpr() +setlocal foldmarker={{{,}}} +setlocal foldignore=# +setlocal foldlevel=99 +setlocal foldminlines=1 +setlocal foldnestmax=20 +setlocal foldenable +21 +sil! normal! zo +31 +sil! normal! zo +let s:l = 100 - ((26 * winheight(0) + 27) / 54) +if s:l < 1 | let s:l = 1 | endif +keepjumps exe s:l +normal! zt +keepjumps 100 +normal! 0111| +tabnext 1 +if exists('s:wipebuf') && len(win_findbuf(s:wipebuf)) == 0 && getbufvar(s:wipebuf, '&buftype') isnot# 'terminal' + silent exe 'bwipe ' . s:wipebuf +endif +unlet! s:wipebuf +set winheight=1 winwidth=20 +let &shortmess = s:shortmess_save +let s:sx = expand(":p:r")."x.vim" +if filereadable(s:sx) + exe "source " . fnameescape(s:sx) +endif +let &g:so = s:so_save | let &g:siso = s:siso_save +doautoall SessionLoadPost +unlet SessionLoad +" vim: set ft=vim : diff --git a/index.norg b/index.norg new file mode 100644 index 0000000..1e007b2 --- /dev/null +++ b/index.norg @@ -0,0 +1,22 @@ +@document.meta +title: Home +description: Voidarc Docs and some other stuff +authors: [ + Adumh00man +] +categories: [ + meta +] +created: 2026-03-21T11:29:19+00:00 +updated: 2026-03-21T11:31:37+0100 +draft: true +layout: home +version: 1.1.1 +@end + +* Voidarc + Home page for Voidarc Documentation (or whatever excuse for a blog this is). + I just wanted to do this for fun idk. + Seems interesting for A-level. + + If you can read this, server02 hasn't crashed (yet) :) diff --git a/posts/index.norg b/posts/index.norg new file mode 100644 index 0000000..1aeaf59 --- /dev/null +++ b/posts/index.norg @@ -0,0 +1,19 @@ +@document.meta +title: Posts +description: +authors: [ + user01 +] +categories: [ + meta +] +created: 2026-03-21T10:56:50+00:00 +updated: 2026-03-21T10:56:50+00:00 +draft: true +layout: posts +version: 1.1.1 +@end + +* Posts + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut + labore et dolore magna aliqua. Lobortis scelerisque fermentum dui faucibus in ornare. \ No newline at end of file diff --git a/posts/site.norg b/posts/site.norg new file mode 100644 index 0000000..24fd943 --- /dev/null +++ b/posts/site.norg @@ -0,0 +1,102 @@ +@document.meta +title: Making a Blog Using a Niche Markdown Language +description: How to make a blog using Norg and some random project from github +authors: [ + Adumh00man +] +categories: [ + Blog + Neorg + Nvim + Voidarc + Webdev +] +created: 2026-03-21T11:39:17+00:00 +updated: 2026-03-21T12:33:21+0100 +draft: true +layout: post +version: 1.1.1 +@end + +* Nonsense Preamble + Neorg is a markdown Language that is Org mode but with some different shit in it. + It is supposed to be a replacement, but since I never really used Org mode in the first place, + that doesn't really apply. + However, after using it for a whole 10 seconds, I decided I could never go back to using Markdown ever again. + Norg was just a superior language in almost every way, except widespread support. + There are a plethora of plugins, but a distinct lack of real world uses, or even good utilities for using it outside of nvim, like it was + intended. + However, there was some random thing called Norgolith, that did apparently exactly what I needed it to, so here we are. + +** Norgolith + Apparently, as often happens on the internet, someone had thought of the same genius idea I had and made it already. + I was fully prepared to have to spend 3 weeks making a custom solution in Javascript that would end up half baked, but fortunately + someone had already done all the hard work for me! + + A static site generator is exactly what it says on the tin. It takes in some manner of arbitrary markdown script, and spits out + some html that can be served to the end user. Pretty simple if you ask me. + Well, if you had asked me before I started that is. + As things often go, I did things completely wrong the first time round. + I assumed that, because I didn't know what generator meant, Norgolith would have some docker compose version that i could just + shove some norg files into and it would handle the rest. + That's literally what it says on the homepage, after all. Something something Sod's law. + Turns out that I would have to use more than just docker in order to get something like this working. + +*** The First Hurdle + When I first downloaded the app in question, the first problem I encountered was the blatant lack of documentation upkeep. + As the docs indicated, I tried running `lith serve` to /serve/ the app. Turns out, the command had been renamed to `lith dev` + quite a while ago. The command itself hadn't changed, nor the functionality, just the name. + Of course, this was as simple as I thought, because I tend not to think much when faced with simple concepts. + The same thing happened when I decided on a whim to host an email server, which still to this day has not recieved a single email + from anyone other than myself. + +*** The First Attempt + Once I had realised that the docs were completely unreliable, I decided that it would be a great use of my time to try and follow them + anyway. + The creator (amartin) had done the usual blogger thing and hosted all the docs on Norgolith, which would be fine if Norgolith had a + search function. + Unfortunately, it does not, nor does it have a nice page where you can see all the pages that are outside of the post directory, + which just so happened to be every page of the docs. + In fact, on the doc site, there is a dead link to a theoretical post example, which was removed on github but not from the header. + + Strange. + + I initialised a Norg site in some random directory, still believing that I could host the whole thing self-sufficiently, and instead of + reading more than the code snippets in the github readme, I set off immediately to make a docker container that would serve the app. + By that, I mean I asked gemini and had to wait for the app to compile on my very old server. After a while, I gave up and went to do + something else, because I'm lazy. The first site was a failiure. + +*** The Second, More Successful, Attempt + For some reason, when I woke up the next day, something came over me. I realised that when I had run `lith build`, it had produced a + _*static site*_ , which made me realise that I might be stupid. + I realised that using some complex webhooks, i.e. 1 webhook, I could have a local copy in norg form, and then have a git managed copy + of the generated site. Shouldn't be too difficult using n8n, the only useful app I've ever installed. + Before that, though, I could use the dev server for what it was actually intended for, and make a first post to style. + +*** Styling, and my newfound love-hate relationship with Tailwind + Tailwind css was created in order to solve the really hard task of adding `border-radius: 3;` to anything on a website. + Why use readable syntax when your css can be spread across 15 different files and require an interpreter, after all. + Tailwind is based on immutable classes, and too many variables for my liking. Instead of using `color: white;` in a css file, you could + apply the class `text-text` to every div on your page, provided that you set the `--text` variable to white beforehand, in a different + file, and managed to compile it using the right version of tailwind. Because of the fact that I use nix, btw, the default package for + tailwind provides tailwind 3, that requires npx nonsense packages in order to function, and also doesn't recognise half of the functions + that are in the theme I -stole- borrowed and changed, as stated in the licence I definately read. + + On my first try, having never used tailwind before, I decided to just edit the files and see what happened. Of course, because the + tailwind.css file isn't the one that gets applied to the frontend, and nothing changed, so I gave up (I know, shocking).A + On a retry, I used the `tailwind_4` package, and it worked perfectly first try. Who could've guessed, I guess. + Once I realised tailwind was actually pretty simple, and I was the problem, I managed to import my fonts and a Catppuccin css variable + file, hence the current color scheme. Pretty nifty, huh. + + In short, fuck tailwind. But also, use tailwind for everything you possibly can. + +** The Dreaded Backend + The concept was simple, as all concepts are, expecially when the person making said concept has no concept of how to properly make + concepts. This person turned out to be me, and the concept was fairly simple. + Have a primary repo, that contained 2 submodules. The primary repo would house the whole site, config, themes, etc. The first submodule + would contain the raw .norg files that are in the content/ directory, and the second would have the output html files that would need to + end up on the server serving the service that is currently letting you read this right now. + + Said service would be a simple nginx docker container on some random port, that serves whatever it is asked. + In order for such a service to be viable, I don't want to have to manage it manually. Instead, I can use a webhook to pull the html + repo whenever there is a new commit. This could also be on a timer, but instant gratification is better.