{"id":15173080,"url":"https://github.com/pivaleco/drupal-scaffold","last_synced_at":"2026-02-16T08:02:07.513Z","repository":{"id":74387471,"uuid":"81269273","full_name":"PivaleCo/drupal-scaffold","owner":"PivaleCo","description":"A springboard project for new Drupal 8 projects, using as many standards and best practices as possible.","archived":false,"fork":false,"pushed_at":"2017-05-02T16:53:57.000Z","size":71,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-31T03:39:22.744Z","etag":null,"topics":["composer","drupal-8","drupal8","php","platform","scaffold","springboard"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PivaleCo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":"2017-02-08T00:24:47.000Z","updated_at":"2017-05-11T14:41:09.000Z","dependencies_parsed_at":"2024-01-14T09:16:47.009Z","dependency_job_id":"9cbae780-d238-4827-afb7-cf251bd33109","html_url":"https://github.com/PivaleCo/drupal-scaffold","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PivaleCo/drupal-scaffold","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PivaleCo%2Fdrupal-scaffold","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PivaleCo%2Fdrupal-scaffold/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PivaleCo%2Fdrupal-scaffold/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PivaleCo%2Fdrupal-scaffold/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PivaleCo","download_url":"https://codeload.github.com/PivaleCo/drupal-scaffold/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PivaleCo%2Fdrupal-scaffold/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005332,"owners_count":26083883,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["composer","drupal-8","drupal8","php","platform","scaffold","springboard"],"created_at":"2024-09-27T10:40:56.446Z","updated_at":"2025-10-10T21:05:30.805Z","avatar_url":"https://github.com/PivaleCo.png","language":"PHP","readme":"# Drupal 8 scaffold\n\n## A springboard project for new Drupal 8 projects.\n\nSome areas may be opinionated towards the internal best practices at Real Life Digital, but will stick to community accepted standards as closely as possible.\n\nProvides integration with [platform.sh](https://platform.sh), but isn't dependent on its use. Notably there are some platform.sh sensible default files at:\n\n* .platform.app.yaml\n* .platform/routes.yaml\n* .platform/services.yaml\n* web/sites/default/settings.platformsh.php\n* (Include statement in web/sites/default/example.settings.php)\n\nThis project differs from the [Drupal 8 project template for Platform.sh](https://github.com/platformsh/platformsh-example-drupal8) in that it uses the [drupal-composer/drupal-scaffold](https://github.com/drupal-composer/drupal-scaffold) to build Drupal's scaffolded files (`index.php`, `.htaccess` etc) required on top of the composer dependencies, rather than including them here in this repo.\n\nThis project also aims to provide step-by-step documentation to speed up the roll up time for new projects.\n\n## Improvements\n\nAreas for improvement are welcome through pull requests.\n\n## Prerequisites\n\n* [Composer](https://getcomposer.org/) installed on your development and production environments.\n* A working MySQL or MariaDB database already set up with user permissions set.\n* You have a remote git repository available and set up to accept your new project's git pushes.\n* You have a means of serving the web root from `PROJECT_DIRECTORY`/web wherever you place it on your filesystem.\n* MAMP or LAMP stack set up as per [drupal.org system requirements documentation](https://www.drupal.org/docs/7/system-requirements/web-server)\n\n## Get going\n\n**1. Clone this repository and navigate inside.**\n\n```bash\ngit clone --depth=1 --branch=master git@github.com:reallifedigital/drupal-scaffold.git PROJECT_DIRECTORY\ncd PROJECT_DIRECTORY\n```\n\nwhere `PROJECT_DIRECTORY` is the destination directory for the project.\n\n**2. Remove the .git directory so you can make your own git history.**\n\n```bash\nrm -rf .git\n```\n\n**3. Initialise your repository**\n\n```bash\ngit init \u0026\u0026 git config core.filemode false\n```\n\n**4. Add your remote git repository location**\n\nNote: Ensure permissions are set up on the remote repository (i.e. with your SSH key).\n\n```bash\ngit remote add origin USER@SERVER:REPO\n```\n\nAlter `USER`, `SERVER` and `REPO` above to suit your needs.\n\nNote: for [platform.sh](https://platform.sh) use:\n\n```bash\ngit remote add origin PROJECT_ID@git.LOCATION.platform.sh:PROJECT_ID.git\n```\n\nReplace `PROJECT_ID` with the ID seen in the platform.sh UI, and `LOCATION` with the location which the platform is set up: e.g. 'eu'.\n\n**5. Create initial commit**\n\n```bash\ngit add . \u0026\u0026 git commit -m \"Initial commit\"\n```\n\n**6. Push master branch to your remote**\n\n```bash\ngit push origin master\n```\n\n**7. Build out the scaffold with the included build script**\n\n```bash\n./build\n```\n\nNote: this build script can be used in the general development workflow to build new dependencies. See the contents of this file for more information on building with dev dependencies.\n\n**8. Create a settings.php file**\n\n```bash\ncp web/sites/default/example.settings.php web/sites/default/settings.php\n```\n\nThe example file contains sensible defaults which you can alter for the needs of the project.\n\nAny changes you make to settings.php should be for **all** environments and should be checked into your git repository. This file is **not** git-ignored.\n\n**9. Set up you setting.local.php file**\n\n```bash\ncp web/sites/default/example.development.settings.local.php web/sites/default/settings.local.php\n```\n\nAny changes you make to settings.local.php should be for the current environment only and should **not** be checked into your git repository. This file **is** git-ignored.\n\n\nEdit the file at `web/sites/default/settings.local.php` and set the `$databases` array with your database settings.\n\n**10. Install Drupal**\n\nEither through the web interface:\n\n`http://SERVER_NAME/install.php`\n\nwhere `SERVER_NAME` is your remote or local server name where the site is served from - e.g. localhost.\n\nOr use drush:\n\n```bash\ndrush site-install standard --site-name=\"New site\" --account-name=\"something_but_not_admin\" --account-pass=\"something_secure\" --site-mail=\"you@yourdomain.tld\"\n```\n\nObviously, replace the placeholder argument above with sensible values.\n\nUse: `drush help site-install` for more argument options.\n\n**11. Add your custom code**\n\n* Add your custom theme(s) to web/themes/custom\n* Add your custom module(s) to web/modules/custom\n* Add your static non-PHP libraries to web/libraries\n\n**12. Install contrib modules and themes with composer**\n\n```bash\ncomposer require drupal/PROJECT_NAME\n```\n\n**Tip:** to see available drupal project (module) versions, run:\n\n```bash\ncomposer show -a drupal/PROJECT_NAME | grep versions\n```\n\nand then run, for example:\n\n```bash\ncomposer require \"drupal/PROJECT_NAME:1.0.0\"\n```\n\nwhere `PROJECT_NAME` is the project name at https://drupal.org/project/`PROJECT_NAME`\n\n**13. For any patches to be applied, update composer.json**\n\nFirst, ensure there is an upstream issue on drupal.org. Add an entry the patches section of the `composer.json` file.\n\nFormat to capture key information about the patch should be:\n\n```json\n{\n    \"extra\": {\n        \"patches\": {\n            \"owner/repo\": {\n                \"Module:Version, Issue description, Issue + Comment URL\": \"https://www.drupal.org/files/issues/example.patch\"\n            }\n        }\n    }\n}\n```\n\nFor example:\n```json\n{\n    \"extra\": {\n        \"patches\": {\n            \"drupal/address\": {\n                \"Address:8.x-1.x-dev, Add field settings for global overrides of required/optional behavior, https://www.drupal.org/node/2514126#comment-11917633\": \"https://www.drupal.org/files/issues/2514126-49.field-behavior-settings-as-table.patch\"\n            }\n        }\n    }\n}\n```\n\n* Remember that this is a JSON object - the last patch in the list should not have a trailing comma.\n* Remember that composer.json file use 4 spaces for indentation.\n* Remember to run `composer install` after updating patch entries.\n\n## Further notes\n\n* Config files located in web/sites/default/files are *not* git-ignored, so are safe to include, however, it's recommended to place the config exports outside the web root in the `../config/` directory. The `example.settings.php` file adds this as the default config directory.\n* Uses the [drupal-composer/drupal-scaffold](https://github.com/drupal-composer/drupal-scaffold) project\n* .gitignore file handles common use case, but may need to be tweaked to suit your own project\n* Once you've run composer you should commit the composer.lock file. This file is not git-ignored.\n* `www` symlink is in place for legacy support.\n\n## For contributing to this project\n\nFork the repo on GitHub and submit pull requests. All feedback is appreciated.\n\n## Further reading:\n\n* [Custom Drupal 8 theme up and running with Sass, Singularity, Breakpoint, LiveReload and Gulp](http://www.reallifedigital.com/blog/how-we-got-custom-drupal-8-theme-and-running-sass-singularity-breakpoint-livereload-and-gulp)\n* [Drupal's Coding standards](https://www.drupal.org/docs/develop/standards)\n\n**Author: Barry Fisher**\n\n**Last updated: 2017-03-17**\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpivaleco%2Fdrupal-scaffold","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpivaleco%2Fdrupal-scaffold","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpivaleco%2Fdrupal-scaffold/lists"}