{"id":40335744,"url":"https://github.com/nixcloud/pankat-rs","last_synced_at":"2026-01-20T08:34:41.259Z","repository":{"id":272300577,"uuid":"915718893","full_name":"nixcloud/pankat-rs","owner":"nixcloud","description":"pankat - static blog generator","archived":false,"fork":false,"pushed_at":"2025-06-30T09:34:49.000Z","size":3554,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-06-30T10:38:27.157Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://lastlog.de/blog","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nixcloud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-12T16:16:53.000Z","updated_at":"2025-06-30T09:34:53.000Z","dependencies_parsed_at":"2025-01-13T15:38:38.165Z","dependency_job_id":"11df1c3a-890f-472f-a9ee-bc4ab094a44f","html_url":"https://github.com/nixcloud/pankat-rs","commit_stats":null,"previous_names":["nixcloud/pankat-replit","nixcloud/pankat-rs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nixcloud/pankat-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nixcloud%2Fpankat-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nixcloud%2Fpankat-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nixcloud%2Fpankat-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nixcloud%2Fpankat-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nixcloud","download_url":"https://codeload.github.com/nixcloud/pankat-rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nixcloud%2Fpankat-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28599077,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T02:08:49.799Z","status":"ssl_error","status_checked_at":"2026-01-20T02:08:44.148Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-20T08:34:41.168Z","updated_at":"2026-01-20T08:34:41.243Z","avatar_url":"https://github.com/nixcloud.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# motivation\n\n# what\n**pankat** is a **static blog generator** inspired by [joey hess's ikiwiki](https://ikiwiki.info/users/joey/).\n\n![A screenshot featuring pankat](./.screenshots/pankat.jpg)\n\nnotable features:\n\n* writing / reading aid\n  * **markdown** syntax for writing articles\n  * **table of contents** using jquery.tocify.min.js\n  * **dynamic page anchors** (similar to anchor.js)\n  * `[[!draft]]` mode support\n  * **live updates** of article changes via websocket using **file system changes monitoring** in the documents folder\n  * full git support\n* minimalistic approach:\n  * **pankat instance creates static html** documents\n  * uses **sqlite database**\n  * manage **documents with git**\n  * hosting of documents with **nginx**\n* **out of source** document builds\n\n* full **theme-support**, asset folder contains\n  * templates\n  * css\n  * js\n  * fonts\n\n# run\n\n    nix develop\n    just run\n\nthis command executes the WASM build, copies artefacts and starts the webserver. \n\n## configuration file\n\npankat supports:\n\n* **command line** (see `pankat --help` for details)\n* **environment variables** (most likely only used for these)\n  * PANKAT_JWT_SECRET\n  * PANKAT_ADMIN_PASSWORD\n* config file `pankat.toml`\n  * see the [pankat.toml](pankat.toml) for documentation\n\n# architecture\n\n![architecture](internals.svg)\n\n# supported platforms\n\n* linux (with nix)\n* windows (untested)\n\n## dependencies\n\n* rust\n* pandoc 3.x\n* (see flake.nix dependencies)\n\n# sqlite database\n\nused for:\n\n* storing parsed article structure\n* article cache (so we don't need to run pandoc each tim)\n\npankat uses `diesel` to query the database.\n\n## extend schema\n\n    diesel print-schema \u003e src/db/schema.rs\n\n# development\n\n* run the tests `just test`\n* `just run`, then connect to localhost:5000 with any webbrowser\n* you can delete **documents/output** and **documents/pankat.sqlite** then start `pankat` again\n* use the `documents/example.de` documents, theme contributions are welcome\n\n# deployment\n\ncurrently: `just run`, then `cp target/debug/pankat /home/pankat-app/pankat`.\n\nideally: `just zig`, then `cp target/release/pankat /home/pankat-app/pankat` and later using a nix expression to build and use a read-only /nix/store for both pankat binary and artifacts.\n\n## directory structure\n\n```bash\n/etc/nixos\u003e ls /home/pankat-app/\n╭───┬──────────────────────────────┬──────┬──────────┬─────────────╮\n│ # │             name             │ type │   size   │  modified   │\n├───┼──────────────────────────────┼──────┼──────────┼─────────────┤\n│ 0 │ /home/pankat-app/documents   │ dir  │    108 B │ 8 hours ago │\n│ 1 │ /home/pankat-app/pankat      │ file │ 117.6 MB │ 9 hours ago │\n│ 2 │ /home/pankat-app/pankat.toml │ file │    948 B │ 9 hours ago │\n╰───┴──────────────────────────────┴──────┴──────────┴─────────────╯\n\n/etc/nixos\u003e ls /home/pankat-app/documents/\n╭───┬────────────────────────────────────────────┬──────┬─────────┬─────────────╮\n│ # │                    name                    │ type │  size   │  modified   │\n├───┼────────────────────────────────────────────┼──────┼─────────┼─────────────┤\n│ 0 │ /home/pankat-app/documents/assets          │ dir  │    58 B │ 9 hours ago │\n│ 1 │ /home/pankat-app/documents/blog.lastlog.de │ dir  │    48 B │ a day ago   │\n│ 2 │ /home/pankat-app/documents/lastlog.de      │ dir  │    10 B │ a day ago   │\n│ 3 │ /home/pankat-app/documents/output          │ dir  │ 11.1 kB │ 8 hours ago │\n│ 4 │ /home/pankat-app/documents/pankat.sqlite   │ file │  2.4 MB │ 8 hours ago │\n│ 5 │ /home/pankat-app/documents/wasm            │ dir  │   188 B │ 9 hours ago │\n╰───┴────────────────────────────────────────────┴──────┴─────────┴─────────────╯\n```\n\n# configuration.nix\n\nthis config makes sure that nginx does all the serving in production and only the /api/ws is from `pankat`. yet\nlive-updates are properly served and html documents in `documents/output` are properly updated on fs-changes.\n\n```nix\nusers.users = {\n  pankat-app = {\n    isSystemUser = true;\n    home = \"/pankat-app\";\n    group = \"pankat-app\";\n    description = \"pankat app users\";\n  };\n};\nusers.groups.pankat-app = {};\n\nsecurity.acme = {\n  acceptTerms = true;\n  defaults.email = \"info@nixcloud.io\";\n};\n\nservices.nginx = {\n  enable = true;\n  recommendedGzipSettings = true;\n  recommendedOptimisation = true;\n  virtualHosts = {\n    lastlogblog = {\n      serverName = \"lastlog.de\";\n      serverAliases = [ \"www.lastlog.de\" ];\n      forceSSL = true;\n      enableACME = true;\n      extraConfig = ''\n        location /blog/api/ws {\n          proxy_pass http://127.0.0.1:5000;\n          proxy_set_header Host $host;\n          proxy_http_version 1.1;\n          proxy_set_header Upgrade $http_upgrade;\n          proxy_set_header Connection \"upgrade\";\n          proxy_read_timeout 86400;\n        }\n        location ^~ /blog/posts/ {\n          alias /pankat-app/documents/blog.lastlog.de/posts/;\n          autoindex on;\n        }\n        location ^~ /blog/media/ {\n          alias /pankat-app/documents/blog.lastlog.de/media/;\n          autoindex on;\n        }\n        location ^~ /blog/assets/ {\n          alias /pankat-app/documents/assets/;\n          autoindex on;\n        }\n        location ^~ /blog/wasm/ {\n          alias /pankat-app/documents/wasm/;\n          autoindex on;\n        }\n        location ^~ /blog/ {\n          alias /pankat-app/documents/output/;\n          autoindex on;\n        }\n        location = / {\n          return 301 https://lastlog.de/blog/index.html;\n        }\n        location = /blog {\n          return 301 https://lastlog.de/blog/index.html;\n        }\n      '';\n    };\n  };\n};\n```\n# commands\n\n```bash\nsetfacl -d -m u:joachim:rwx /pankat-app\nsetfacl -R -m u:joachim:rx /pankat-app\nsetfacl -R -m u:nginx:rx /pankat-app\nsetfacl -d -m u:nginx:rx /pankat-app\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnixcloud%2Fpankat-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnixcloud%2Fpankat-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnixcloud%2Fpankat-rs/lists"}