Source code of the website deployed at https://chris.netsoj.nl/ https://chris.netsoj.nl/
Find a file
Chris Josten 6874b14916 style: move to grid layout from flex
This allows to reposition items without hiding/showing classes
2024-10-12 20:37:26 +02:00
public/static style: move to grid layout from flex 2024-10-12 20:37:26 +02:00
source/nl/netsoj/chris/blog Update dmd version + dependencies 2023-12-08 22:52:11 +01:00
translations Update copyright year 2024-10-12 14:04:51 +02:00
views style: move to grid layout from flex 2024-10-12 20:37:26 +02:00
.gitignore Add accidentally removed files 2021-03-10 18:45:12 +01:00
default.nix Initial commit 2020-06-24 10:08:28 +02:00
defaultClasses.lua Add more support for internationalisation, style changes 2021-03-11 17:22:40 +01:00
dub.json Fix building on NixOS 2022-09-15 20:29:06 +02:00
dub.selections.json Update dmd version + dependencies 2023-12-08 22:52:11 +01:00
dub.selections.nix Update dub selections 2023-12-08 22:59:09 +01:00
LICENSE.md Refractor code 2021-06-22 01:37:51 +02:00
mijnblog.nix Bump version to 0.0.3 2023-12-08 22:57:15 +01:00
mkDub.nix Fix building on NixOS 2022-09-15 20:29:06 +02:00
README.md Added README 2020-06-24 22:04:51 +02:00
shell.nix Initial commit 2020-06-24 10:08:28 +02:00

The source code of my website

Features

An overview of the features of this piece of software:

  • Parses MarkDown files and transforms it into webpages (well, most of the credit goes to Pandoc)
  • Automatically adds new pages/posts when added in their respective directories.
  • D should be fast, and I've tried to move all the computationally expensive parts to occur only when adding/removing pages. Templates are compiled to native code when this software is compiled.

Limitations

  • Assumes all posts fit into memory
    • I'm going to resolve this either by either lazy-loading the posts into memory (while keeping metadata) or by transforming this piece of software into an static website generator.
  • Really only meant as a blog for people with some kind of technical skill.
    • Writing MarkDown is not for everyone and remembering the MetaData keys.
    • It has no GUI for writing posts.
  • Assumes you trust its page authors.
    • Although you could prevent people from editing each others articles by placing them into subfolders with distinct user rights, you cannot prevent people from faking metadata.
    • Blog writers can inject arbitrary HTML and JavaScript in their pages.
  • A lot is hard coded:
    • Menu items
      • should be able to be configured via a configuration file
    • Page types (Page, Article, Project et cetera).
      • Not planning on changing this. Theoretically it shouldn't be too hard since they mostly are a definition of required/optional metadata properties but since the templates are compiled to D code, that means that also has to be compiled. If you can compile software, you most likely could also copy some code, modify it to your needs and call it a day. Routes are also hard coded and so on.
    • Routes are hardcoded
    • Basic server settings like bind address, port, ssl certificates.
      • Should be able to be set via a configuration file or command line parameters.
    • Templates
      • This is a feature of Diet, the template language I'm using.

Dependencies

This program assumes pandoc is installed and is in your $PATH. Ohter dependencies are resolved with dub.

Deploying

The built binary must be executed with the public directory in its working directory. It is hardcoded to listen on 3465 on "0.0.0.0" on HTTP (not HTTPS)! It is intended to be deployed behind a reverse proxy.