{"id":15656950,"url":"https://github.com/levdbas/baseplate","last_synced_at":"2025-05-05T15:27:43.245Z","repository":{"id":24183985,"uuid":"89591460","full_name":"Levdbas/BasePlate","owner":"Levdbas","description":"WP Boiler theme ready for Gutenberg. Features Webpack4, browsersync, lazyloading and much more.","archived":false,"fork":false,"pushed_at":"2025-02-10T19:44:48.000Z","size":7559,"stargazers_count":25,"open_issues_count":13,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-30T22:04:51.518Z","etag":null,"topics":["baseplate","browsersync","php","theme","wordplate","wordpress","wordpress-packagist"],"latest_commit_sha":null,"homepage":"","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/Levdbas.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}},"created_at":"2017-04-27T11:44:30.000Z","updated_at":"2025-02-10T19:44:51.000Z","dependencies_parsed_at":"2025-03-09T19:41:39.328Z","dependency_job_id":null,"html_url":"https://github.com/Levdbas/BasePlate","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Levdbas%2FBasePlate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Levdbas%2FBasePlate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Levdbas%2FBasePlate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Levdbas%2FBasePlate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Levdbas","download_url":"https://codeload.github.com/Levdbas/BasePlate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252523472,"owners_count":21761923,"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":["baseplate","browsersync","php","theme","wordplate","wordpress","wordpress-packagist"],"created_at":"2024-10-03T13:04:51.325Z","updated_at":"2025-05-05T15:27:43.226Z","avatar_url":"https://github.com/Levdbas.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BasePlate\n\nBasePlate is a starter theme for WordPress that includes an up-to-date asset manager via WebPack. It comes with a custom Webpack 4 build for compiling css, js, importing jQuery, Bootstrap and manages assets such as fonts and images. Last but not least, it utilizes cache busting by randomizing filenames in production builds.\n\n[![Latest Version](https://img.shields.io/github/release/Levdbas/BasePlate.svg?style=flat)](https://github.com/Levdbas/BasePlate/releases)\n\n## Features\n\n- Twig as a templating engine\n- Scss for stylesheets\n- Modular JavaScript via import\n- Webpack 5 for compiling assets, moving \u0026 optimizing images, transpiling \u0026 minifying JS/CSS and cache busting.\n\n- Ready for lazyloading WordPress attachment images, theme images, theme background images \u0026 iframes\n\n- Gutenberg ready.\n\n- [Browsersync](http://www.browsersync.io/) for synchronized browser testing\n\n- [Bootstrap 5](http://getbootstrap.com/), but import whatever you like.\n\n## Installation\n\nTo use BasePlate, you need to have PHP 7.0+ installed on your machine. You'll also need a recent version of [Node.js](https://nodejs.org/en) installed.\n\nInstall WordPress locally on your AMP stack with a virtual hostname, create a new folder in `wp-content/themes` with the desired name of your template. Clone the latest version of BasePlate inside your new folder.\n\nNext step is to set the proxy address for BrowserSync with hot module reload in the `resources/assets/config.json` file.\n\n**To install required node modules:**\n\n```bash\n\nyarn install\n\n```\n\n#### How do I use webpack?\n\nRun BrowserSync and check for changes and auto-compile on the go:\n\n```bash\n\nyarn run watch\n\n```\n\nRun development build once. Useful for debugging build errors.\n\n```bash\n\nyarn run development\n\n```\n\nRun prodocution to enable cache busting, optimizing images \u0026 minifying for production use:\n\n```bash\n\nyarn run production\n\n```\n\n## Plugins\n\n[WordPress Packagist](https://wpackagist.org) comes straight out of the box with BasePlate. It mirrors the WordPress [plugin](https://plugins.svn.wordpress.org) and [theme](https://themes.svn.wordpress.org) directories as a Composer repository.\n\n#### How do I use it?\n\nRequire the desired plugin or theme using `wpackagist-plugin` or `wpackagist-theme` as the vendor name or add your plugins by adding them to composer.json.\n\n```bash\n\ncomposer require wpackagist-plugin/polylang\n\n```\n\nrun\n\n```bash\n\ncomposer install\n\n```\n\nto load desired plugins.\n\n#### Example\n\nThis is an example of how your `composer.json` file might look like.\n\n```json\n\n\"require\": {\n\n\"wpackagist-plugin/polylang\": \"^2.1\",\n\n\n\n},\n\n```\n\nPlease visit [WordPress Packagist](https://wpackagist.org) website for more information and examples.\n\n## Helpers\n\nYou can import JS files into the app.js to have a more modular approach to your javascript.\n\n```js\n\n//app.js\n\nimport  exampleImport  from  './exampleImport';\n\n...\n\nexampleImport();\n\n//exampleImport.js\n\n\n\nexport default function  exampleImport( ) {\n\n...\n\n}\n\n\n```\n\nAsset helper:\n\n```php\nget_asset('folder/file.ext'); // returns URL to asset\n\nthe_asset('folder/file.ext'); // echoes url to asset\n\nlazyload_img($img_id, $size); // returns lazyloaded WordPress attachment\n\nlazyload_bg_img($img_id, $size); // returns HTML to be injected into an HTML element to lazyload a background image.\n```\n\n## Post Types\n\nFor [custom post types](https://codex.wordpress.org/Post_Types#Custom_Post_Types) we recommend generating them by using [Generate WP](https://generatewp.com/post-type/). One generated place the file in `lib/models/post-type-name.php`. This way, the post-types are within sourcecontrol as well.\n\n## Custom Fields\n\nFor [custom fields](https://codex.wordpress.org/Custom_Fields) we use [Advanced Custom Fields](http://www.advancedcustomfields.com) - Powerful fields for WordPress developers. BasePlate comes out of the box with an `acf-json` folder to have field group definitions in source control as well.\n\n## License\n\n[MIT](LICENSE) © [Erik van der Bas](https://basedonline.nl)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevdbas%2Fbaseplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flevdbas%2Fbaseplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevdbas%2Fbaseplate/lists"}