{"id":51627153,"url":"https://github.com/tonyaldon/jack","last_synced_at":"2026-07-13T02:33:12.491Z","repository":{"id":103354133,"uuid":"562183323","full_name":"tonyaldon/jack","owner":"tonyaldon","description":"jack is a HTML generator library for Emacs Lisp.","archived":false,"fork":false,"pushed_at":"2023-11-12T06:12:51.000Z","size":211,"stargazers_count":28,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-17T09:12:44.432Z","etag":null,"topics":["emacs-lisp","html","html-generation","html-generator"],"latest_commit_sha":null,"homepage":"https://jack.tonyaldon.com","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tonyaldon.png","metadata":{"files":{"readme":"README.org","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-11-05T15:06:04.000Z","updated_at":"2024-03-02T08:05:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"fc30a3f7-d306-40ac-8e85-f2d81698ff03","html_url":"https://github.com/tonyaldon/jack","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tonyaldon/jack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonyaldon%2Fjack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonyaldon%2Fjack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonyaldon%2Fjack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonyaldon%2Fjack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tonyaldon","download_url":"https://codeload.github.com/tonyaldon/jack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonyaldon%2Fjack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35408466,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-13T02:00:06.543Z","response_time":119,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["emacs-lisp","html","html-generation","html-generator"],"created_at":"2026-07-13T02:33:11.729Z","updated_at":"2026-07-13T02:33:12.485Z","avatar_url":"https://github.com/tonyaldon.png","language":"Emacs Lisp","funding_links":[],"categories":[],"sub_categories":[],"readme":"~jack~ is a HTML generator library for Emacs Lisp.\n\nTo install it put ~jack.el~ file in your load path and require ~jack~\nlike this:\n\n#+BEGIN_SRC emacs-lisp\n(require 'jack)\n#+END_SRC\n\n~jack~ provides the function ~jack-html~ that takes a data structure\nas input representing the HTML tree you want to generate and generates it\nas a string.\n\nFor instance:\n\n#+BEGIN_SRC emacs-lisp\n(jack-html '(:section (:div (:p \"foo\"))))\n;; \"\u003csection\u003e\u003cdiv\u003e\u003cp\u003efoo\u003c/p\u003e\u003c/div\u003e\u003c/section\u003e\"\n#+END_SRC\n\nHTML attributes are specified in a list starting by the ~@~ sign\n\n#+BEGIN_SRC emacs-lisp\n(jack-html '(:div (@ :id \"id\" :class \"class\" :style \"color:red;\") \"foo\"))\n;; \"\u003cdiv id=\\\"id\\\" class=\\\"class\\\" style=\\\"color:red;\\\"\u003efoo\u003c/div\u003e\"\n#+END_SRC\n\nIn the keyword defining the HTML tag you can use ~/~ to declare its\n~id~ and ~.~ to declare its classes like this:\n\n#+BEGIN_SRC emacs-lisp\n(jack-html '(:div/id.class-1.class-2\n             (@ :class \"class-3\" :style \"color:red;\")\n             \"foo\"))\n;; \"\u003cdiv id=\\\"id\\\" class=\\\"class-1 class-2 class-3\\\" style=\\\"color:red;\\\"\u003efoo\u003c/div\u003e\"\n#+END_SRC\n\nNote that I would have prefered to use ~#~ for declaring the ~id~ but it\nhas to be escaped in keywords which is ugly.\n\nTag content can be lists of components:\n\n#+BEGIN_SRC emacs-lisp\n(jack-html '(:ul ((:li \"1\") (:li \"2\"))))\n;; \"\u003cul\u003e\u003cli\u003e1\u003c/li\u003e\u003cli\u003e2\u003c/li\u003e\u003c/ul\u003e\"\n\n(jack-html '(:ul (@ :id \"id\") ((:li \"1\") (:li \"2\"))))\n;; \"\u003cul id=\\\"id\\\"\u003e\u003cli\u003e1\u003c/li\u003e\u003cli\u003e2\u003c/li\u003e\u003c/ul\u003e\"\n#+END_SRC\n\nComponents can be generated by a forms:\n\n#+BEGIN_SRC emacs-lisp\n(jack-html `(:p ,(concat \"foo-\" \"bar\")))\n;; \"\u003cp\u003efoo-bar\u003c/p\u003e\"\n\n(jack-html (mapcar (lambda (n) `(:p ,n)) '(1 2 3)))\n;; \"\u003cp\u003e1\u003c/p\u003e\u003cp\u003e2\u003c/p\u003e\u003cp\u003e3\u003c/p\u003e\"\n#+END_SRC\n\nTag content can be forms:\n\n#+BEGIN_SRC emacs-lisp\n(jack-html `(:ul ,(mapcar (lambda (n) `(:li ,n)) '(1 2))))\n;; \"\u003cul\u003e\u003cli\u003e1\u003c/li\u003e\u003cli\u003e2\u003c/li\u003e\u003c/ul\u003e\"\n\n(jack-html `(:ul (@ :id \"id\")\n             ,(mapcar (lambda (n) `(:li ,n)) '(1 2))))\n;; \"\u003cul id=\\\"id\\\"\u003e\u003cli\u003e1\u003c/li\u003e\u003cli\u003e2\u003c/li\u003e\u003c/ul\u003e\"\n#+END_SRC\n\nTag content and attributes can be variables:\n\n#+BEGIN_SRC emacs-lisp\n(let ((x \"foo\") (y \"bar\"))\n  (jack-html `(:p (@ :id ,x) ,y)))\n;; \"\u003cp id=\\\"foo\\\"\u003ebar\u003c/p\u003e\"\n\n(jack-html\n (let ((x \"foo\") (y \"bar\"))\n   `(:p (@ :id ,x) ,y)))\n;; \"\u003cp id=\\\"foo\\\"\u003ebar\u003c/p\u003e\"\n#+END_SRC\n\nIf the variable ~jack-html-raise-error-p~ is set to ~nil~, which is the\ndefault value, ~jack-html~ processes non component object as the empty\nstring.\n\nLet's consider the case of the vector like ~[a b c]~ that is not a\ncomponent for ~jack-html~.\n\nWe have\n\n#+BEGIN_SRC emacs-lisp\n(let ((jack-html-raise-error-p nil))\n  (jack-html \"foo\" [a b c] \"bar\"))\n;; \"foobar\"\n#+END_SRC\n\nand,\n\n#+BEGIN_SRC emacs-lisp\n(let ((jack-html-raise-error-p t))\n  (jack-html \"foo\" [a b c] \"bar\"))\n#+END_SRC\n\nwhich raises the error:\n\n#+BEGIN_SRC text\nObject '[a b c]' of type 'vector' can't be a component in 'jack-html'\n#+END_SRC\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftonyaldon%2Fjack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftonyaldon%2Fjack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftonyaldon%2Fjack/lists"}