Skip to content

Commit

Permalink
Merge branch 'main' of github.com:Gizra/drupal-starter into translata…
Browse files Browse the repository at this point in the history
…ble-paragraphs
  • Loading branch information
dipakmdhrm committed Nov 13, 2024
2 parents c1e8217 + 19ffe87 commit 99918ac
Show file tree
Hide file tree
Showing 60 changed files with 694 additions and 193 deletions.
7 changes: 4 additions & 3 deletions .ddev/config.local.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,17 @@ hooks:
# @see https://www.drupal.org/node/947312
- exec: drush user-block --uid=1

# Login as AdminOne.
- exec-host: ddev login

# Make sure PHP CLI has no memory limit, this is
# especially for unit testing.
# Web requests should be still limited, as the
# hosting environment won't provide unlimited
# memory either.
# @see https://github.com/drud/ddev/issues/1825#issuecomment-529964728
- exec: perl -pi -e 's/memory_limit.*$/memory_limit = -1/' /etc/php/${DDEV_PHP_VERSION}/cli/conf.d/*.ini

# Login as AdminOne.
- exec-host: ddev login

post-import-db:
# Run DB updates.
- exec: drush updb
Expand Down
4 changes: 2 additions & 2 deletions .ddev/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ additional_fqdns: []
database:
type: mariadb
version: "10.5"
fail_on_hook_fail: true
use_dns_when_possible: true
composer_version: "2"
web_environment:
- COMPOSER_EXIT_ON_PATCH_FAILURE=1
corepack_enable: false
fail_on_hook_fail: true

# Key features of DDEV's config.yaml:

Expand Down Expand Up @@ -204,7 +204,7 @@ fail_on_hook_fail: true

# disable_settings_management: false
# If true, DDEV will not create CMS-specific settings files like
# Drupal's settings.php/settings.ddev.php or TYPO3's AdditionalConfiguration.php
# Drupal's settings.php/settings.ddev.php or TYPO3's additional.php
# In this case the user must provide all such settings.

# You can inject environment variables into the web container with:
Expand Down
7 changes: 7 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"image": "mcr.microsoft.com/devcontainers/universal:2",
"features": {
"ghcr.io/ddev/ddev/install-ddev:latest": {}
},
"postCreateCommand": "./codespaces_setup.sh"
}
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
[![Build Status](https://app.travis-ci.com/Gizra/drupal-starter.svg?branch=main)](https://app.travis-ci.com/Gizra/drupal-starter)

[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=250256146)


# Drupal 10 Starter

Starter repo for Drupal 10 development. This starter is an opinionated approach,
Expand All @@ -22,18 +25,22 @@ us with easier iteration, reading and manipulating yaml files, pre-defined
deployments. See more under ["Deploy to Pantheon"](#deploy-to-pantheon) section.
1. We use [Pluggable Entity View Builder](https://www.drupal.org/project/pluggable_entity_view_builder) to define how an entity should look like. See [example](https://github.com/Gizra/drupal-starter/blob/main/web/modules/custom/server_general/src/Plugin/EntityViewBuilder/NodeLandingPage.php).

## Requirements
## GitHub Codespaces

You can open this project in GitHub Codespaces by clicking the badge at the top of this README. This will open a Codespace with the project already cloned and ready to go.

Once the installation is complete (takes about 10 minutes), you can use `ddev login` to log in to the site as admin user using your default browser.

* [DDEV](https://ddev.readthedocs.io/en/stable/)
## Local Installation

## Installation
The only requirement is having [DDEV](https://ddev.readthedocs.io/en/stable/) installed.

ddev composer install
cp .ddev/config.local.yaml.example .ddev/config.local.yaml
ddev restart

Once the Drupal installation is complete you can use `ddev login` to
log in to the site as user 1 using your default browser.
log in to the site as admin userusing your default browser.

## Default content management

Expand Down
2 changes: 1 addition & 1 deletion ci-scripts/install_ddev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ else
docker login --password "$DOCKER_PASSWORD" --username amitaibu
fi

DDEV_VERSION="v1.23.4"
DDEV_VERSION="v1.23.5"

if ! command -v ddev &>/dev/null; then
echo "Installing ddev."
Expand Down
25 changes: 25 additions & 0 deletions codespaces_setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
set -x

wait_for_docker() {
# Loop until Docker responds, indicating it's ready
while true; do
docker ps > /dev/null 2>&1 && break
sleep 1
done
echo "Docker is ready."
}

wait_for_docker

# Remove lynx to prevent it opening a GUI while installing, which
# would cause the build to get stuck after the `ddev restart`.
sudo apt-get remove -y lynx

# Proceed with commands requiring Docker
ddev composer install
cp .ddev/config.local.yaml.example .ddev/config.local.yaml

# As we have a `ddev login` in the end of the ddev restart, it fails on codespace.
# So we force a success exit code to avoid the build to fail.
ddev restart -y || true
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"drupal/ultimate_cron": "^2.0@alpha",
"drupal/upgrade_status": "^4.0",
"drupal/username_enumeration_prevention": "^1.3",
"drupal/webp": "^1.0@RC",
"drupal/wpf": "^1.2",
"drush/drush": "^12.4",
"longwave/laminas-diactoros": "^2.14",
"npm-asset/anchor-js": "^5.0",
Expand Down
57 changes: 28 additions & 29 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion config/sync/core.extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ module:
user: 0
username_enumeration_prevention: 0
views_ui: 0
webp: 0
workflows: 0
wpf: 0
fast404: 1
menu_link_content: 1
pathauto: 1
Expand Down
6 changes: 6 additions & 0 deletions config/sync/image.style.card.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ effects:
width: 410
height: 192
crop_type: focal_point
346e742d-d17c-4208-b156-5812339ec476:
uuid: 346e742d-d17c-4208-b156-5812339ec476
id: image_convert
weight: 2
data:
extension: webp
6 changes: 6 additions & 0 deletions config/sync/image.style.hero_lg_1x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ effects:
width: 1280
height: 400
crop_type: focal_point
4917daef-1434-4208-bbf7-a5f9e88ed45c:
uuid: 4917daef-1434-4208-bbf7-a5f9e88ed45c
id: image_convert
weight: 2
data:
extension: webp
6 changes: 6 additions & 0 deletions config/sync/image.style.hero_lg_2x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ effects:
width: 2560
height: 800
crop_type: focal_point
4517c920-bb20-40cb-9d8d-2edc4decbbc5:
uuid: 4517c920-bb20-40cb-9d8d-2edc4decbbc5
id: image_convert
weight: 2
data:
extension: webp
6 changes: 6 additions & 0 deletions config/sync/image.style.hero_md_1x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ effects:
width: 1024
height: 320
crop_type: focal_point
845c67f6-75c7-4321-8f87-577ecdf0d917:
uuid: 845c67f6-75c7-4321-8f87-577ecdf0d917
id: image_convert
weight: 2
data:
extension: webp
6 changes: 6 additions & 0 deletions config/sync/image.style.hero_md_2x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ effects:
width: 2048
height: 640
crop_type: focal_point
2c40eafc-0ff8-4d30-8a57-d90ec3be292a:
uuid: 2c40eafc-0ff8-4d30-8a57-d90ec3be292a
id: image_convert
weight: 2
data:
extension: webp
6 changes: 6 additions & 0 deletions config/sync/image.style.hero_mobile_1x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ effects:
width: 640
height: 200
crop_type: focal_point
42df8dd1-c7f1-4e71-8935-4f45a0ae016d:
uuid: 42df8dd1-c7f1-4e71-8935-4f45a0ae016d
id: image_convert
weight: 2
data:
extension: webp
6 changes: 6 additions & 0 deletions config/sync/image.style.hero_mobile_2x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ effects:
width: 1280
height: 400
crop_type: focal_point
56762e47-7354-4f2e-af60-badffc42ed0c:
uuid: 56762e47-7354-4f2e-af60-badffc42ed0c
id: image_convert
weight: 2
data:
extension: webp
6 changes: 6 additions & 0 deletions config/sync/image.style.hero_sm_1x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ effects:
width: 768
height: 240
crop_type: focal_point
5904d9f3-a67c-43d8-bfab-26b10f8f141c:
uuid: 5904d9f3-a67c-43d8-bfab-26b10f8f141c
id: image_convert
weight: 2
data:
extension: webp
6 changes: 6 additions & 0 deletions config/sync/image.style.hero_sm_2x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ effects:
width: 1536
height: 480
crop_type: focal_point
0843a229-7768-4c41-a90f-c633f2fdf82d:
uuid: 0843a229-7768-4c41-a90f-c633f2fdf82d
id: image_convert
weight: 2
data:
extension: webp
6 changes: 6 additions & 0 deletions config/sync/image.style.hero_xl_1x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ effects:
width: 1536
height: 466
crop_type: focal_point
481711d6-f88e-4a03-84ef-ba4314e6ab3f:
uuid: 481711d6-f88e-4a03-84ef-ba4314e6ab3f
id: image_convert
weight: 2
data:
extension: webp
6 changes: 6 additions & 0 deletions config/sync/image.style.hero_xl_2x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ effects:
width: 3072
height: 932
crop_type: focal_point
a13fd71a-b8ca-4ef8-bcf9-0b78a732df01:
uuid: a13fd71a-b8ca-4ef8-bcf9-0b78a732df01
id: image_convert
weight: 2
data:
extension: webp
6 changes: 6 additions & 0 deletions config/sync/image.style.large.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,9 @@ effects:
width: 480
height: 480
crop_type: focal_point
e1eb279b-9d91-47ee-a8b0-acf4dafe076b:
uuid: e1eb279b-9d91-47ee-a8b0-acf4dafe076b
id: image_convert
weight: 2
data:
extension: webp
Loading

0 comments on commit 99918ac

Please sign in to comment.