website

Yet another NIH static website framework.

The idea is to have a single website for ALL my stuff: blogs, projects, talks, random notes, etc.

Why?

For a long time, I've wanted to have simple project pages for my open source projects integrated into my website/blog. The easiest way to do this would be to write proper README.md files in the Git repositories and have them rendered and included in my website. This way, both my website and the repositories would serve as proper documentation endpoints, with all data synchronized.

However, implementing such advanced features that require API interaction is not trivial in blogc. Or maybe I'm getting too old to implement parsers/renderers in C—who knows? In the end, it was easier to slowly implement what I wanted in Go over the past few months. Also, the standard Go text/template library makes it easy to handle a variety of post/page formats from the same base templates, which is something I'll likely need.

The code is somewhat generic (writing code that way is just stronger than me), but that's it: there's no documentation or usage examples, and my content repository is private. This program is open source, but if you decide to use it, you're on your own. There are some quite interesting code snippets in this codebase, though. Make sure to take a look if you like Go :-).

Some cool features

  • Generation of project pages from GitHub READMEs.
  • Generation of project API documentation, similar to Doxygen, but simpler and focused on C.
  • Embedded default templates.
  • JavaScript/CSS assets downloaded directly from CDN to be hosted locally.
  • Runner can rebuild output files when the binary is rebuilt or any source file changes.
  • Supports groups of posts.
  • Automatic generation of OpenGraph metadata and images.
  • Atom feeds for the main blog and every group of posts.
  • QR Code encoder.
  • Go vanity import paths.
  • textbundle and textpack support.
  • Post-processing of generated files, such as compression, quantizing, minification, etc.

Versioning

This software will never receive an official release, but it uses the default version string generated by the Go compiler during the build process. Example: v0.0.0-20241101101234-a1b2c3d4e5f6.

License

This code is released under a BSD 3-Clause License.

Project Metadata
Website: https://rafaelmartins.com
Main License: BSD-3-Clause
API Documentation
rafaelmartins.com/p/website
Project Statistics
Stars: 0
Watching: 1
Forks: 1
Updated: