{"id":15061150,"url":"https://github.com/pataphysicalsociety/soupault","last_synced_at":"2025-04-05T06:10:22.757Z","repository":{"id":50229834,"uuid":"189859431","full_name":"PataphysicalSociety/soupault","owner":"PataphysicalSociety","description":"Static website generator based on HTML element tree rewriting","archived":false,"fork":false,"pushed_at":"2024-09-06T12:11:48.000Z","size":1003,"stargazers_count":378,"open_issues_count":12,"forks_count":18,"subscribers_count":11,"default_branch":"main","last_synced_at":"2024-10-29T15:54:21.554Z","etag":null,"topics":["hacktoberfest","html-processor","lua","ocaml","static-site-generator","web"],"latest_commit_sha":null,"homepage":"https://soupault.app","language":"OCaml","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PataphysicalSociety.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-02T14:54:40.000Z","updated_at":"2024-10-20T16:45:30.000Z","dependencies_parsed_at":"2023-09-26T21:20:37.113Z","dependency_job_id":"87c3b81f-3ee7-41fb-a43e-d3d79c2c752e","html_url":"https://github.com/PataphysicalSociety/soupault","commit_stats":{"total_commits":854,"total_committers":9,"mean_commits":94.88888888888889,"dds":"0.015222482435597207","last_synced_commit":"6f4790d94d2753ee4b64c7d218d4d5c16a2eb3fc"},"previous_names":["dmbaturin/soupault"],"tags_count":50,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PataphysicalSociety%2Fsoupault","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PataphysicalSociety%2Fsoupault/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PataphysicalSociety%2Fsoupault/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PataphysicalSociety%2Fsoupault/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PataphysicalSociety","download_url":"https://codeload.github.com/PataphysicalSociety/soupault/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247294541,"owners_count":20915340,"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":["hacktoberfest","html-processor","lua","ocaml","static-site-generator","web"],"created_at":"2024-09-24T23:09:51.837Z","updated_at":"2025-04-05T06:10:22.740Z","avatar_url":"https://github.com/PataphysicalSociety.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"soupault\n========\n\n![Build](https://github.com/PataphysicalSociety/soupault/actions/workflows/main.yml/badge.svg)\n![GitHub all releases](https://img.shields.io/github/downloads/PataphysicalSociety/soupault/total)\n\nSoupault is an HTML manipulation tool. It can be a static site generator\nor an HTML (post-)processor for existing websites and allows you to define \n\nSoupault works with the HTML element tree of the page, so it can do many things that traditionally could be done with client-side JS:\ninject new HTML into existing complete pages, create a table of contents that respects and uses `id`'s of HTML headings and more.\n\nIt also doesn't use front matter but extracts metadata from HTML instead: you tell it what to extract using CSS3 selectors,\nso even hand-written static pages can be indexed rather than treated as opaque assets.\n\nFor example, here's what a content model for a blog may look like:\n\n```toml\n# Post title\n[index.fields.title]\n  # Try to find \u003ch1 id=\"post-title\"\u003e,\n  # else use the first \u003ch1\u003e \n  selector = [\"h1#post-title\", \"h1\"]\n\n  # Fail the build if post title cannot be found\n  required = true\n\n# Post excerpt\n[index.fields.excerpt]\n  # Use \u003cp id=\"post-excerpt\"\u003e if a page has it,\n  # else use the first paragraph.\n  # This allows using a paragraph other than the first one\n  # as the post excerpt.\n  selector = [\"p#post-excerpt\", \"p\"]\n\n# Post date\n[index.fields.date]\n  selector = [\"time#post-date\", \"time\"]\n\n  # Extract the datetime=\"\" attribute from the \u003ctime\u003e element,\n  # if it's set.\n  extract_attribute = \"datetime\"\n\n  # If there's no datetime attribute in \u003ctime\u003e,\n  # then use that element's content\n  fallback_to_content = true\n```\n\nExtracted metadata can then be rendered and injected into pages:\n\n```toml\n[index.views.blog]\n  # Insert rendered data into the element that matches \"#blog-index\" CSS selector.\n  index_selector = \"#blog-index\"\n  index_item_template = \"\"\"\n    \u003ch2\u003e\u003ca href=\"{{url}}\"\u003e{{title}}\u003c/a\u003e\u003c/h2\u003e\n    \u003cp\u003e\u003cstrong\u003eLast update:\u003c/strong\u003e {{date}}.\u003c/p\u003e\n    \u003cp\u003e{{excerpt}}\u003c/p\u003e\n    \u003ca href=\"{{url}}\"\u003eRead more\u003c/a\u003e\n  \"\"\"\n```\n\nSoupault is...\n\n* Durable and easy to upgrade or roll back: it's available as a statically-linked binary with no dependencies.\n* Extensible: you can bring your own [page preprocessors](https://soupault.app/reference-manual/#page-preprocessors)\n  (e.g., Markdown to HTML convertors), define [asset processors](https://soupault.app/reference-manual/#asset-processing)\n  (e.g., a Sass/Less compiler, an image optimizer),\n  pipe HTML elements through [external programs](https://soupault.app/reference-manual/#preprocess-element-widget),\n  and load [Lua plugins](https://soupault.app/plugins/).\n* Flexible: most options are configurable, most built-in features can be reimplemented as Lua plugins,\n  and there are [page processing hooks](https://soupault.app/reference-manual/#page-processing-hooks).\n\nSoupault is named after [Philippe Soupault](https://en.wikipedia.org/wiki/Philippe_Soupault),\na French dadaist and surrealist writer and poet,\nbecause it uses [lambdasoup](http://aantron.github.io/lambdasoup/) library to work with tag soups.\n\nVisit [soupault.app](https://www.soupault.app) for details.\n\nFor support and discussion, write a message to the [mailing list](https://lists.sr.ht/~dmbaturin/soupault).\n\n# Installation\n\nPrebuilt binaries are available for Linux (x86-64 and Aarch64), Windows, and macOS (x86-64).\nYou can download them from https://files.baturin.org/software/soupault\nand from GitHub releases (https://github.com/PataphysicalSociety/soupault/releases).\n\nYou can verify release archive integrity using this minisign key:\n\n```\nminisign -VP RWRfW+gkhk/+iA7dOUtTio6G6KeJCiAEp4Zfozw7eqv2shN90+5z20Cy -m \u003cfile\u003e\n```\n\nYou can also install stable release versions from [OPAM](https://opam.ocaml.org):\n\n```sh\nopam install soupault\n```\n\nFinally, you can build the latest development version with:\n\n```sh\nopam pin add git+https://github.com/PataphysicalSociety/soupault\n```\n\nTo build static binaries, you need to install OCaml with musl runtime,\nthen use the `static` Dune profile:\n\n```\n# For OCaml 4.14.2, adjust for your desired version\nopam switch create 4.14.2-musl ocaml-variants.4.14.2+options ocaml-option-musl ocaml-option-static\nopam switch 4.14.2-musl\n\n# Build static binaries\ndune build --profile=static\n```\n\n# Contributing\n\nBug reports and patches are always welcome. Feature requests and new features are also welcome,\nbut please consider discussing them with the maintainer first.\n\nYou can contribute either through [GitHub](https://github.com/PataphysicalSociety/soupault)\nor through [Codeberg](https://codeberg.org/PataphysicalSociety/soupault).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpataphysicalsociety%2Fsoupault","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpataphysicalsociety%2Fsoupault","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpataphysicalsociety%2Fsoupault/lists"}