Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

My current personal site (https://knlb.dev) is built with a single 500 line python file that starts with

  #!/usr/bin/env -S uv run --script
  # -*- mode: python -*-
  #
  # /// script
  # requires-python = ">=3.12"
  # dependencies = [
  #    "pyyaml", "flask", "markdown-it-py",
  #    "linkify-it-py", "mdit-py-plugins"
  # ]
  # ///
The HTML templates & CSS are baked into the file which is why it's so long. flask so that I can have a live view locally while writing new notes.

uv's easy dependency definition really made it much easier to manage these. My previous site was org exported to html and took much more effort.

(With the conceit that the website is a "notebook" I call this file "bind").



Do you have the whole thing available? I love SSGs, especially personal ones.


Not the latest one just yet, I still want to play with it a lot more / bake in some more features -- but it's also terribly simple and doesn't do much at the moment.

The org mode one is at https://explog.in/config.html.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: