{"id":33961056,"url":"https://github.com/nanoblocktech/markdown","last_synced_at":"2026-04-07T23:01:31.741Z","repository":{"id":221639979,"uuid":"754961373","full_name":"nanoblocktech/markdown","owner":"nanoblocktech","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-27T17:31:37.000Z","size":81,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-14T10:34:50.033Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/nanoblocktech.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-02-09T05:46:22.000Z","updated_at":"2025-08-27T17:31:40.000Z","dependencies_parsed_at":"2024-03-04T22:27:16.344Z","dependency_job_id":"10eb8456-2631-4a91-84cc-b7d23b768e3a","html_url":"https://github.com/nanoblocktech/markdown","commit_stats":null,"previous_names":["nanoblocktech/markdown"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/nanoblocktech/markdown","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nanoblocktech%2Fmarkdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nanoblocktech%2Fmarkdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nanoblocktech%2Fmarkdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nanoblocktech%2Fmarkdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nanoblocktech","download_url":"https://codeload.github.com/nanoblocktech/markdown/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nanoblocktech%2Fmarkdown/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31532336,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-12-12T22:00:24.058Z","updated_at":"2026-04-07T23:01:31.712Z","avatar_url":"https://github.com/nanoblocktech.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP Markdown Extension\n\n[![PHP Version](https://img.shields.io/badge/PHP-8.0%2B-blue)](https://www.php.net/)\n[![Composer](https://img.shields.io/badge/Composer-Required-brightgreen)](https://getcomposer.org/)\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n\nA lightweight PHP extension of [`Parsedown`](https://github.com/erusev/parsedown) that adds:\n\n* Audio and video embedding using markdown syntax\n* Automatic Table of Contents generation\n* Responsive HTML tables\n* External links automatically open in a new tab when the hostname differs\n\n\n---\n\n## Installation\n\nInstallation via composer.\n\n```bash\ncomposer require nanoblocktech/markdown\n```\n\n---\n\n## Quick Start\n\n```php\nuse Luminova\\ExtraUtils\\HtmlDocuments\\Markdown;\n\n$markdown = new Markdown();\n\necho $markdown-\u003etext('### Hello World');\n```\n\n---\n\n## Media Embedding\n\nEmbedding audio and videos in markdown. \n\n### Audio\n\n```markdown\n{Description}(audio)(/path/to/audio.opus)\n```\n\n### Video\n\n```markdown\n{Description}(video)(/path/to/video.mp4)\n```\n\n\u003e Supports both local and remote URLs.\n\n---\n\n## Configuration\n\n### Enable Features\n\n```php\n// Generate table of contents\n$markdown-\u003etableOfContents(true);\n\n// Make HTML tables responsive\n$markdown-\u003eresponsiveTable(true);\n```\n\n---\n\n### Table of Contents Options\n\n```php\n// Include specific heading levels\n$markdown-\u003esetHeadings(['h1', 'h2']);\n\n// Prefix for generated heading IDs\n$markdown-\u003esetIdPrefix('my-contents-');\n\n// Retrieve generated table of contents\n$tableOfContents = $markdown-\u003egetTableOfContents();\n```\n\n---\n\n### Link Handling\n\n```php\n// Base URL for relative links\n$markdown-\u003esetLink('https://example.com/assets/');\n```\n\n---\n\n### Media Types\n\n```php\n$markdown-\u003esetMediaType('audio', 'audio/ogg; codecs=opus');\n$markdown-\u003esetMediaType('video', 'video/mp4');\n```\n\n---\n\n## Rendering Markdown\n\n```php\necho $markdown-\u003etext($content);\n```\n\n---\n\n## Full Example\n\n```php\n$markdown = new Markdown();\n$markdown-\u003etableOfContents(true);\n$markdown-\u003eresponsiveTable(true);\n$markdown-\u003esetHeadings(['h1', 'h2']);\n$markdown-\u003esetIdPrefix('toc-');\n$markdown-\u003esetLink('https://example.com/assets/');\n$markdown-\u003esetMediaType('audio', 'audio/ogg; codecs=opus');\n$markdown-\u003esetMediaType('video', 'video/mp4');\n\n$mdText = \u003c\u003c\u003cMD\n# Welcome\nSome intro text.\n\n## Audio Example\n{Cool song}(audio)(/media/song.opus)\n\n## Video Example\n{Demo video}(video)(/media/demo.mp4)\nMD;\n\necho $markdown-\u003etext($mdText);\n```\n\n---\n\n## Features vs Parsedown\n\n| Feature                            | Parsedown | PHP Markdown Extension |\n| ---------------------------------- | --------- | ---------------------- |\n| Markdown rendering                 | ✅         | ✅                      |\n| Audio embedding                    | ❌         | ✅                      |\n| Video embedding                    | ❌         | ✅                      |\n| Table of Contents generation       | ❌         | ✅                      |\n| Responsive HTML tables             | ❌         | ✅                      |\n| Auto external link target=\"_blank\" | ❌         | ✅                      |\n\n\n---\n\n\u003e **Notes:**\n\u003e\n\u003e * External links automatically receive `target=\"_blank\"` when the host differs from your application domain.\n\u003e * Media embedding works with local paths or remote URLs.\n\u003e * Table of contents is generated from configured heading levels only.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnanoblocktech%2Fmarkdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnanoblocktech%2Fmarkdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnanoblocktech%2Fmarkdown/lists"}