{"id":19559351,"url":"https://github.com/machy8/macdom","last_synced_at":"2025-04-26T23:32:31.356Z","repository":{"id":57015899,"uuid":"45694960","full_name":"Machy8/Macdom","owner":"Machy8","description":"🍩 The best, highly customizable HTML preprocessor with many amazing features https://machy8.github.io/Macdom/.","archived":false,"fork":false,"pushed_at":"2019-09-23T20:34:34.000Z","size":2040,"stargazers_count":10,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-10T20:35:58.326Z","etag":null,"topics":["html-preprocessor","minification","preprocessor","simplification","templating"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Machy8.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}},"created_at":"2015-11-06T16:58:34.000Z","updated_at":"2022-12-21T15:38:06.000Z","dependencies_parsed_at":"2022-08-22T09:31:52.789Z","dependency_job_id":null,"html_url":"https://github.com/Machy8/Macdom","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Machy8%2FMacdom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Machy8%2FMacdom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Machy8%2FMacdom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Machy8%2FMacdom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Machy8","download_url":"https://codeload.github.com/Machy8/Macdom/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224050889,"owners_count":17247379,"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":["html-preprocessor","minification","preprocessor","simplification","templating"],"created_at":"2024-11-11T05:00:20.669Z","updated_at":"2024-11-11T05:01:22.242Z","avatar_url":"https://github.com/Machy8.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Macdom\n[![Build Status](https://travis-ci.org/Machy8/Macdom.svg?branch=3.0)](https://travis-ci.org/Machy8/Macdom)\n[![Coverage Status](https://coveralls.io/repos/github/Machy8/Macdom/badge.svg?branch=master)](https://coveralls.io/github/Machy8/Macdom?branch=master)\n[![Packagist](https://img.shields.io/packagist/v/machy8/macdom.svg?maxAge=2592000)](https://packagist.org/packages/machy8/macdom)\n[![License](https://img.shields.io/badge/license-New%20BSD-blue.svg)](https://github.com/Machy8/Macdom/blob/master/license.md)\n[![Join the chat at https://gitter.im/Machy8/Macdom](https://badges.gitter.im/Machy8/Macdom.svg)](https://gitter.im/Machy8/Macdom?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n- For more information see [WIKI](https://github.com/Machy8/Macdom/wiki) *(always up to date to the newest stable version)*\n- **[Try it on CODEPEN](http://codepen.io/Machy8/pen/mPLdbg)** *(JavaScript version is always behind the php version so it may contain bugs and errors that have already been fixed in the PHP version)*\n\n## Sample\n\n**Macdom**\n```` Slim\n!5\nhtml\n    head\n        utf-8\n        viewport\n        favicon includes/favicon.ico\n        title Macdom example\n    body\n        h1 #title .titles .main-title Hello world\n        nav\n            @ a $http://www.[@].com $blank Link on -\n            [google] .first-link Google\n            [yahoo] Yahoo\n            [github] Github\t\n        div #wrapper Some text \u003cb\u003ehere\u003c/b\u003e.\n        https://www.code.jquery.com/jquery-1.12.0.min.js async\n\n````\n\n**Result**\n```` html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\t\u003chead\u003e\n\t\t\u003cmeta charset=\"utf-8\"\u003e\n\t\t\u003cmeta content=\"width=device-width\" name=\"viewport\"\u003e\n\t\t\u003clink rel=\"shortcut icon\" href=\"includes/favicon.ico\"\u003e\n\t\t\u003ctitle\u003eMacdom example\u003c/title\u003e\n\t\u003c/head\u003e\n\t\u003cbody\u003e\n\t\t\u003ch1 id=\"title\" class=\"titles main-title\"\u003eHello world\u003c/h1\u003e\n\t\t\u003cnav\u003e\n\t\t\t\u003ca target=\"blank\" href=\"http://www.google.com\" class=\"first-link\"\u003eLink on - Google\u003c/a\u003e\n\t\t\t\u003ca target=\"blank\" href=\"http://www.yahoo.com\"\u003eLink on - Yahoo\u003c/a\u003e\n\t\t\t\u003ca target=\"blank\" href=\"http://www.github.com\"\u003eLink on - Github\u003c/a\u003e\n\t\t\u003c/nav\u003e\n\t\t\u003cdiv id=\"wrapper\"\u003e\n\t\t\tSome text \u003cb\u003ehere\u003c/b\u003e.\n\t\t\u003c/div\u003e\n\t\t\u003cscript async=\"\" type=\"text/javascript\" src=\"https://www.code.jquery.com/jquery-1.12.0.min.js\"\u003e\u003c/script\u003e\n\t\u003c/body\u003e\n\u003c/html\u003e\n````\n\n## Requirements\n- PHP 7.0+\n- If you use Nette Framework - v2.3+\n\n## Installation\n**1 - Download the Macdom using composer:**\n```\n composer require machy8/macdom\n```\n**2 - Usage:**\n\n*Typical:*\n\n```php\n$macdom = new Macdom\\Engine;\n$compiled = $macdom-\u003ecompile($content);\n```\n\n*Nette framework:*\n```PHP\n\nuse Macdom\\Bridges\\Latte\\FileLoader;\nuse Macdom\\Engine;\n\n/**\n * @var Engine\n */\nprivate $macdom;\n\n/**\n * @var FileLoader\n */\nprivate $fileLoader;\n\n\npublic function __construct(Engine $macdom, FileLoader $fileLoader) {\n\t$this-\u003emacdom = $macdom;\n\t$this-\u003efileLoader = $fileLoader;\n}\n\n\nprotected function createTemplate()\n{\n\t$template = parent::createTemplate();\n\t$this-\u003efileLoader-\u003esetMacdom($this-\u003emacdom);\n\t$template-\u003egetLatte()-\u003esetLoader($this-\u003efileLoader);\n\treturn $template;\n}\n```\n\nAnd add a config neon file with the following content (or try [Composer synchronizer](https://github.com/composer-synchronizer/composer-synchronizer). It will do it for you automatically).\n```\nextensions:\n    macdom: Macdom\\Bridges\\Nette\\MacdomExtension\n  \nmacdom:\n    debugger: TRUE\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmachy8%2Fmacdom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmachy8%2Fmacdom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmachy8%2Fmacdom/lists"}