{"id":19776872,"url":"https://github.com/neoground/charm-markdown","last_synced_at":"2026-02-13T23:36:03.876Z","repository":{"id":148390999,"uuid":"620458285","full_name":"neoground/charm-markdown","owner":"neoground","description":"Charm-Markdown: Enhance your Charm project with Markdown \u0026 YAML frontmatter support. Effortlessly render HTML from markdown files.","archived":false,"fork":false,"pushed_at":"2025-01-31T14:47:07.000Z","size":34,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-03T18:51:28.466Z","etag":null,"topics":["charm-framework","frontmatter","frontmatter-markdown-loader","markdown","yaml"],"latest_commit_sha":null,"homepage":"","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/neoground.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null}},"created_at":"2023-03-28T18:11:12.000Z","updated_at":"2025-01-31T14:47:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"823aa4d4-cd1c-483c-9e97-4cf2eb96fce1","html_url":"https://github.com/neoground/charm-markdown","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/neoground/charm-markdown","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neoground%2Fcharm-markdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neoground%2Fcharm-markdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neoground%2Fcharm-markdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neoground%2Fcharm-markdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neoground","download_url":"https://codeload.github.com/neoground/charm-markdown/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neoground%2Fcharm-markdown/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29423536,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T22:20:51.549Z","status":"ssl_error","status_checked_at":"2026-02-13T22:20:49.838Z","response_time":78,"last_error":"SSL_read: 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":["charm-framework","frontmatter","frontmatter-markdown-loader","markdown","yaml"],"created_at":"2024-11-12T05:22:12.233Z","updated_at":"2026-02-13T23:36:03.854Z","avatar_url":"https://github.com/neoground.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A Galactic Markdown Module for Charm Framework 3.1+\n\nWelcome to the charm-markdown module, a remarkable addition to the \n[Charm Framework](https://github.com/neoground/charm) galaxy,\ndesigned to provide seamless integration of Markdown and YAML frontmatter functions. \nWhether you're a Markdown padawan or a seasoned YAML-Frontmatter Jedi, this module is the\nperfect companion for your Charm framework journey.\n\nHarness the power of Charm's built-in [Symfony/Yaml](https://symfony.com/doc/current/components/yaml.html)\npackage and [Parsedown](https://github.com/erusev/parsedown) + [Parsedown-Extra](https://github.com/erusev/parsedown-extra) \nfor HTML creation, bringing balance to the Markdown Force in your application.\n\n## Installation\n\nBegin your quest by adding charm-markdown to your project via Composer:\n\n```bash\ncomposer require neoground/charm-markdown\n```\n\nNext, install charm-markdown in your application:\n\n```bash\nbob cm:i neoground/charm-markdown\n```\n\n## Usage\n\nAwaken the charm-markdown Force by initializing it with a file or a string:\n\n```php\n$filepath = C::Storage()-\u003egetDataPath() . DS . 'demo.md';\n$doc = C::Markdown()-\u003efromFile($filepath);\n```\n\nor\n\n```php\n$doc = C::Markdown()-\u003efromString('# Hello World');\n```\n\nUnlock the secrets of the Markdown galaxy by accessing:\n\n- `$doc-\u003egetMarkdownContent();` to obtain the Markdown content part of the document\n- `$doc-\u003egetYaml();` to retrieve the YAML frontmatter data as an array (or an empty array if not set)\n- `$doc-\u003egetHtml();` to generate the HTML content, with Markdown Extra support and \"id\" tags added to each heading for\n  easy anchoring\n- `$doc-\u003egetContentsList()` to get an array of all headings as an easy table of contents\n\nExperience the power of charm-markdown with direct access:\n\nThis returns an array with keys `yaml` (array) and `markdown` (string), containing each part of the document:\n\n```php\n$arr = C::Markdown()-\u003eseparateMarkdownFromYaml($content);\n\n```\n\nExtract the YAML array directly from the content string as an array:\n\n```php\nC::Markdown()-\u003egetYaml($content);\n```\n\nObtain the Markdown part directly from the content string as a string:\n\n```php\nC::Markdown()-\u003egetMarkdownContent($content);\n```\n\nFormat the Markdown part of the content string as HTML:\n\n```php\nC::Markdown()-\u003etoHtml($content);\n```\n\n## Usage in Views\n\nIn Twig views you can output a markdown string directly as HTML with:\n\n```twig\n\u003cdiv id=\"content\"\u003e{{ markdownToHtml(markdownString)|raw }}\u003c/div\u003e\n```\n\n---\n\nEmbrace the charm-markdown Force and embark on an epic adventure of Markdown and YAML mastery in your Charm Framework\napplication. May the Markdown be with you!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneoground%2Fcharm-markdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneoground%2Fcharm-markdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneoground%2Fcharm-markdown/lists"}