{"id":13527512,"url":"https://github.com/simonecorsi/declarative-markdown","last_synced_at":"2025-04-22T16:44:06.838Z","repository":{"id":37799236,"uuid":"413727456","full_name":"simonecorsi/declarative-markdown","owner":"simonecorsi","description":"📑 Zero dependencies javascript declarative markdown generator! ","archived":false,"fork":false,"pushed_at":"2025-04-11T13:24:31.000Z","size":4416,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-11T14:47:20.991Z","etag":null,"topics":["github","hacktoberfest","javascript","js","markdown","markdown-generator","nodejs","npm","typescript"],"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/simonecorsi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-05T08:06:10.000Z","updated_at":"2025-04-11T13:24:27.000Z","dependencies_parsed_at":"2025-03-19T09:41:02.421Z","dependency_job_id":null,"html_url":"https://github.com/simonecorsi/declarative-markdown","commit_stats":{"total_commits":219,"total_committers":4,"mean_commits":54.75,"dds":0.1735159817351598,"last_synced_commit":"2677497849c3f5fe0e4f83af2afe48cbf23eb895"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonecorsi%2Fdeclarative-markdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonecorsi%2Fdeclarative-markdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonecorsi%2Fdeclarative-markdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonecorsi%2Fdeclarative-markdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonecorsi","download_url":"https://codeload.github.com/simonecorsi/declarative-markdown/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249279382,"owners_count":21242910,"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":["github","hacktoberfest","javascript","js","markdown","markdown-generator","nodejs","npm","typescript"],"created_at":"2024-08-01T06:01:50.041Z","updated_at":"2025-04-16T21:31:26.286Z","avatar_url":"https://github.com/simonecorsi.png","language":"TypeScript","readme":"# declarative-markdown\n\n\u003c!-- PROJECT SHIELDS --\u003e\n\n\u003c!-- ![tests](https://github.com/simonecorsi/declarative-markdown/workflows/test/badge.svg) --\u003e\n\n\u003c!-- toc --\u003e\n\n- [About The Project](#about-the-project)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Contributing](#contributing)\n- [License](#license)\n- [Contact](#contact)\n\n\u003c!-- tocstop --\u003e\n\n## About The Project\n\nThe purpose of this package is to generate markdown with javascript/typescript in a declarative way without having to deal with string templating!\n\nThis is already what I need for my project but feel free to open PR if you have some ideas!\n\n\u003c!-- GETTING STARTED --\u003e\n\n## Installation\n\n```sh\nnpm i --save @scdev/declarative-markdown\n# OR\nyarn add\n```\n\n\u003c!-- USAGE EXAMPLES --\u003e\n\n## Usage\n\nYou can see output of the following snippet [here](./test/fixtures/output)\n\n```javascript\nimport {\n  Markdown,\n  italic,\n  bold,\n  link,\n  quote,\n  inlineCode,\n  code,\n} from '@scdev/declarative-markdown';\n\nconst mkd = new Markdown('Declarative Markdown Generator');\n\nmkd\n  .header('Paragraphs', 2)\n  .paragraph(`My ${italic('Italic')} text and the ${bold('bold')} one`)\n  .paragraph(\n    `Let's add a ${link('link', 'http://google.com')}, why not a quote: ${quote(\n      \"I've become death, destructor of worlds\"\n    )}`\n  )\n  .paragraph(\n    `Do you want to see my fancy ${inlineCode(\n      \"alert('x')\"\n    )}, but I've a better example here: ${code(\n      'package main\\n func main(){}',\n      'go'\n    )}`\n  )\n  .header('Table', 2)\n  .table(['id', 'name'], [['1', 'Simone']])\n  .header('List', 2)\n  .list([\n    { text: 'list1', depth: 0 },\n    { text: 'nested', depth: 1 },\n    { text: 'nested2', depth: 1 },\n    { text: 'list2' },\n    { text: 'nested', depth: 1 },\n    { text: 'nested2', depth: 1 },\n  ])\n  .header('Numbered List', 2)\n  .list(\n    [\n      { text: 'list1' },\n      { text: 'nested' },\n      { text: 'nested2' },\n      { text: 'list2' },\n      { text: 'nested' },\n      { text: 'nested2' },\n    ],\n    true\n  )\n  .header('Task List', 2)\n  .tasks([\n    { text: 'list1', checked: true },\n    { text: 'nested' },\n    { text: 'nested2' },\n    { text: 'list2' },\n    { text: 'nested' },\n    { text: 'nested2' },\n  ])\n  .header('images', 2)\n  .image('http://ajeje.com/image.png')\n  .image('http://ajeje.com/image.png', 'ALTTEXT')\n  .tableOfContent();\n\nconst string = mkd.render();\n// write it where you want\n```\n\n\u003c!-- CONTRIBUTING --\u003e\n\n## Contributing\n\nProject is pretty simple and straight forward for what is my needs, but if you have any idea you're welcome.\n\nThis projects uses [commitizen](https://github.com/commitizen/cz-cli) so be sure to use standard commit format or PR won't be accepted\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'feat(scope): some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n\u003c!-- LICENSE --\u003e\n\n## License\n\nDistributed under the MIT License. See `LICENSE` for more information.\n\n\u003c!-- CONTACT --\u003e\n\n## Contact\n\nSimone Corsi - [@im_simonecorsi](https://twitter.com/im_simonecorsi)\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonecorsi%2Fdeclarative-markdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonecorsi%2Fdeclarative-markdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonecorsi%2Fdeclarative-markdown/lists"}