{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
    flake-utils.url = "github:numtide/flake-utils";
    blog.url = "git+https://dev.danilafe.com/Nix-Configs/blog-static-flake.git";
    blog.inputs.nixpkgs.follows = "nixpkgs";
  };

  outputs = { self, nixpkgs, flake-utils, blog, }:
    flake-utils.lib.eachDefaultSystem (system:
      let pkgs = import nixpkgs { inherit system; };
          builtBlog = blog.defaultPackage.${system};
          blogWithRelativeLinks = pkgs.stdenv.mkDerivation {
            name = "blogWithRelativeLinks";
            version = "1.0";
            buildInputs = [
              (pkgs.python3.withPackages (ps: [
                ps.beautifulsoup4
                ps.lxml
              ]))
            ];
            builtBlog = builtBlog;
            urlScript = pkgs.writeTextFile { name = "chatgpt-fix-root-URLs.py"; text = builtins.readFile ./scripts/chatgpt-fix-root-URLs.py; };
            builder = builtins.toFile "builder.sh" "
              source $stdenv/setup
              mkdir -p code $out
              cp -r $builtBlog/* code
              chmod -R u+w code
              (cd code && python3 $urlScript)
              cp -r code/* $out
            ";
          };
      in {
        devShell = pkgs.mkShell {
          packages = [
            pkgs.nodejs
            pkgs.yarn
            pkgs.chromium
            pkgs.python3
          ];

          # Configure to use system Chromium
          PLAYWRIGHT_CHROMIUM_PATH = "${pkgs.chromium}/bin/chromium";
          PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD = "1";

          # Expose the built blog package, which we'll be testing
          blogWithRelativeLinks = blogWithRelativeLinks;
        };
      }
    );
}

