{"id":18001622,"url":"https://github.com/rigtorp/goldmark-graphviz","last_synced_at":"2025-04-04T08:13:20.612Z","repository":{"id":66369473,"uuid":"594621618","full_name":"rigtorp/goldmark-graphviz","owner":"rigtorp","description":"Goldmark extension to render Graphviz figures without cgo or external dependencies","archived":false,"fork":false,"pushed_at":"2023-01-29T05:37:12.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.676Z","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-29T05:25:06.000Z","updated_at":"2023-01-29T05:28:43.000Z","dependencies_parsed_at":"2023-02-21T21:45:32.870Z","dependency_job_id":null,"html_url":"https://github.com/rigtorp/goldmark-graphviz","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-graphviz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rigtorp%2Fgoldmark-graphviz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rigtorp%2Fgoldmark-graphviz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rigtorp%2Fgoldmark-graphviz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rigtorp","download_url":"https://codeload.github.com/rigtorp/goldmark-graphviz/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.173Z","updated_at":"2025-04-04T08:13:20.468Z","avatar_url":"https://github.com/rigtorp.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Graphviz for Goldmark\n\nThis is an extension for [Goldmark](https://github.com/yuin/goldmark) that adds\nsupport for generating figures using [Graphviz](https://graphviz.org/). It\ndoesn't rely on cgo or an external binary, instead using the\n[wazero](https://wazero.io/) WebAssembly runtime to embed Graphviz.\n\n## Usage\n\nRegister the extension:\n\n``` go\ngoldmark.New(\n\tgoldmark.WithExtensions(\u0026graphviz.Extender{}),\n).Convert(src, dst)\n```\n\nFenced code blocks like below will now be rendered using Graphviz:\n\n~~~markdown\n```graphviz\ndigraph D {\n\n  A [shape=diamond]\n  B [shape=box]\n  C [shape=circle]\n\n  A -\u003e B [style=dashed, color=grey]\n  A -\u003e C [color=\"black:invis:black\"]\n  A -\u003e D [penwidth=5, arrowhead=none]\n\n}\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-graphviz](https://github.com/rigtorp/go-graphviz) package. For a small\nGraphviz graph, go-graphviz takes about 51ms:\n\n```shell\n$ go test -test.bench .\ngoos: linux\ngoarch: amd64\npkg: github.com/rigtorp/go-graphviz\ncpu: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz\nBenchmarkGraphviz-8           24          51285746 ns/op\nPASS\nok      github.com/rigtorp/go-graphviz  3.057s\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-graphviz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frigtorp%2Fgoldmark-graphviz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frigtorp%2Fgoldmark-graphviz/lists"}