{"id":16187336,"url":"https://github.com/fiatjaf/svelte-asciidoc","last_synced_at":"2025-09-25T01:30:54.290Z","repository":{"id":244319898,"uuid":"814333587","full_name":"fiatjaf/svelte-asciidoc","owner":"fiatjaf","description":"AsciiDoc parser to customizable Svelte components","archived":false,"fork":false,"pushed_at":"2024-11-02T11:40:18.000Z","size":76,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-12T13:12:14.382Z","etag":null,"topics":["asciidoc","nostr","svelte"],"latest_commit_sha":null,"homepage":"","language":"Svelte","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/fiatjaf.png","metadata":{"files":{"readme":"README.adoc","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":"2024-06-12T19:59:19.000Z","updated_at":"2024-11-02T11:40:22.000Z","dependencies_parsed_at":"2024-10-19T22:29:58.570Z","dependency_job_id":"1e746967-113a-469d-bb09-8d16f8cbc83d","html_url":"https://github.com/fiatjaf/svelte-asciidoc","commit_stats":{"total_commits":19,"total_committers":1,"mean_commits":19.0,"dds":0.0,"last_synced_commit":"be647b663bab32b2e407df36a48eb3f1d3d6c404"},"previous_names":["fiatjaf/svelte-asciidoc"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiatjaf%2Fsvelte-asciidoc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiatjaf%2Fsvelte-asciidoc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiatjaf%2Fsvelte-asciidoc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiatjaf%2Fsvelte-asciidoc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fiatjaf","download_url":"https://codeload.github.com/fiatjaf/svelte-asciidoc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234143348,"owners_count":18786140,"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":["asciidoc","nostr","svelte"],"created_at":"2024-10-10T07:21:29.334Z","updated_at":"2025-09-25T01:30:49.026Z","avatar_url":"https://github.com/fiatjaf.png","language":"Svelte","funding_links":[],"categories":[],"sub_categories":[],"readme":"= svelte-asciidoc\n\n[source,bash]\n----\nnpm install svelte-asciidoc\n----\n\nThis library takes a blob of https://asciidoc.org/[AsciiDoc] text renders it as a collection\nof Svelte components that can be customized. Similar to https://github.com/oxidecomputer/react-asciidoc\nand https://github.com/pablo-abc/svelte-markdown (but don't use Markdown ever again in your life, please,\nuse just AsciiDoc).\n\n[source,html]\n----\n\u003cscript\u003e\nimport SvelteAsciidoc from 'svelte-asciidoc'\n\u003c/script\u003e\n\n\u003cdiv\u003e\n  \u003cSvelteAsciidoc\n    source={`\n= hello world\n\nthis is _some_ *asciidoc* text^2^!\n    `}\n  /\u003e\n\u003c/div\u003e\n----\n\nNow suppose you want to make bold text also look bluey. Create a new component `CustomBold.svelte`:\n\n[source,html]\n----\n\u003cstrong style=\"color: blue\"\u003e\u003cslot /\u003e\u003c/strong\u003e\n----\n\nand then pass it to `SvelteAsciidoc`:\n\n[source,diff]\n----\n \u003cscript\u003e\n import SvelteAsciidoc from 'svelte-asciidoc'\n+import CustomBold from './CustomBold.svelte'\n \u003c/script\u003e\n\n \u003cdiv\u003e\n   \u003cSvelteAsciidoc\n+    naturalRenderers: {strong: CustomBold}\n     source={`\n = hello world\n\n this is _some_ *asciidoc* text^2^!\n     `}\n   /\u003e\n \u003c/div\u003e\n----\n\nYou can also apply the default https://cdnjs.cloudflare.com/ajax/libs/asciidoctor.js/1.5.9/css/asciidoctor.min.css[asciidoctor.css]\nstylesheet and it should work with the default classes this library generates.\n\n'''\n\nSee link:src/routes/+page.svelte[] for another usage example.\nSee link:src/lib/renderers[] for all higher-level customizable components and their default implementations (these must be specified with the parameter `customRenderers={}`, while `naturalRenderers={}` is for simple stuff like `a`, `em`, `sup`, `sub`, `strong`).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffiatjaf%2Fsvelte-asciidoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffiatjaf%2Fsvelte-asciidoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffiatjaf%2Fsvelte-asciidoc/lists"}