{"id":16702397,"url":"https://github.com/murhafsousli/metabook","last_synced_at":"2026-05-19T04:38:11.540Z","repository":{"id":66203303,"uuid":"468953067","full_name":"MurhafSousli/metabook","owner":"MurhafSousli","description":"A simple implementation of material.io to document Angular apps and libraries","archived":false,"fork":false,"pushed_at":"2022-03-14T02:15:04.000Z","size":540,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-21T02:26:09.918Z","etag":null,"topics":["angular","component","documentation","material","stroybook"],"latest_commit_sha":null,"homepage":"","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/MurhafSousli.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":"2022-03-12T01:57:09.000Z","updated_at":"2022-03-13T01:00:17.000Z","dependencies_parsed_at":"2023-03-01T09:30:49.734Z","dependency_job_id":null,"html_url":"https://github.com/MurhafSousli/metabook","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"fcacd05e0fcc34853444c38904423951305fb1c7"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MurhafSousli%2Fmetabook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MurhafSousli%2Fmetabook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MurhafSousli%2Fmetabook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MurhafSousli%2Fmetabook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MurhafSousli","download_url":"https://codeload.github.com/MurhafSousli/metabook/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243544665,"owners_count":20308168,"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":["angular","component","documentation","material","stroybook"],"created_at":"2024-10-12T19:04:33.343Z","updated_at":"2026-05-19T04:38:11.511Z","avatar_url":"https://github.com/MurhafSousli.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# What is Metabook\n\nMetabook is a simple implementation of [Material.io](https://material.io)\n\n**The project is still WIP**\n\n### Usage\n\n1. Create a new markdown file in `assets/docs`, e.g. `example-title.md`\n2. Generate a component inside `components-examples` directory and export it inside examples `components-examples.module`, e.g. `example-title-component`\n3. Export it in `index.ts` in the same directory\n\nTo show the component and its code inside the markdown, use the following syntax:\n\n```md\nThe `\u003cexample-title\u003e` component is bla bla bla.\n\n#### Example\n\n\u003c!-- example(ExampleTitleComponent) --\u003e\n```\n\nAdd a demo example including its source code inside your markdown using the comment syntax \n\n```markdown\n\u003c!-- example(YourComponentClassName) --\u003e\n```\n\n\u003e Note that inside the braces of the comment should contain the component class name.\n\n4. Run the task `npm run compodoc:build` to generate the documentation of the newly added component (this will generate a file `assets/docs/documentation.json`).\n\n\u003e Whenever you update the examples components, you need to re-run `npm run compodoc:build` to update the source code in the documentation.\n\n\n5. Update the components list of your `MetabookModule` in `AppModule`\n\n```ts\n/**\n * List of routes for each component page\n */\nconst metabookRoutes: StoryRoute[] = [\n  {\n    title: 'Example Title',\n    path: 'example-title'\n  },\n  {\n    title: 'Example Paragraph',\n    path: 'example-paragraph'\n  }\n];\n\n@NgModule({\n  imports: [\n    MetabookModule.forRoot({\n      routes: metabookRoutes,\n      components: [\n        ExampleTitleComponent\n      ]\n    })\n  ]\n})\nexport class AppModule {\n}\n```\n\nYou can override the documentation directory using the config of `MetabookModule`\n\n```ts\nMetabookModule.forRoot({\n  routes: metabookRoutes,\n  markdownDirPath: 'assets/docs',\n  documentationPath: 'assets/docs/documentation.json',\n  components: [\n    ExampleTitleComponent\n  ]\n})\n```\n\n#### Contribution\n\nFeel free to join the discussion and send PRs to the repo, I would love hear your input!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmurhafsousli%2Fmetabook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmurhafsousli%2Fmetabook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmurhafsousli%2Fmetabook/lists"}