{"id":29675837,"url":"https://github.com/oxidecomputer/fable","last_synced_at":"2025-07-22T23:38:52.533Z","repository":{"id":181831480,"uuid":"604779692","full_name":"oxidecomputer/fable","owner":"oxidecomputer","description":"TOML deck generator with custom templates and schema validation","archived":false,"fork":false,"pushed_at":"2023-10-07T23:50:49.000Z","size":1931,"stargazers_count":35,"open_issues_count":7,"forks_count":0,"subscribers_count":23,"default_branch":"main","last_synced_at":"2025-06-25T15:54:08.415Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oxidecomputer.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}},"created_at":"2023-02-21T19:19:11.000Z","updated_at":"2024-08-17T04:32:37.000Z","dependencies_parsed_at":"2023-07-17T19:28:51.591Z","dependency_job_id":null,"html_url":"https://github.com/oxidecomputer/fable","commit_stats":null,"previous_names":["oxidecomputer/fable"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/oxidecomputer/fable","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxidecomputer%2Ffable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxidecomputer%2Ffable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxidecomputer%2Ffable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxidecomputer%2Ffable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oxidecomputer","download_url":"https://codeload.github.com/oxidecomputer/fable/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxidecomputer%2Ffable/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266591233,"owners_count":23953082,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":"2025-07-22T23:38:51.951Z","updated_at":"2025-07-22T23:38:52.511Z","avatar_url":"https://github.com/oxidecomputer.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fable\n\n\u003e **Warning**: Fable is not much more than an internal experiment in a type of deck\n\u003e generator. It won't offer a comprehensive feature set or the robustness of a\n\u003e fully-developed library. But it aims to provide a flexible and intuitive tool for\n\u003e presentation creation. We greatly appreciate feedback, suggestions, and best of all\n\u003e contributions.\n\nFable is a deck generator that looks to offer an authoring experience as effortless as\nmarkdown presentation libraries while providing the flexibility to create more varied\nlayouts. It utilizes TOML templates and content schema validation (via\n[zod](https://zod.dev/)) to ensure content accuracy and format adherence.\n\n![CleanShot 2023-06-19 at 19 07 36](https://github.com/oxidecomputer/fable/assets/4020798/f22a3bc9-9954-4846-849c-daa1878b3278)\n\n## Key Features\n\n- Schema-based validation for templates\n- Customizable page templates\n- Support for a wide variety of content formats (Markdown, code snippets, images) and can be\n  extended to support anything else\n- Seamless export to PDF using [`Puppeteer`](https://pptr.dev/)\n- Built-in Tailwind CSS support\n\n## How It Works\n\nSpecify a page template along with its own content schema (using [`zod`](https://zod.dev/))\nto validate the content and fields in the TOML file.\n\n```jsx\nexport const Schema = z.object({\n  title: z.string().optional,\n  text: z.string(),\n});\n```\n\n```toml\n[[pages]]\ntemplate = \"Basic\"\ntitle = \"A Journey Through the Cosmos\"\ntext = \"\"\"\n- In the _vastness of space_, time and distance are but mere illusions\n    - Worlds exist beyond our wildest imaginations\n        - On these worlds, _beings of all shapes and sizes_ dwell\n- With societies and cultures _as diverse as the stars_ that light up the skies above\n- They are **united** in their quest for knowledge and understanding\n- The universe itself is our teacher, and its secrets our endless source of inspiration\n\"\"\"\n````\n\nThe `template` attribute in your TOML file should correspond to the template component name.\nFable provides\n[several built-in templates](https://github.com/oxidecomputer/fable/tree/main/src/templates),\nbut custom templates can also be created. Any design you can produce with a React layout can\nbe incorporated into your presentation.\n\nThis means you're not relying on the library to support any type of content, it can be\neasily extended to support things like Latex, AsciiMath, AsciiDoc by just installing any\nprerequisites and handling it directly in a new layout.\n\n## Getting Started\n\nCreate a new presentation with `npx @oxide/create-fable@latest`.\n\n## Export to PDF\n\nTo generate a PDF version of your presentation, run `npm run export-pdf`.\n\n## Navigation\n\nNavigate through slides using the left and right arrow keys. Press `f` to enter fullscreen\nmode.\n\n## Custom Templates\n\nCustom templates consist of:\n\n1. A template schema that validates whether the page's content matches the rendering\n   requirements of the template.\n2. A React component that handles the page content provided by the user.\n\nRefer to this\n[starter example](https://github.com/oxidecomputer/fable/blob/main/starter/main/templates/Example.jsx)\nto create your own custom templates.\n\n### Template Utilities\n\n_Markdown:_ Content enclosed within is parsed and rendered as Markdown.\n\n_FitText:_ Automatically resizes overflowing text to fit within its container.\n\n\u003e **Info**: Currently not in use, needs improvements\n\n## Stying\n\nFable supports [Tailwind CSS](https://tailwindcss.com/) out of the box. You can also use the\n`styles.css` file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foxidecomputer%2Ffable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foxidecomputer%2Ffable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foxidecomputer%2Ffable/lists"}