{"id":19388856,"url":"https://github.com/linkml/linkml-renderer","last_synced_at":"2025-12-07T19:30:13.459Z","repository":{"id":104631059,"uuid":"587833647","full_name":"linkml/linkml-renderer","owner":"linkml","description":"Rendering of instance data as HTML, Markdown, Mermaid","archived":false,"fork":false,"pushed_at":"2024-06-26T02:59:17.000Z","size":3063,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-01-12T05:38:00.887Z","etag":null,"topics":["html","instance-graphs","linkml","markdown","mermaid","python","templates"],"latest_commit_sha":null,"homepage":"https://linkml.github.io/linkml-renderer","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/linkml.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-11T17:38:08.000Z","updated_at":"2024-06-26T02:58:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"d5354f89-a7f8-4cf6-9e4d-8960836e598d","html_url":"https://github.com/linkml/linkml-renderer","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkml%2Flinkml-renderer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkml%2Flinkml-renderer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkml%2Flinkml-renderer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkml%2Flinkml-renderer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linkml","download_url":"https://codeload.github.com/linkml/linkml-renderer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239664401,"owners_count":19676747,"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":["html","instance-graphs","linkml","markdown","mermaid","python","templates"],"created_at":"2024-11-10T10:13:53.266Z","updated_at":"2025-12-07T19:30:13.413Z","avatar_url":"https://github.com/linkml.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# linkml-renderer\n\nGenerating HTML, Markdown, Mermaid, and other rendering artefacts from LinkML data.\n\nThis applies a configurable *generic* mapping between instance data and the target output file.\nThis is an example of a \"no code\" approach to generating visual representations of data.\n\nIn general, writing custom code (e.g. in Jinja) that is specific to your schema may produce\nmore user-friendly results. LinkML-renderer should only be used in cases where it is harder to\ncommit developer resources to writing custom code.\n\nStatus: experimental\n\n## Command Line Usage\n\nMinimally, you must pass in a schema (LinkML YAML) and a file of instance data conforming to the schema:\n\n`linkml-render -s my-schema.yaml my-data.yaml`\n\nor with a specific output file:\n\n`linkml-render -s my-schema.yaml my-data.yaml -o output.html`\n\nThe default output type is HTML.\n\nTo produce other formats:\n\n`linkml-render -s my-schema.yaml -f markdown my-data.yaml -o output.md`\n\nYou can pass in a configuration file using `--config` (`-c).\n\n`linkml-render -s my-schema.yaml  my-data.yaml -c my-config.yaml`\n\nThe YAML file should conform to the style datamodel Configuration object.\n(note: autodocumentation for this model will be produced later, for now\nconsult the LinkML file).\n\n## Python Usage\n\nWhen this library matures, the python documentation will be linked from the main LinkML docs.\n\nFor now, see the docstrings directly in the source, and the test folder for examples.\n\nSee minimal sphinx docs: https://linkml.github.io/linkml-renderer\n\n## Output types\n\n- HTML\n- Markdown\n- Mermaid\n\nNote that the mermaid can be optionally embedded inside the HTML or Markdown.\n\n## How it works\n\nThe input object is treated as a tree, and nodes in the tree are recursively visited, producing\noutput in the desired format.\n\nFor HTML and markdown generation, the following default rules are applied:\n\n- singular outer objects are translated to Description Lists\n- lists of objects are translated to tables \n\nThese rules are contextual:\n\n- Tables are not nested inside tables\n\nThe rules are also configurable. See the style schema and test cases for details.\n\nFor example, in the person infoschema, a Container contains a list of persons and a list of organizations.\nThe default rendering will create two tables, with each row representing an individual or organization.\n\nThis can lead to wide tables if there are a large number of slots.\n\nIf the `persons` or `organizations` slot is mapped to `RenderType.description_list`, then instead, each item\ngets its own description list, resulting in a longer narrower page.\n\n## Limitations and Future plans\n\nCurrently there are limits to customizability, both in terms of stylesheets and in terms of how schema\nelements map to output elements.\n\nThe HTML generation is currently hardwired to use Bootstrap.\n\nIt is likely that the functionality here may be subsumed into a future linkml.js library. At this time\nthe framework may be extended to include interactive form-based data entry.\n\nThe library has not yet been tested on a wide range of data.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinkml%2Flinkml-renderer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinkml%2Flinkml-renderer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinkml%2Flinkml-renderer/lists"}