{"id":19494632,"url":"https://github.com/ozekik/markdown-ld","last_synced_at":"2025-04-25T21:31:52.312Z","repository":{"id":57291267,"uuid":"337814956","full_name":"ozekik/markdown-ld","owner":"ozekik","description":"RDF Linked Data in Markdown","archived":false,"fork":false,"pushed_at":"2024-04-23T16:16:47.000Z","size":784,"stargazers_count":26,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-01T11:04:39.987Z","etag":null,"topics":["json-ld","linked-data","markdown","rdf","turtle","unified"],"latest_commit_sha":null,"homepage":"https://ozekik.github.io/markdown-ld/","language":"JavaScript","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/ozekik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-10T18:24:18.000Z","updated_at":"2024-10-07T10:55:06.000Z","dependencies_parsed_at":"2022-08-27T12:20:12.545Z","dependency_job_id":null,"html_url":"https://github.com/ozekik/markdown-ld","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozekik%2Fmarkdown-ld","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozekik%2Fmarkdown-ld/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozekik%2Fmarkdown-ld/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozekik%2Fmarkdown-ld/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ozekik","download_url":"https://codeload.github.com/ozekik/markdown-ld/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224018059,"owners_count":17242005,"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":["json-ld","linked-data","markdown","rdf","turtle","unified"],"created_at":"2024-11-10T21:31:03.986Z","updated_at":"2024-11-10T21:32:56.003Z","avatar_url":"https://github.com/ozekik.png","language":"JavaScript","readme":"# Markdown-LD\n\n[![npm](https://img.shields.io/npm/v/markdownld)](https://www.npmjs.com/package/markdownld)\n\nMarkdown-LD is a simple syntax for humans to write RDF Linked Data in Markdown.\nIt is a kind of [literate programming](https://en.wikipedia.org/wiki/Literate_programming) for Turtle/TriG, and useful to publish and maintain linked data along with documentation.\n\n## Playground\n\nTry it online! \u003chttps://ozekik.github.io/markdown-ld/\u003e\n\n## Specification and Examples\n\nSee [SPEC.md](SPEC.md), which is compiled into [SPEC.ttl](SPEC.ttl) (Turtle) and [SPEC.json](SPEC.json) (JSON-LD).\n\nFor a more realistic example from the FOAF (Friend of a Friend) Vocabulary, see [examples/foaf.md](examples/foaf.md), [examples/foaf.ttl](examples/foaf.ttl) (Turtle), and [examples/foaf.json](examples/foaf.json) (JSON-LD).\n\n## Markdown-LD Compiler\n\nA referential compiler to Turtle and other RDF formats is implemented as a [unified](https://github.com/unifiedjs/unified)/[remark](https://github.com/remarkjs/remark) plugin and CLI.\n\nCurrently Turtle (default) and JSON-LD (with [@frogcat/ttl2jsonld](https://github.com/frogcat/ttl2jsonld)) are built-in formats for the output.\nYou can supply a Turtle output to [N3.js](https://github.com/rdfjs/N3.js), [graphy.js](https://github.com/blake-regalia/graphy.js), and other libraries to translate it to other formats.\n\n### CLI\n\nInstallation:\n\n```sh\nnpm install -g markdownld\n```\n\nUsage:\n\n```sh\nmarkdownld input.md -o output.ttl\nmarkdownld input.md -o output.json --setting 'format: \"jsonld\"'\n```\n\nFor more information, see [unifiedjs/unified-args](https://github.com/unifiedjs/unified-args), on which Markdown-LD CLI is built.\n\n### Module\n\nInstallation:\n\n```sh\nnpm install markdownld --save\n```\n\nUsage:\n\n```js\nconst unified = require('unified');\nconst markdown = require('remark-parse');\nconst markdownld = require('markdownld');\n\nconst input =\n  '# Example\\n\\n`\u003chttp://example.com/\u003e`\\n\\n' +\n  '## Alice\\n\\n`\u003c#Alice\u003e`\\n\\n' +\n  '### Knows\\n\\n`foaf:knows`\\n\\n' +\n  '* Bob `\u003c#Bob\u003e`\\n';\n\nconst processor = unified().use(markdown).use(markdownld);\n\nprocessor.process(input, (err, { contents }) =\u003e {\n  console.log(contents);  // \u003c#Alice\u003e foaf:knows \u003c#Bob\u003e .\n});\n```\n\n## Todo\n\n- [x] Publish playground\n- [ ] Make TriG default\n- [ ] Do input validation for better exception messages\n- [ ] Support compilation to more RDF formats\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozekik%2Fmarkdown-ld","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fozekik%2Fmarkdown-ld","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozekik%2Fmarkdown-ld/lists"}