{"id":50972881,"url":"https://github.com/php-collective/symfony-djot-demo","last_synced_at":"2026-06-19T04:02:12.438Z","repository":{"id":347405156,"uuid":"1193373559","full_name":"php-collective/symfony-djot-demo","owner":"php-collective","description":"Demo App for Symfony Djot Bundle usage","archived":false,"fork":false,"pushed_at":"2026-04-11T18:58:45.000Z","size":341,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-11T20:23:01.608Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Twig","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/php-collective.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-27T06:38:28.000Z","updated_at":"2026-04-11T18:58:30.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/php-collective/symfony-djot-demo","commit_stats":null,"previous_names":["php-collective/symfony-djot-demo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/php-collective/symfony-djot-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-collective%2Fsymfony-djot-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-collective%2Fsymfony-djot-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-collective%2Fsymfony-djot-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-collective%2Fsymfony-djot-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/php-collective","download_url":"https://codeload.github.com/php-collective/symfony-djot-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-collective%2Fsymfony-djot-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34516549,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-19T02:00:06.005Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2026-06-19T04:02:11.236Z","updated_at":"2026-06-19T04:02:12.433Z","avatar_url":"https://github.com/php-collective.png","language":"Twig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Symfony Djot Bundle Demo\n\nA demo application showcasing all features of the [php-collective/symfony-djot](https://github.com/php-collective/symfony-djot) bundle.\n\n![Twig Filter Demo](docs/screenshots/twig-filter.png)\n\n## Requirements\n\n- PHP 8.2+\n- Composer\n\n## Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/php-collective/symfony-djot-demo.git\ncd symfony-djot-demo\n\n# Install dependencies\ncomposer install\n```\n\n## Running the Demo\n\nStart the Symfony development server:\n\n```bash\nphp -S localhost:8000 -t public\n```\n\nThen open http://localhost:8000 in your browser.\n\n## Screenshots\n\n**Home** — overview of all features:\n\n![Home](docs/screenshots/home.png)\n\n**Twig Filter** demo (shown at the top of this README) — `|djot` filter with side-by-side source/rendered output.\n\n## Demo Pages\n\n| Route | Description |\n|-------|-------------|\n| `/` | Home - Overview of all features |\n| `/twig-filter` | Using the `\\|djot` Twig filter |\n| `/twig-function` | Using the `djot()` Twig function |\n| `/service` | Injecting `DjotConverterInterface` in services |\n| `/form` | Form integration with `DjotType` |\n| `/safe-mode` | XSS protection for untrusted content |\n| `/plain-text` | Extracting plain text with `\\|djot_text` |\n| `/extensions` | All available Djot extensions |\n\n## Features Demonstrated\n\n### Twig Integration\n\n```twig\n{# Filter for variables #}\n{{ article.body|djot }}\n\n{# Function for inline strings #}\n{{ djot('*bold* and _italic_') }}\n\n{# Plain text extraction #}\n{{ content|djot_text }}\n\n{# Using named converters #}\n{{ content|djot('user_content') }}\n```\n\n### Service Injection\n\n```php\nuse PhpCollective\\SymfonyDjot\\Service\\DjotConverterInterface;\n\nclass MyController\n{\n    public function index(DjotConverterInterface $djot): Response\n    {\n        $html = $djot-\u003etoHtml('# Hello *world*!');\n        $text = $djot-\u003etoText('# Hello *world*!');\n    }\n}\n```\n\n### Safe Mode\n\n```yaml\n# config/packages/symfony_djot.yaml\nsymfony_djot:\n    converters:\n        user_content:\n            safe_mode: true\n```\n\n### Extensions\n\nThe demo showcases all 11 available extensions:\n\n- **Autolink** - Converts bare URLs to links\n- **Code Group** - Transforms code-group divs into tabbed interfaces\n- **Default Attributes** - Adds default attributes to elements\n- **External Links** - Adds `target=\"_blank\"` to external links\n- **Frontmatter** - Parses YAML/TOML/JSON frontmatter\n- **Heading Permalinks** - Adds anchor links to headings\n- **Mentions** - Converts @username to profile links\n- **Semantic Spans** - Converts spans to `\u003ckbd\u003e`, `\u003cdfn\u003e`, `\u003cabbr\u003e`\n- **Smart Quotes** - Converts straight quotes to curly quotes\n- **Table of Contents** - Generates TOC from headings\n- **Wikilinks** - Supports `[[Page Name]]` wiki-style links\n\n## Configuration\n\nSee `config/packages/symfony_djot.yaml` for example configurations of all features.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp-collective%2Fsymfony-djot-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphp-collective%2Fsymfony-djot-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp-collective%2Fsymfony-djot-demo/lists"}