{"id":13852369,"url":"https://github.com/chapter-three/drupal-8-theming","last_synced_at":"2025-04-30T10:42:10.834Z","repository":{"id":144983660,"uuid":"71399666","full_name":"chapter-three/drupal-8-theming","owner":"chapter-three","description":"Training documents for \"Drupal 8 Theming for Drupal 7 Themers\"","archived":false,"fork":false,"pushed_at":"2018-11-27T15:34:38.000Z","size":6547,"stargazers_count":71,"open_issues_count":1,"forks_count":35,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-04-30T10:42:03.424Z","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/chapter-three.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":"2016-10-19T21:11:58.000Z","updated_at":"2024-12-10T11:09:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"de1b429c-ec3e-44f1-a3fe-06b581f9541f","html_url":"https://github.com/chapter-three/drupal-8-theming","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chapter-three%2Fdrupal-8-theming","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chapter-three%2Fdrupal-8-theming/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chapter-three%2Fdrupal-8-theming/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chapter-three%2Fdrupal-8-theming/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chapter-three","download_url":"https://codeload.github.com/chapter-three/drupal-8-theming/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251684789,"owners_count":21627193,"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-08-04T22:01:17.347Z","updated_at":"2025-04-30T10:42:10.828Z","avatar_url":"https://github.com/chapter-three.png","language":"PHP","readme":"# Drupal 8 Theming Training\n\n## Description\n\nAre you struggling with Drupal 8 theming? New to Drupal or Drupal 8? \n\nLet's take it from the top!\n\nThis hands-on training will take you step-by-step through the process of creating a custom theme in Drupal 8. There will also be time for Drupal Q\u0026A.\n\n\nAlong the way, we'll cover:\n\n- Setting up Your local development environment \n- Working with YAML files\n- Adding assets responsibly\n- Getting, modifying and display Drupal data in the template\n- Cool Twig tips and Tricks\n- Preprocessing template functions and hooks\n- Basic OOPHP principles\n- Kint, theme_debug and other changes to debugging\n- Leveraging new Drupal 8 site building paradigms to make theming easier\n- Where to find help\n\n\n## Notes:\n\n* All terminal commands are run from the Drupal root. \n\n* `$` indicates a prompt. You do not need to type it into the terminal window.\n\n* `MYDRUPAL` refers to the Drupal root directory or base URL.\n\n* You'll have an easier time if you configure your editor to use spaces instead of tabs. \n\n* Feel free to ask any of the \"Questions you may have ...\" someone probably asked the question before!\n\n* If you're using Lando, `composer` becomes `lando composer`, `drush` becomes `lando drush`.  \n\n* See a mistake or typo? Submit a pull request on Github! \n\n* Common hiccups are:\n  * Syntax errors\n  * Too many or not enough spaces in .yml files\n  * Cache not cleared\n  * PHP memory limit not high enough (\u003e= 256) \n    * settings.php\n       - `ini_set('memory_limit', '512M');`\n    * php.ini \n      - `'memory_limit' = '512M'`\n\n## Basic terminal commands used.\n\nChange Directory. \n\n```cd ```\n\nCreate File.\n\n```touch``` (`new-item` on Windows PowerShell)\n\nCreate Folder.\n\n```mkdir```\n\nMove file from one location to another.\n\n```mv```\n\nCopy file to a new location.\n\n```cp``` (`copy` on Windows PowerShell)\n\n\n## Final Folder Structure\n\n```\nMYDRUPAL/themes/custom\n                    └── acme\n                        ├── acme.breakpoints.yml\n                        ├── acme.info.yml\n                        ├── acme.libraries.yml\n                        ├── acme.settings.yml\n                        ├── acme.theme\n                        ├── css\n                        │   ├── css-stuff-print.css\n                        │   ├── css-stuff.css\n                        │   └── custom-widget.css\n                        ├── images\n                        │   └── mysvg.svg\n                        ├── js\n                        │   └── custom-widget.js\n                        ├── templates\n                        │   ├── block\n                        │   │   └── block--system-powered-by-block.html.twig\n                        │   ├── html\n                        │   │   └── html.html.twig\n                        │   ├── node\n                        │   │   └── node.html.twig\n                        │   └── page\n                        │       └── page.html.twig\n                        └── theme-settings.php\n```\n\n\n## Exercises\n \n[Exercise 1 - Local Setup](https://docs.google.com/document/d/1KZsdw7u4KoMo2HZqdWz-1gS8pDeV5JhWbIxGe-dt97g/edit?usp=sharing)\n\n[Exercise 2 - Add Content](exercise_02-add-content.md)\n\n[Exercise 3 - Contrib Themes](exercise_03-contrib-themes.md)\n\n[Exercise 4 - Dot Info File](exercise_04-dot-info.md)\n\n[Exercise 5 - Libraries](exercise_05-libraries.md)\n\n[Exercise 6 - Intro to Twig](exercise_06-intro-to-twig.md)\n\n[Exercise 7 - Regions](exercise_07-twig-new-region.md)\n\n[Exercise 8 - Dot Syntax](exercise_08-twig-dot-syntax.md)\n\n[Exercise 9 - Twig Classes](exercise_09-twig-classes.md)\n\n[Exercise 10 - Twig Filters](exercise_10-twig-filters.md)\n\n[Exercise 11 - Twig Blocks](exercise_11-twig-block.md)\n\n[Exercise 12 - Include SVG](exercise_12-twig-include-svg.md)\n\n[Exercise 13 - Preprocess Function](exercise_13-preprocess.md)\n\n[Exercise 14 - Template Suggestions](exercise_14-new-template-suggestions.md)\n\n[Exercise 15 - Add Classes with PHP](exercise_15-preprocess-add-classses.md)\n\n[Exercise 16 - Form Alter](exercise_16-form-alter.md)\n\n[Exercise 17 - Responsive Images](exercise_17-responsive.md)\n\n[Exercise 18 - Custom Theme Settings 1](exercise_18-theme-settings1.md)\n\n[Exercise 19 - Custom Theme Settings 2](exercise_19-theme-settings2.md)\n\n## Style Guides for Contributors\n\n###### Path to files and directories.\n\n**MYDRUPAL/themes** Path to files and directories.\n\n###### Name of file or directory\n**node.html.twig**\n\n###### Code.\n\n```bash\n $ cd drupal\n```\n\n###### Url\n*http://MYDRUPAL/admin/config*\n\n\n## Done ☺\n","funding_links":[],"categories":["PHP"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchapter-three%2Fdrupal-8-theming","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchapter-three%2Fdrupal-8-theming","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchapter-three%2Fdrupal-8-theming/lists"}