(
    title: "Vostok",
    summary: Some("Announcing the Vostok static capsule generator"),
    published: Some((
        year: 2022,
        month: 3,
        day: 27,
        hour: 00,
        minute: 11,
        second: 00,
    )),
    tags: ["announcements", "vostok", "zond", "programming", "rust"],
)
---
## Some Glasnost
The Space Race and the Cold War ran concurrently for much of the mid to late 1900's. What seems lost to memory unless you lived through that time is that the ultimate outcome was anything but a foregone conclusion for either. In particular, the Soviets took an early and substantial lead in the Space Race, putting the first satellite into orbit, the first man, and achieving the first spacewalk. The Russian people have their own heroes to celebrate from this era, and well they should.

I grew up in that time during the 80's when the term Glasnost was being bandied about, and even though tensions were high between the US and the USSR there appeared to be hope that our respective leaders were at least interested in the idea of peaceful coexistence. While I don't, overall, think that Reagan was a terrifically great president, I do applaud the interaction between him and Mikhail Gorbechev during this time. Of course, the scientific communities of both countries were always at the forefront of the efforts to acheive not just coexistence but cooperation and sharing of knowledge, in spite of what their respective governments wanted.

I hate that there is a war in Ukraine right now. That said, I hate xenophobia even more.

The Soviet counterpart to the NASA Gemini project was Vostok, which ultimately succeeded in placing Cosmonaut Yuri Gagarin into low earth orbit on April 12th, 1961. This was more than ten months ahead of NASA's successfully getting John Glenn into orbit the following February.

My capsule has been up until now entirely hand crafted, including the index pages and feeds. While I could continue doing so, this is not really sustainable in the long term and will most likely lead to me posting much less than I would otherwise. I don't want this. So about a week and a half ago I temporarily stopped work on other projects and began writing my own static gemini capsule generator, taking cues from Hugo and Zola. In the spirit of Glasnost I've named it Vostok.

Vostok is written in Rust. I actually began writing it in Zig, but after an hour's work which was less than productive decided to switch to Rust just because I want to get this banged out pretty quick and Rust has a more mature ecosystem. Zig would have been well up to the task, but I would have been writing a lot more of the code from scratch, and with the language still being immature there would have been the issue of long term maintenance as well. I just don't want to spend that much time on this tool. Design wise, Vostok is much like Hugo in that it uses front matter tospecify things like a page's title and publication date. I went with the Ron file format for front matter and configuration just because I find it interesting (Ron stands for Rusty Object Notation and reads much like Rust code) and have been wanting to use it for something for a while. Unlike Hugo, or Zola, or Jekyll, etc. Vostok does not have a "static" directory separate from it's content directory. It will process any gemtext files and just copy over everything else. There's also no development server, as it would truly be overkill for gemtext IMO, and since gemtext does not need massive styling there really aren't templates, either.

What it does provide though, is a lot of bookkeeping like adding links to the index pages, copyright and license information, optional gemini and atom feeds and the ability to leave pages in draft form until they are ready to be published. Posts and pages can also have tags for categorization, and every tag get's an index page. There's a fair amount of customization possible via "Config.ron", too. The current options are:
* Site title
* Author's name
* Author's email and homepage (both optional)
* The domain and an optional path from the domain root
* The number of gemlog entries to display on the homepage
* Which type(s) of feed to generate (currently only does Atom, but it will have Gemini feeds in the next few days)
* The license for the site (optional) which can be any of the creative commons licenses, or a custom license
* Whether to display an email link on each page

Vostok has reached a minimum viable state as of today. I'll probably try migrating the capsule over on Wednesday when I have a day off work. While my primary purpose in writing it was to scratch an itch, and to have my own custom tool for this capsule, the code is available on Codeberg should anyone be interested. Right now it's all completely undocumented and I was a complete bastard in that every single error just get's bubbled up to main, but that said I think it should be pretty robust and useful. I have a few ideas for the future, but nothing major. I may implement optionally including an ascii art banner from a file which would then be added to every page, for some branding. Also, currently there is no automatic link generation done for pages other than gemlog posts. But I figure with how easy gemtext is that's probably fine, and it's easy enough to just manually manage that aspect.

=> https://codeberg.org/jeang3nie/vostok Vostok source code on Codeberg
