{"id":29097477,"url":"https://github.com/lambdaisland/reitit-jaatya","last_synced_at":"2025-08-02T18:10:31.317Z","repository":{"id":45564228,"uuid":"382461306","full_name":"lambdaisland/reitit-jaatya","owner":"lambdaisland","description":"Freeze your reitit routes and create a static site out of it","archived":false,"fork":false,"pushed_at":"2023-12-05T12:24:54.000Z","size":64,"stargazers_count":23,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-07-08T17:25:36.570Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lambdaisland.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2021-07-02T20:50:37.000Z","updated_at":"2025-04-30T04:01:09.000Z","dependencies_parsed_at":"2024-04-17T14:20:36.363Z","dependency_job_id":null,"html_url":"https://github.com/lambdaisland/reitit-jaatya","commit_stats":{"total_commits":39,"total_committers":3,"mean_commits":13.0,"dds":"0.33333333333333337","last_synced_commit":"a70e7cfa9d18ad5ea8188aa8fae0c9ee017019b5"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":"lambdaisland/new-project","purl":"pkg:github/lambdaisland/reitit-jaatya","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdaisland%2Freitit-jaatya","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdaisland%2Freitit-jaatya/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdaisland%2Freitit-jaatya/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdaisland%2Freitit-jaatya/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lambdaisland","download_url":"https://codeload.github.com/lambdaisland/reitit-jaatya/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdaisland%2Freitit-jaatya/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266411619,"owners_count":23924346,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":[],"created_at":"2025-06-28T13:42:41.986Z","updated_at":"2025-08-02T18:10:31.285Z","avatar_url":"https://github.com/lambdaisland.png","language":"Clojure","funding_links":["http://opencollective.com/lambda-island"],"categories":[],"sub_categories":[],"readme":"# reitit-jäätyä\n\n\u003c!-- badges --\u003e\n[![cljdoc badge](https://cljdoc.org/badge/com.lambdaisland/reitit-jaatya)](https://cljdoc.org/d/com.lambdaisland/reitit-jaatya) [![Clojars Project](https://img.shields.io/clojars/v/com.lambdaisland/reitit-jaatya.svg)](https://clojars.org/com.lambdaisland/reitit-jaatya)\n\u003c!-- /badges --\u003e\n\n\u003c!-- gaiwan-ad --\u003e\n**This project is a part of the [Gaiwan Clojure family](https://gaiwan.co) of projects**.\n\n---\n\u003c!-- /gaiwan-ad --\u003e\n\n\u003e reitit means *routes* and *jäätyä* means freeze\n\nFreeze your reitit routes and create a static site out of it.\n\n## Why?\n\nThis library will allow you to create a static website out of your *existing*\ndynamic website as long as you're using reitit ;)\n\n## How?\n\nPoint jaatya to your reitit routes map and let it start the freezing process.\n\nJaatya will fake an http request and pass it along to the handler to record it's\nresponse. If a response is `200` then a new html page is created based on the\nurl route.\n\n## Features\n\n\u003c!-- installation --\u003e\n## Installation\n\nTo use the latest release, add the following to your `deps.edn` ([Clojure CLI](https://clojure.org/guides/deps_and_cli))\n\n```\ncom.lambdaisland/reitit-jaatya {:mvn/version \"0.2.40\"}\n```\n\nor add the following to your `project.clj` ([Leiningen](https://leiningen.org/))\n\n```\n[com.lambdaisland/reitit-jaatya \"0.2.40\"]\n```\n\u003c!-- /installation --\u003e\n\n## Rationale\n\n`reitit-jaatya` uses the reitit routes as the canonical source of the final website structure.\n\nGiven a HTTP handler and reitit routes definition, jaatya will mock HTTP requests to each route\nand create static files out of the successful HTTP responses.\n\nThere could be several reason why doing this might be better than simply using a traditional SSG:\n\n1. It allows the flexibility of building the website as a traditional server garnering all the benefits like tooling, repl driven development, no need to worry about startup times, etc.\n2. It gives the option to have a backend server always running (be it for admin dashboards, CMS, scheduling services, etc)\n3. Not sure if your website might need dynamic behaviour in the future? No need to decide now and lock yourself into a static site generator. Just build it as a dynamic site from the get-go but deploy the frozen version until you are ready to commit.\n4. Selectievely convert parts of your site to static version for higher performance\n\n## Usage\n\nThis sample code shows how to use reitit-jaatya in a project.\n\n``` clojure\n(ns mywebsite\n  (:require [reitit.ring :as ring]\n            [reitit.core :as r]))\n\n(defn test-handler [data]\n  {:status 200\n   :body \"test body\"})\n\n(def router\n  (ring/router\n    [\"/api\"\n    [\"/ping\" {:name ::ping :get test-handler :freeze-data-fn (fn []\n                                                                [{}])}]\n    [\"/user/:id/:name\" {:name :user/id :get test-handler\n                        :freeze-data-fn (fn []\n                                        [{:id 1 :name \"ox\"}\n                                         {:id 20 :name \"cyborg\"}])}]]))\n\n(def handler (ring/ring-handler router))\n\n;; default build\n;; creates the site in `_site` directory with no sitemap and no base-url in sitemap\n(iced handler)\n\n;; customised build\n(iced handler {:sitemap-path \"/sitemap\"\n                :build-dir \"_build\"\n                :base-url \"https://lambdaisland.com\"})\n```\n\n\n## Projects powered by reitit-jaatya\n\nGaiwan.co is the best example repo there is to view reitit-jaatya in action.\nWe're working to create a sample repo soon which can be forked so you can get\nstarted quickly.\n\n* [gaiwan.co](https://gaiwan.co) - [github.com/lambdaisland/gaiwan_co](https://github.com/lambdaisland/gaiwan_co)\n* [reClojure.org](https://reclojure.org) - [github.com/reclojure/reclojure.github.io/](https://github.com/reclojure/reclojure.github.io/)\n* [DevOps Enterprise Summit - Video Library](https://videos.itrevolution.com)\n\n\u003c!-- opencollective --\u003e\n## Lambda Island Open Source\n\n\u003cimg align=\"left\" src=\"https://github.com/lambdaisland/open-source/raw/master/artwork/lighthouse_readme.png\"\u003e\n\n\u0026nbsp;\n\nreitit-jaatya is part of a growing collection of quality Clojure libraries created and maintained\nby the fine folks at [Gaiwan](https://gaiwan.co).\n\nPay it forward by [becoming a backer on our Open Collective](http://opencollective.com/lambda-island),\nso that we may continue to enjoy a thriving Clojure ecosystem.\n\nYou can find an overview of our projects at [lambdaisland/open-source](https://github.com/lambdaisland/open-source).\n\n\u0026nbsp;\n\n\u0026nbsp;\n\u003c!-- /opencollective --\u003e\n\n\u003c!-- contributing --\u003e\n## Contributing\n\nEveryone has a right to submit patches to reitit-jaatya, and thus become a contributor.\n\nContributors MUST\n\n- adhere to the [LambdaIsland Clojure Style Guide](https://nextjournal.com/lambdaisland/clojure-style-guide)\n- write patches that solve a problem. Start by stating the problem, then supply a minimal solution. `*`\n- agree to license their contributions as MPL 2.0.\n- not break the contract with downstream consumers. `**`\n- not break the tests.\n\nContributors SHOULD\n\n- update the CHANGELOG and README.\n- add tests for new functionality.\n\nIf you submit a pull request that adheres to these rules, then it will almost\ncertainly be merged immediately. However some things may require more\nconsideration. If you add new dependencies, or significantly increase the API\nsurface, then we need to decide if these changes are in line with the project's\ngoals. In this case you can start by [writing a pitch](https://nextjournal.com/lambdaisland/pitch-template),\nand collecting feedback on it.\n\n`*` This goes for features too, a feature needs to solve a problem. State the problem it solves, then supply a minimal solution.\n\n`**` As long as this project has not seen a public release (i.e. is not on Clojars)\nwe may still consider making breaking changes, if there is consensus that the\nchanges are justified.\n\u003c!-- /contributing --\u003e\n\n\u003c!-- license --\u003e\n## License\n\nCopyright \u0026copy; 2021-2022 Arne Brasseur and Contributors\n\nLicensed under the term of the Mozilla Public License 2.0, see LICENSE.\n\u003c!-- /license --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambdaisland%2Freitit-jaatya","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flambdaisland%2Freitit-jaatya","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambdaisland%2Freitit-jaatya/lists"}