{"id":21866869,"url":"https://github.com/rootmos/wwwo","last_synced_at":"2026-04-12T17:50:57.626Z","repository":{"id":82434460,"uuid":"222657871","full_name":"rootmos/wwwo","owner":"rootmos","description":"My continuation-passing style static website generator written in OCaml","archived":false,"fork":false,"pushed_at":"2024-11-05T21:54:37.000Z","size":3792,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-26T16:12:52.024Z","etag":null,"topics":["ocaml"],"latest_commit_sha":null,"homepage":"https://rootmos.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rootmos.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":"2019-11-19T09:26:48.000Z","updated_at":"2024-11-05T21:54:41.000Z","dependencies_parsed_at":"2024-05-17T07:41:44.450Z","dependency_job_id":"c080e416-859b-4de9-8adf-d333b3840f04","html_url":"https://github.com/rootmos/wwwo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootmos%2Fwwwo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootmos%2Fwwwo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootmos%2Fwwwo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootmos%2Fwwwo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rootmos","download_url":"https://codeload.github.com/rootmos/wwwo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244870829,"owners_count":20523937,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["ocaml"],"created_at":"2024-11-28T05:07:46.696Z","updated_at":"2026-04-12T17:50:52.563Z","avatar_url":"https://github.com/rootmos.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wwwo\n[![Build, upload and publish](https://github.com/rootmos/wwwo/actions/workflows/publish.yaml/badge.svg)](https://github.com/rootmos/wwwo/actions/workflows/publish.yaml)\n\nThis is my semi-static pseudo-dynamic website generator for [my homepage](https://rootmos.io):\n1. The content is gathered by a set of [tasks](tasks) implemented in Python, for example:\n   - scrapes a couple of S3 buckets\n   - GitHub and [sourcehut](https://sr.ht/) (using a [small wrapper](tasks/src/tasks/sourcehut.py) for it's [GraphQL API](https://man.sr.ht/git.sr.ht/graphql.md))\n   - Twitch\n2. which is then rendered into HTML using a custom continuation-passing style generator written in OCaml,\n3. a [Docker image to rule them all](Dockerfile) is built combining the necessary Python and OCaml build environments,\n   - note the poor man's package manager-like wrappers [around ocamlfind](bin/buildml)\n3. this image is executed periodically in an AWS Lambda function that publish the result to S3 and is\n4. hosted by an OpenBSD server created using my [own image builder](https://github.com/rootmos/openbsd).\n\nThe o in wwwo is simultaneously a reference to OCaml but primarily the goal naming style of [miniKanren](http://minikanren.org/).\n\n## The Html module\nA small [continuation-passing style](https://en.wikipedia.org/wiki/Continuation-passing_style) HTML generator.\n\nThe following small example:\n```ocaml\nopen Html\n\nlet page = () |\u003e html @@ seq [\n    head @@ seq [\n        title \"Hello\";\n    ];\n    body @@ seq [\n        h1 @@ text \"Hello\";\n    ];\n]\n\nlet () = Utils.write_file \"hello.html\" page\n```\ngenerates the following HTML (after pretty-printing using [tidy](http://www.html-tidy.org/)):\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003ctitle\u003e\n      Hello\n    \u003c/title\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003ch1\u003e\n      Hello\n    \u003c/h1\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\nThe [module](generator/src/html.ml) has the following interface:\n```ocaml\ntype 'a t = 'a -\u003e string\n\nval html : 'a t -\u003e 'a t\nval body : 'a t -\u003e 'a t\nval head : 'a t -\u003e 'a t\n\nval noop : 'a t\nval seq : ('a -\u003e string) list -\u003e 'a t\n\nval title : string -\u003e 'a t\nval favicon : ?embedd:bool -\u003e string -\u003e 'a -\u003e string\n\nval text : string -\u003e 'a t\nval html_escape_string : String.t -\u003e string\n\nval tag :\n  ?id:string option -\u003e\n  ?cls:string option -\u003e ?style:string option -\u003e string -\u003e 'a t -\u003e 'a t\n\nval p :\n  ?cls:string option -\u003e\n  ?id:string option -\u003e ?style:string option -\u003e 'a t -\u003e 'a t\n\nval h1 : 'a t -\u003e 'a t\nval h2 : 'a t -\u003e 'a t\n\nval ul : ?cls:string option -\u003e 'a t list -\u003e 'a t\nval ul' : ?cls:string option -\u003e 'a t list -\u003e 'a t\nval ol : 'a t list -\u003e 'a -\u003e string\nval li : ?cls:string option -\u003e 'a t -\u003e 'a t\n\nval table : ?widths:int list option -\u003e 'a t list list -\u003e 'a t\n\nval div :\n  ?id:string option -\u003e\n  ?cls:string option -\u003e ?style:string option -\u003e 'a t -\u003e 'a t\nval span : ?cls:string -\u003e ('a -\u003e string) -\u003e 'a -\u003e string\n\nval audio : ?id:string -\u003e Camomile.UTF8.t -\u003e 'a t\nval video : ?id:string -\u003e ?poster:string option -\u003e Camomile.UTF8.t -\u003e 'a t\nval canvas : string -\u003e int -\u003e int -\u003e 'a t\n\nval a : Camomile.UTF8.t -\u003e ('a -\u003e string) -\u003e 'a -\u003e string\nval button : string -\u003e ('a -\u003e string) -\u003e 'a -\u003e string\n\nval img :\n  ?id:string -\u003e\n  ?embed:bool -\u003e\n  ?lazy_loading:bool -\u003e\n  ?cls:string option -\u003e\n  ?alt:string option -\u003e ?onclick:string option -\u003e string -\u003e 'a -\u003e string\nval img_b64 :\n  ?cls:string option -\u003e\n  ?alt:string option -\u003e string -\u003e string -\u003e 'a -\u003e string\nval svg : ?cls:string -\u003e string -\u003e 'a t\n\nval js_src : string -\u003e 'a -\u003e string\nval minimize_css : string -\u003e string\nval css : string list -\u003e 'a t\nval minimize_js : string -\u003e string\nval script : string -\u003e 'a t\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootmos%2Fwwwo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frootmos%2Fwwwo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootmos%2Fwwwo/lists"}