{"id":25893356,"url":"https://github.com/zakarialaoui10/mdzjs","last_synced_at":"2025-10-28T17:18:58.471Z","repository":{"id":259293793,"uuid":"871902322","full_name":"zakarialaoui10/mdzjs","owner":"zakarialaoui10","description":"Markdown for Zikojs","archived":false,"fork":false,"pushed_at":"2025-02-26T19:46:11.000Z","size":264,"stargazers_count":27,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-23T22:26:32.083Z","etag":null,"topics":["markdown","mdx","preprocessor","remark","zikojs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/zakarialaoui10.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":"2024-10-13T09:09:53.000Z","updated_at":"2025-03-23T10:38:01.000Z","dependencies_parsed_at":"2024-10-24T06:05:36.433Z","dependency_job_id":"74b7706c-b0c3-4c49-b4cf-53f74cff254f","html_url":"https://github.com/zakarialaoui10/mdzjs","commit_stats":null,"previous_names":["zakarialaoui10/mdzjs"],"tags_count":0,"template":false,"template_full_name":"zakarialaoui10/ziko-addons-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zakarialaoui10%2Fmdzjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zakarialaoui10%2Fmdzjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zakarialaoui10%2Fmdzjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zakarialaoui10%2Fmdzjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zakarialaoui10","download_url":"https://codeload.github.com/zakarialaoui10/mdzjs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248107726,"owners_count":21048988,"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":["markdown","mdx","preprocessor","remark","zikojs"],"created_at":"2025-03-02T21:33:03.242Z","updated_at":"2025-10-28T17:18:58.442Z","avatar_url":"https://github.com/zakarialaoui10.png","language":"JavaScript","funding_links":[],"categories":["Developers"],"sub_categories":["Zakaria Elalaoui"],"readme":"\u003e [!NOTE]   \n\u003e This project is part of the [ZikoJS](https://github.com/zakarialaoui10/ziko.js) ecosystem.\n\n# MDZjs\nA Markdown preprocessor for Zikojs.\nIt combines the simplicity of Markdown syntax with the power and flexibility of ***Javascript***\n\n## Install \n```bash\n npm i mdzjs\n```\n \n## Config \n```js\nimport {defineConfig} from \"vite\"\nimport MDZ from \"mdzjs/vite\"\nexport default defineConfig({\n    plugins : [\n        MDZ()\n    ]\n})\n```\n\n## Usage\n\n*Article.mdz :*\n\n```jsx\n---\n title : MDZ \n name : world\n __props__ : \n   background : tomato\n   data : []\n---\nimport data from \"./data.js\";\nimport InteractiveComponent from \"./InteractiveComponent.js\";\n\n# Hello {name}\n\n\u003cInteractiveComponent data={data} background={tomato}/\u003e\n\n```\n\n```js\n// main.js\nimport Article,{title} from \"./Article.mdz\"\n```\n\n## Features\n- **Simple Integration :** Write Markdown as usual, and inject Zikojs elements wherever needed.\n- **Extensible :** Create custom interactive components using Zikojs and use them in any Markdown file.\n- **Reusable :** MDZ exports a default functional component, allowing you to call it multiple times with different data, enabling dynamic and versatile use.\n- **Frontmatter Support :**  Use `YAML` syntax in to include metadata like titles, descriptions, or configurations in your Markdown files, and define props to pass data dynamically to Zikojs components.\n\n- **Markdown :** Use standard Markdown syntax for writing content. \n- **JSX Syntax :** Write components in JSX within Markdown, enabling easy integration of Zikojs elements with JavaScript and HTML..\n- **Props :** Pass data to components through props, enabling dynamic rendering and customization of content within your Markdown files.\n- **ESM :** Supports ECMAScript Modules (ESM), allowing you to import and export modules\n- **Expressions :** MDZjs lets you use JS expressions inside curly braces, like Hello {name}. \nThese expressions can be full JS programs, as long as they evaluate to something renderable. For example, you can use an IIFE like this:\n```js\nHello {(()=\u003e{\n    const names = [\"world\", \"everyone\"];\n    const {length} = names\n    return names[Math.floor(Math.random()*length)]\n})()}\n```\n- **Internal scripts :**  Include JS logic that runs alongside MDZjs components but isn't rendered in the output. \nThey can initialize variables or perform side effects...\n\n```html\n\u003cscript\u003e\n    console.log(\"Hello from MDZjs\")\n    let addons = [\n        \"ziko-gl\",\n        \"ziko-lottie\",\n        \"ziko-chart\"\n    ]\n// The addons variable can be accessed and used in MDZjs expressions \n\u003c/script\u003e\n```\n- **Interleaving :** You can use inline markdown elements inside HTML or Zikojs Components\n\n```html\n\u003cHeader background={background}\u003e\n ***Hello {name}***\n\u003c/Header\u003e\n```\n# ⭐️ Show your support\n\nIf you appreciate the project, kindly demonstrate your support by giving it a star!\u003cbr\u003e\n\n[![Star](https://img.shields.io/github/stars/zakarialaoui10/mdzjs?style=social)](https://github.com/zakarialaoui10/mdzjs)\n\u003c!--## Financial support--\u003e\n# License \nThis projet is licensed under the terms of MIT License \n\u003cimg src=\"https://img.shields.io/github/license/zakarialaoui10/mdzjs?color=rgb%2820%2C21%2C169%29\" width=\"100\" align=\"right\"\n\n\u003c!-- \n To do \n   : fix fm\n   : add possibility of adding plugins \n   : add zod\n   : auto typing \n--\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzakarialaoui10%2Fmdzjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzakarialaoui10%2Fmdzjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzakarialaoui10%2Fmdzjs/lists"}