{"id":21177469,"url":"https://github.com/betsol/assetsreferencerbundle","last_synced_at":"2025-03-14T18:29:13.094Z","repository":{"id":18283391,"uuid":"21450867","full_name":"betsol/AssetsReferencerBundle","owner":"betsol","description":"Assets referencer extension for Symfony","archived":false,"fork":false,"pushed_at":"2014-07-03T09:01:36.000Z","size":132,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-21T11:44:43.002Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/betsol.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}},"created_at":"2014-07-03T05:29:44.000Z","updated_at":"2014-07-03T05:31:13.000Z","dependencies_parsed_at":"2022-08-25T11:01:52.467Z","dependency_job_id":null,"html_url":"https://github.com/betsol/AssetsReferencerBundle","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/betsol%2FAssetsReferencerBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/betsol%2FAssetsReferencerBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/betsol%2FAssetsReferencerBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/betsol%2FAssetsReferencerBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/betsol","download_url":"https://codeload.github.com/betsol/AssetsReferencerBundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243624814,"owners_count":20321171,"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-11-20T17:16:12.306Z","updated_at":"2025-03-14T18:29:13.040Z","avatar_url":"https://github.com/betsol.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AssetsReferencerBundle\n\n## Description\n\nThis bundle will provide you with Twig function, that can be used to reference assets,\ni.e. CSS, JavaScript and image files from inside your templates.\n\nYou will be able to change base URL of the assets by a single configuration option.\n\n### Features\n\n- Allows you to define assets in your Twig templates in a consistent way\n- Provides you with the ability to change base URL of all your assets in one place\n\n## Installation\n\n### Install library with Composer\n\n`composer require betsol/assets-referencer-bundle ~1.0`\n\n### Add bundle to your application's kernel\n\n``` php\n// app/AppKernel.php\n\nclass AppKernel extends Kernel\n{\n    public function registerBundles()\n    {\n        $bundles = array(\n            ...\n            new Betsol\\Bundle\\AssetsReferencerBundle\\AssetsReferencerBundle,\n        );\n\n        ...\n    }\n}\n```\n\n### Introduce bundle configuration to your config file\n\n``` yaml\n# app/config/config.yml\n\nassets_referencer:\n    base_url: http://static.example.com/\n```\n\n## Usage\n\nUse `asset_reference` function in your Twig templates to specify paths for your assets.\n\n```django\n{# Favicon #}\n\u003clink rel=\"icon\" href=\"{{ asset_reference('favicon.ico') }}\"\u003e\n\n{# Stylesheet #}\n\u003clink href=\"{{ asset_reference('css/index.css') }}\" rel=\"stylesheet\"\u003e\n\n{# JavaScript #}\n\u003cscript type=\"text/javascript\" src=\"{{ asset_reference('js/index.js') }}\"\u003e\u003c/script\u003e\n\n{# Image #}\n\u003cimg src=\"{{ asset_reference('images/logo.png') }}\" alt=\"Logotype\"\u003e\n```\n\n## API\n\nSee the examples above.\n\n## Feedback\n\nIf you have found a bug or have another issue with the library - please [create an issue][new-issue]\nin this GitHub repository.\n\nIf you have a question - file it with [StackOverflow][so-ask] and send a\nlink to [my E-Mail address][email]. I will be glad to help.\n\nHave any ideas or propositions? Feel free to [contact me][email].\n\nCheers!\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2014 Better Solutions, Slava Fomin II \u003cs.fomin@betsol.ru\u003e\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n[so-ask]: http://stackoverflow.com/questions/ask?tags=php,symfony2\n[email]: mailto:s.fomin@betsol.ru\n[new-issue]: https://github.com/betsol/AssetsReferencerBundle/issues/new\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbetsol%2Fassetsreferencerbundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbetsol%2Fassetsreferencerbundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbetsol%2Fassetsreferencerbundle/lists"}