{"id":15821317,"url":"https://github.com/octoper/statamic-inline-assets","last_synced_at":"2025-10-05T16:20:15.557Z","repository":{"id":37519579,"uuid":"257363544","full_name":"octoper/statamic-inline-assets","owner":"octoper","description":"Inline CSS or JS file for Statamic 3","archived":false,"fork":false,"pushed_at":"2024-03-04T09:28:52.000Z","size":155,"stargazers_count":5,"open_issues_count":7,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-12T07:47:12.202Z","etag":null,"topics":[],"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/octoper.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}},"created_at":"2020-04-20T18:01:46.000Z","updated_at":"2023-03-07T12:52:33.000Z","dependencies_parsed_at":"2024-10-26T12:47:30.321Z","dependency_job_id":"74f46612-beb1-46c5-9435-cfa92778585a","html_url":"https://github.com/octoper/statamic-inline-assets","commit_stats":{"total_commits":22,"total_committers":6,"mean_commits":"3.6666666666666665","dds":0.5454545454545454,"last_synced_commit":"19b3567e23479cf885dc2d47f71bb5f4f30810f0"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octoper%2Fstatamic-inline-assets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octoper%2Fstatamic-inline-assets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octoper%2Fstatamic-inline-assets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octoper%2Fstatamic-inline-assets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/octoper","download_url":"https://codeload.github.com/octoper/statamic-inline-assets/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253022763,"owners_count":21842077,"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":[],"created_at":"2024-10-05T07:21:33.806Z","updated_at":"2025-10-05T16:20:10.515Z","avatar_url":"https://github.com/octoper.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Latest Version](https://img.shields.io/github/release/octoper/statamic-inline-assets.svg?style=flat-square)](https://github.com/octoper/statamic-inline-assets/releases)\n![Statamic 3.0+](https://img.shields.io/badge/Statamic-3.0+-FF269E?style=flat-square\u0026link=https://statamic.com)\n\n# Inline assets\n\n\u003e **Looking for maintainers**: As I'm not using Statamic these days and I don't have a the time to maintain the package I'm looking for anyone who want to take the ownerhip of it! You can reach out via email me@octoper.me\n\n\u003e Inline assets for Statamic\n\n## Installation\n\nRequire it using Composer.\n\n```\ncomposer require octoper/statamic-inline-assets\n```\n\n## Inline Asset tag\n\nInline assets will inline your CSS or JS file to your HTML, or inline a file encoded with base64.\n\nInline assets can help you speed of your Statamic website by inlining critical CSS  you can check more about that by reading this article [Extract critical CSS](https://web.dev/extract-critical-css/)\n\n## Templating\n\nPass a path to your file from the public directory to `inline_assets` tag.\n\n```twig\n\u003cstyle\u003e\n{{ inline_assets:css src=\"css/site.css\" }}\n\u003c/style\u003e\n```\n\nor\n\n```twig\n\u003cscript\u003e\n{{ inline_assets:js src=\"js/site.js\" }}\n\u003c/script\u003e\n```\n\nYou can also minify your js or css assets.\n\n```twig\n\u003cscript\u003e\n{{ inline_assets:js minify=\"true\" src=\"js/site.js\" }}\n\u003c/script\u003e\n```\n\nYou usually got a chicken or the egg problem with critical css, so you can ignore if missing\n\n```twig\n\u003cscript\u003e\n{{ inline_assets:css ignore-missing=\"true\" src=\"css/site.css\" }}\n\u003c/script\u003e\n```\n\nYou can also inline your file as an base64 encoded data stream, for example taking your favicon and including it inline.\n\n```twig\n\u003clink rel=\"icon\" type=\"image/x-icon\" href=\"data:image/x-icon;base64,{{ inline_assets:base64 src=\"favicon.ico\" }}\"/\u003e\n```\n\nYou usually got a chicken or the egg problem with critical css, so you can ignore if missing\n\n```twig\n\u003clink rel=\"icon\" type=\"image/svg+xml\" href=\"data:image/svg+xml;base64,{{ inline_assets:base64 ignore-missing=\"true\" src=\"favicons/favicon.svg\" }}\"\u003e\n```\n\n\n## Security\n\nIf you discover any security related issues, please email [me@octoper.me](mailto:me@octoper.me) instead of using the issue tracker.\n\n## Credits\n\n- [Vaggelis Yfantis](https://github.com/octoper)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctoper%2Fstatamic-inline-assets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foctoper%2Fstatamic-inline-assets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctoper%2Fstatamic-inline-assets/lists"}