{"id":18001628,"url":"https://github.com/rigtorp/goldmark-pikchr","last_synced_at":"2025-04-04T08:13:19.148Z","repository":{"id":137958487,"uuid":"585331841","full_name":"rigtorp/goldmark-pikchr","owner":"rigtorp","description":"Goldmark extension to render Pikchr figures without cgo or external dependencies","archived":false,"fork":false,"pushed_at":"2023-01-04T22:51:24.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-01T17:17:02.672Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/rigtorp.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-04T22:41:47.000Z","updated_at":"2023-01-04T22:42:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"e9769c46-6530-4f06-a575-4063efab5886","html_url":"https://github.com/rigtorp/goldmark-pikchr","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/rigtorp%2Fgoldmark-pikchr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rigtorp%2Fgoldmark-pikchr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rigtorp%2Fgoldmark-pikchr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rigtorp%2Fgoldmark-pikchr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rigtorp","download_url":"https://codeload.github.com/rigtorp/goldmark-pikchr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247142075,"owners_count":20890653,"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":[],"created_at":"2024-10-29T23:18:14.471Z","updated_at":"2025-04-04T08:13:19.008Z","avatar_url":"https://github.com/rigtorp.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pikchr for Goldmark\n\nThis is an extension for [Goldmark](https://github.com/yuin/goldmark) that adds\nsupport for generating figures using [Pikchr](https://pikchr.org). It doesn't\nrely on cgo or an external binary, instead using the\n[wazero](https://wazero.io/) WebAssembly runtime to embed Pikchr.\n\n## Usage\n\nRegister the extension:\n\n``` go\ngoldmark.New(\n\tgoldmark.WithExtensions(\u0026pikchr.Extender{}),\n).Convert(src, dst)\n```\n\nFenced code blocks like below will now be rendered using Pikchr:\n\n~~~markdown\n```pikchr\narrow right 200% \"Markdown\" \"Source\"\nbox rad 10px \"Markdown\" \"Formatter\" \"(markdown.c)\" fit\narrow right 200% \"HTML+SVG\" \"Output\"\narrow \u003c-\u003e down 70% from last box.s\nbox same \"Pikchr\" \"Formatter\" \"(pikchr.c)\" fit\n```\n~~~\n\nResulting in a figure like below:\n\n![](testdata/basic.svg)\n\n## Performance\n\nPerformance will be the same as for the underlying\n[go-pikchr](https://github.com/rigtorp/go-pikchr) package. For a small Pikchr\nfigure, go-pikchr takes about 7.5ms:\n\n```shell\n$ go test -test.bench .\ngoos: linux\ngoarch: amd64\npkg: github.com/rigtorp/go-pikchr\ncpu: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz\nBenchmarkPikchr-8            142           7520289 ns/op\nPASS\nok      github.com/rigtorp/go-pikchr    1.471s\n```\n\n## Acknowledgements\n\nThis extension is based on the\n[goldmark-pikchr](https://github.com/jchenry/goldmark-pikchr) extension by\n[Colin Henry](https://github.com/jchenry) and the\n[goldmark-d2](https://github.com/FurqanSoftware/goldmark-d2) extension by\n[Furqan Software](https://github.com/FurqanSoftware).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frigtorp%2Fgoldmark-pikchr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frigtorp%2Fgoldmark-pikchr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frigtorp%2Fgoldmark-pikchr/lists"}