{"id":50330184,"url":"https://github.com/rozek/quarkdown-js","last_synced_at":"2026-05-29T09:01:39.444Z","repository":{"id":353644909,"uuid":"1220312884","full_name":"rozek/quarkdown-js","owner":"rozek","description":"browser-native ECMAScript module that compiles Quarkdown (.qd) source to HTML — running entirely client-side, no server required","archived":false,"fork":false,"pushed_at":"2026-04-24T20:06:34.000Z","size":234,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-24T21:27:36.765Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/rozek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-24T19:12:25.000Z","updated_at":"2026-04-24T20:06:38.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/rozek/quarkdown-js","commit_stats":null,"previous_names":["rozek/quarkdown-js"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/rozek/quarkdown-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rozek%2Fquarkdown-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rozek%2Fquarkdown-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rozek%2Fquarkdown-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rozek%2Fquarkdown-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rozek","download_url":"https://codeload.github.com/rozek/quarkdown-js/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rozek%2Fquarkdown-js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33644313,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2026-05-29T09:01:38.846Z","updated_at":"2026-05-29T09:01:39.438Z","avatar_url":"https://github.com/rozek.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# QuarkdownJS\n\nA browser-native ECMAScript module that compiles [Quarkdown](https://quarkdown.com) (`.qd`) source to HTML — running entirely client-side, no server required.\n\n\u003e **Clean-room implementation** based on the public Quarkdown documentation and wiki. Licensed under MIT.\n\n## Live Demo\n\n**[Try the REPL -\u003e](https://rozek.github.io/quarkdown-js/demo/)**\n\n## Quick Start\n\n```typescript\nimport { compile, defaultPlugins } from 'quarkdown-js'\n\nconst result = await compile(source, {\n  plugins: defaultPlugins,  // math (KaTeX) + code (Highlight.js) + diagrams (Mermaid)\n})\n\ndocument.body.innerHTML = result.html\n```\n\n## Features\n\n- **Full Quarkdown syntax** — functions, variables, conditionals, loops, chaining\n- **Multiple output modes** — `plain`, `paged`, `slides`, `docs`\n- **Math rendering** — KaTeX (`$...$` and `$$...$$`)\n- **Code highlighting** — Highlight.js with language detection\n- **Diagrams** — Mermaid (client-side)\n- **Presentations** — Reveal.js integration\n- **Print/PDF** — Paged.js integration\n- **Citations** — citeproc-js stub (extensible)\n- **fetch-based includes** — `.include {path}` resolved via `fetch`\n- **Themes** — `default`, `paperwhite`, `galactic`, `dark`\n- **TypeScript** — full type definitions included\n- **Tree-shakeable** — import only what you need\n\n## Installation\n\n```bash\nnpm install quarkdown-js\n```\n\nOr use directly from CDN:\n\n```html\n\u003cscript type=\"module\"\u003e\n  import { compile, defaultPlugins } from 'https://cdn.jsdelivr.net/npm/quarkdown-js/dist/quarkdown-js.esm.js'\n\u003c/script\u003e\n```\n\n## API\n\n```typescript\ncompile(source: string, options?: CompileOptions): Promise\u003cCompileResult\u003e\n```\n\n### `CompileOptions`\n\n| Option | Type | Default | Description |\n|--------|------|---------|-------------|\n| `type` | `'plain' \\| 'paged' \\| 'slides' \\| 'docs'` | `'plain'` | Document layout type |\n| `theme` | `string` | `'default'` | Color theme name |\n| `fetch` | `(path: string) =\u003e Promise\u003cstring\u003e` | `window.fetch` | File resolver for `.include` |\n| `plugins` | `Plugin[]` | `[]` | Optional plugins |\n| `baseUrl` | `string` | `window.location.href` | Base URL for relative includes |\n\n### `CompileResult`\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `html` | `string` | Rendered HTML fragment |\n| `metadata` | `DocumentMetadata` | Extracted document metadata |\n| `diagnostics` | `Diagnostic[]` | Warnings and errors |\n\n## Plugins\n\n```typescript\nimport {\n  defaultPlugins,   // [mathPlugin, codePlugin, diagramPlugin]\n  mathPlugin,       // KaTeX math rendering\n  codePlugin,       // Highlight.js code highlighting\n  diagramPlugin,    // Mermaid diagrams (client-side)\n  slidesPlugin,     // Reveal.js presentations\n  pagedPlugin,      // Paged.js print/PDF\n  citationsPlugin,  // Citation management (stub)\n} from 'quarkdown-js'\n```\n\n## Quarkdown Language\n\nSee the [spec/](spec/) directory for the full language specification, or the [official Quarkdown docs](https://quarkdown.com/wiki).\n\n```\n.var {name} {World}\n\n# Hello .name!\n\n.foreach {1..3}\n    n:\n    - Item **.n**\n\n.if {true}\n    \u003e This renders only when true.\n\nMath: $E = mc^2$\n```\n\n## Browser Compatibility\n\nChrome 85+, Firefox 78+, Safari 14+, Edge 85+ (ES2020, no polyfills needed).\n\n## License\n\nMIT — see [LICENSE](LICENSE.md).\n\nNot affiliated with the original [Quarkdown](https://github.com/iamgio/quarkdown) project (Kotlin, GPL-3.0).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frozek%2Fquarkdown-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frozek%2Fquarkdown-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frozek%2Fquarkdown-js/lists"}