{"id":23651497,"url":"https://github.com/athanclark/markup","last_synced_at":"2025-09-01T02:32:07.628Z","repository":{"id":24423276,"uuid":"27824426","full_name":"athanclark/markup","owner":"athanclark","description":"Generic interface to markup languages","archived":false,"fork":false,"pushed_at":"2019-12-29T22:00:16.000Z","size":5433,"stargazers_count":1,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-26T01:02:04.363Z","etag":null,"topics":["deployment-schemes","generic-interface","haskell","monad","urlpath"],"latest_commit_sha":null,"homepage":null,"language":"Haskell","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/athanclark.png","metadata":{"files":{"readme":"README.md","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}},"created_at":"2014-12-10T14:54:09.000Z","updated_at":"2019-12-29T22:00:18.000Z","dependencies_parsed_at":"2022-08-22T22:10:25.960Z","dependency_job_id":null,"html_url":"https://github.com/athanclark/markup","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/athanclark/markup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athanclark%2Fmarkup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athanclark%2Fmarkup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athanclark%2Fmarkup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athanclark%2Fmarkup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/athanclark","download_url":"https://codeload.github.com/athanclark/markup/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athanclark%2Fmarkup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273065037,"owners_count":25039274,"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-09-01T02:00:09.058Z","response_time":120,"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":["deployment-schemes","generic-interface","haskell","monad","urlpath"],"created_at":"2024-12-28T16:38:07.612Z","updated_at":"2025-09-01T02:32:07.224Z","avatar_url":"https://github.com/athanclark.png","language":"Haskell","readme":"[![MIT License](http://img.shields.io/badge/license-MIT-brightgreen.svg)](https://tldrlegal.com/license/mit-license)\n[![Hackage](http://img.shields.io/badge/hackage-0.0.3-brightgreen.svg)](https://hackage.haskell.org/package/markup)\n[![Stories in Ready](https://badge.waffle.io/athanclark/markup.png?label=ready\u0026title=Ready)](https://waffle.io/athanclark/markup)\n\nmarkup\n======\n\n\u003e **WARNING**: This project is in it's infancy, please don't expect it to work. \n\u003e Thank you :)\n\nA generic interface to chunks of markup.\n\nIn this library, we try to ambiguate _types_ of markup via data types, namely \n`Image` and `JavaScript` as examples. From here, we can issue a call to \n`renderMarkup` on these abstract labels, which will return some markup wrapped \nin a monad - in our case, we've made a few monad readers to represent the \ndifferent ways a single idea can be deployed as markup.\n\nWe have three different deployment schemes - inline, hosted, and local. Inline \nmarkup simply tries to take the information in question and insert it inside the \nmarkup. Hosted markup simply takes the idea and expects it to be somewhere else, \npossibly hosted in a CDN. Local markup tries to utilize \n[urlpath](https://github.com/athanclark/urlpath) as the means of representing a \nlocal link (absolute, relative, and grounded methods are in another monad - \ninside the `HtmlT m ()` of lucid, in this case. Urlpath isn't supported for \nBlaze-html.)\n\n## Installation\n\n```bash\ncabal install markup\n```\n\n## Usage\n\nIt's a little awkward at the moment:\n\n```haskell\nimage' = renderMarkup Image :: Monad m =\u003e HostedMarkupT m T.Text (Html ())\n\nimage = runHostedMarkupT image' \"foo.png\"\n\nλ\u003e renderText image\n\n\u003cimg src=\"foo.png\"\u003e\n```\n\nWe could also overload the `run*` monad transformer actions of each deployment \nscheme, allowing for the decision to be made just with a type coersion. Maybe in \nv0.0.2 :)\n\nHere is the same example, going relative instead:\n\n```haskell\nimage' = renderMarkup Image :: (Monad m, Url UrlString AbsoluteUrl) =\u003e LocalMarkupT UrlString m (HtmlT AbsoluteUrl ())\n\nλ\u003e (runUrlReader $ renderTextT $ runIdentity $ runLocalMarkupT image' $\n     \"foo.png\" \u003c?\u003e (\"key\",\"bar\")\n   ) \"example.com\"\n\n\"\u003cimg src=\\\"example.com/foo.png?key=bar\\\"\u003e\"\n```\n\n## How to run tests\n\n```\ncabal configure --enable-tests \u0026\u0026 cabal build \u0026\u0026 cabal test\n```\n\n## Contributing\n\nFork, PR, repeat.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fathanclark%2Fmarkup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fathanclark%2Fmarkup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fathanclark%2Fmarkup/lists"}