site/public/blog/site/index.gmi

24 lines
1.8 KiB
Plaintext

# I made a website
***Note: This is outdated. I have rewritten the site with Hugo, and the solution described here was never hosted***
I made a website! And a blog! It remains to be seen how much I'll use it, but I'll at least make a post on how I made it
The site uses a very convoluted static site generator I wrote with makefiles and pandoc, the source of which can be found in the header of my website, along with that of the rest of this site (not that I would recommend using it. This was a very stupid idea kept going by sunk cost and pride). While the site's main pages are currently written in HTML and inserted into a template with pandoc (I may explore rewriting the main contents of the site in markdown), the blog posts are written in markdown and also converted using pandoc. Commonly shared elements like headers and footers are done with Pandoc templates.
I had initially used markdown instead of pandoc to convert the blog pages to HTML, and used Perl's regular expressions to find-and-replace markers I had placed in templates with content, but frankly this was a stupid idea.
The backend is written in Rust, with rocket.rs [1]. I didn't particularly have the need for performance that Rust provides, but I like Rust and I like the way that Rocket works. It's a very simple implementation, with routes for the index, 404 page, and anything in the static/web/ and static/atom/ directories.
I eventually plan to add Gemini support as well, with rewrites of the main pages and the same blog posts being converted to Gemtext as well at HTML, but this will take some additional work as it is not supported in Pandoc.
The blog pages are also made into an Atom feed, also generated with pandoc.
## References
=> https://rocket.rs [1] rocket.rs (https://rocket.rs)
=> / Back to the Index
=> https://mossfet.xyz//blog/site/ View this article on the WWW