{"id":15011485,"url":"https://github.com/axllent/silverstripe-less","last_synced_at":"2025-04-09T19:08:48.263Z","repository":{"id":6870056,"uuid":"8119052","full_name":"axllent/silverstripe-less","owner":"axllent","description":"LESS CSS module for Silverstripe using lessphp","archived":false,"fork":false,"pushed_at":"2024-01-31T19:43:17.000Z","size":250,"stargazers_count":6,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-23T21:02:44.524Z","etag":null,"topics":["lesscss","silverstripe"],"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/axllent.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2013-02-10T04:32:22.000Z","updated_at":"2024-01-29T04:30:56.000Z","dependencies_parsed_at":"2024-01-29T05:34:15.765Z","dependency_job_id":"65f075e8-5ea8-477f-97d7-d7dbc8c84b3c","html_url":"https://github.com/axllent/silverstripe-less","commit_stats":{"total_commits":86,"total_committers":4,"mean_commits":21.5,"dds":"0.10465116279069764","last_synced_commit":"e3581bf309a201fa40a981bb6858346e07dd0cc9"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axllent%2Fsilverstripe-less","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axllent%2Fsilverstripe-less/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axllent%2Fsilverstripe-less/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axllent%2Fsilverstripe-less/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/axllent","download_url":"https://codeload.github.com/axllent/silverstripe-less/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247861356,"owners_count":21008477,"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":["lesscss","silverstripe"],"created_at":"2024-09-24T19:41:09.089Z","updated_at":"2025-04-09T19:08:48.189Z","avatar_url":"https://github.com/axllent.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Less.php module for Silverstripe\n\nA wrapper for [less.php](https://github.com/wikimedia/less.php) to integrate [LESS](http://lesscss.org/) into Silverstripe.\n\n\n## Features\n\n- Integrates a fork of [less.php](hhttps://github.com/wikimedia/less.php) seamlessly into Silverstripe\n- Includes flushing option (`?flush`) to regenerate CSS stylesheets (ie. force undetected less changes with @import)\n- Writes processed *.css files into `assets/_css` and automatically modifies `Requirements` paths\n- Allows custom global variables to be passed through to less compiling (yaml configuration)\n- Automatic compression of CSS files when in `live` mode (may require an initial `?flush`)\n- Adds any processed editor.less files to TinyMCE (must be included in your front-end template)\n\n\n## Requirements\n\n- Silverstripe ^5\n\n\n## Installation\n\n```shell\ncomposer require axllent/silverstripe-less\n```\n\n## Usage\n\nYou need refer to your less files by their full LESS filenames (eg:`stylesheet.less`).\n\nNote: The `less.php` compiler transforms relative paths like `url('../images/logo.png')` into `url('/themes/site/images/logo.png')` based on the path provided as you included the files, meaning these won't work in Silverstripe due to the exposed directory structure via (`_resources/...`). The two simplest solutions are:\n\n1. Use a variable in your less files to provide the path to your files (ie: do not use relative paths), or:\n2. Include your files using \"_resources\" in the path to your less file, eg: `Requirements:css('_resources/themes/site/css/stylesheet.less');`\n\n\n## Example\n\nIn your page controller:\n```php\n\u003c?php\nuse SilverStripe\\CMS\\Controllers\\ContentController;\nuse SilverStripe\\View\\Requirements;\n\nclass PageController extends ContentController\n{\n    public function init()\n    {\n        parent::init();\n        Requirements:css('themes/site/css/stylesheet.less');\n    }\n}\n```\n\nOr via template\n\n```html\n\u003c% require themedCSS(\"layout.less\") %\u003e\n```\n\nThe generated HTML will point automatically to the **processed** CSS file in `assets/_css`\nrather than the original less file location, for example\n\n```\n\u003clink rel=\"stylesheet\" type=\"text/css\"  href=\"/assets/_css/themes-site-css-stylesheet.css?m=123456789\" /\u003e\n```\n\n## Further documentation\n\n- [Usage.md](docs/en/Usage.md) for usage examples.\n- [Configuration.md](docs/en/Configuration.md) for configuration options.\n- View [Changelog](CHANGELOG.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxllent%2Fsilverstripe-less","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faxllent%2Fsilverstripe-less","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxllent%2Fsilverstripe-less/lists"}