Drupal 10.3ã§å°å ¥ããããã¬ã·ããæ©è½ã¯ãå¾æ¥ã®æ§ç¯æé ãããå¹çåããã¢ã¸ã¥ã¼ã«ãè¨å®ã®é©ç¨ãæè»ã«è¡ãããã®ã¢ããã¼ããæä¾ãã¦ãã¾ããã¾ã å®é¨çï¼experimentalï¼ã¢ã¸ã¥ã¼ã«ã¨ãã¦ã®ä½ç½®ä»ãã§ãããå°æ¥çã«ããå®å®ããæ©è½ã¸ã¨çºå±ãããã¨ãæå¾ ããã¦ãã¾ããæ¬è¨äºã§ã¯ããã®ã¬ã·ãæ©è½ã®æ¦è¦ãã¤ã³ã¹ãã¼ã«æ¹æ³ãã«ã¹ã¿ãã¤ãºæ¹æ³ãããã³ã¬ã·ãä¸è¦§ã®ä½ææé ã解説ãã¾ãã
1. ã¬ã·ãã¨ã¯ä½ãï¼
ã¬ã·ãã¯ãDrupalãµã¤ãæ§ç¯ãç°¡ç´ åããããã®äºåå®ç¾©ãããè¨å®ãã¢ã¸ã¥ã¼ã«ã»ããã§ãã
主ãªç¹å¾´ã¨ãã¦ä»¥ä¸ãæãããã¾ãã
- ã¹ã¯ãªããã¨ãã¦åä½
é©ç¨å¾ã«ã¢ã¯ãã£ãã«ç¨¼åãç¶ããããã§ã¯ãªããããã©ã¼ãã³ã¹ã¸ã®å½±é¿ãå°ãªãã®ãç¹å¾´ã§ãã - ã³ã¼ãã¨è¨å®ã®é©ç¨
ã¬ã·ãå ã§å®ç¾©ãããã¢ã¸ã¥ã¼ã«ããã¼ããã¾ã¨ãã¦ã¤ã³ã¹ãã¼ã«ããé¢é£ããè¨å®ãèªåã§å¤æ´ãã¾ãã - å¯éæ§ï¼revertï¼
ä»å¾ããã«æ¡å ãããè¦éãã®ããæ©è½ã§ããè¨äºå·çæç¹ã§ã¯ãå®å ¨ã«å ã«æ»ãããã«ã¯æåä½æ¥ãå¿ è¦ãªå ´åãããã¾ããããã¬ã·ãé©ç¨åã®ç¶æ ã«æ»ããããä»çµã¿ããç®æãã¦è¨è¨ããã¦ãã¾ãã - ããã°ã©ãã³ã°ä¸è¦
YAMLãã¡ã¤ã«ã«ãã宣è¨çãªè¨è¿°ã§è¨å®ãè¡ããããã³ã¼ããæ¸ããã¨ãªããµã¤ãæ§ç¯ãæ¯æ´ãã¾ãã
2. ã¤ã³ã¹ãã¼ã«ãããã¡ã¤ã«ï¼ãã£ã¹ããªãã¥ã¼ã·ã§ã³ã¨ã®é¢ä¿
ã¬ã·ãã¯å¾æ¥ã®ã¤ã³ã¹ãã¼ã«ãããã¡ã¤ã«ã»ãã£ã¹ããªãã¥ã¼ã·ã§ã³ãå®å ¨ã«ç½®ãæããã®ã§ã¯ãªããããæè»ã«æ§æå¤æ´ãè¡ãããã®ä»çµã¿ã¨ãã¦æ³¨ç®ããã¦ãã¾ãã
- ãã£ã¹ããªãã¥ã¼ã·ã§ã³ï¼ç¹å®ã®ã¦ã¼ã¹ã±ã¼ã¹åãã«ãã¢ã¸ã¥ã¼ã«ãè¨å®ãã¾ã¨ãã¦ããªã¤ã³ã¹ãã¼ã«ããããã±ã¼ã¸ã§ããä¸åº¦ã¤ã³ã¹ãã¼ã«ããã¨ãåºæ¬çãªæ§æããã§ã«æ´ã£ãç¶æ ãããµã¤ãæ§ç¯ãå§ãããã¾ãã
- ã¤ã³ã¹ãã¼ã«ãããã¡ã¤ã«ï¼Drupalãµã¤ããã»ããã¢ããããã¨ãã®åæç¶æ ãå®ç¾©ããä»çµã¿ã§ãã
- ã¬ã·ãï¼æ¢åãµã¤ãã«ãå¾ããé©ç¨ã§ããå°ããã®æ§æããã±ã¼ã¸ã§ãã¢ã¸ã¥ã¼ã«ãè¨å®ãã¾ã¨ãã¦å°å ¥ããã®ã«ä½¿ãã¾ãã
ä»å¾ã¯ããã£ã¹ããªãã¥ã¼ã·ã§ã³ï¼ã¬ã·ãããã¤ã³ã¹ãã¼ã«ãããã¡ã¤ã«ï¼ã¬ã·ããã®ããã«ãã¤ããªããã§å©ç¨ããããããã®é·æãæ´»ããæ´»ç¨ä¾ãå¢ãããã¨ãæå¾ ããã¾ãã
3. ã¬ã·ãã®ã¤ã³ã¹ãã¼ã«æ¹æ³
3.1 Drupalããã¸ã§ã¯ããæºåãã
ã¾ãã¯æ¨æºçãªDrupalããã¸ã§ã¯ããComposerã§ä½æãã¾ãã
composer create-project drupal/recommended-project my-drupal-site
cd my-drupal-site
composer install
3.2 Composer Installer Extenderã®è¨å®
ã¬ã·ããåãæ±ããããoomphinc/composer-installers-extender
ããã±ã¼ã¸ãå°å
¥ãã¾ãã
composer require oomphinc/composer-installers-extender:2.0.1
次ã«ãããã¸ã§ã¯ãã® composer.json
ã§ã¤ã³ã¹ãã¼ã©ã¼ã¿ã¤ãï¼drupal-recipe
ï¼ã®æå®ãããã³ã¬ã·ããé
ç½®ãããã©ã«ããè¨å®ãã¾ãã
{
"extra": {
"installer-types": ["drupal-recipe"],
"installer-paths": {
"docroot/recipes/contrib/{$name}": ["type:drupal-recipe"]
}
}
}
ã¾ããGitHubãGitLabãªã©å¤é¨ããã¬ã·ããåå¾ãããå ´åã¯ãrepositories
ã»ã¯ã·ã§ã³ã«ãªãã¸ããªæ
å ±ã追å ãã¾ãã
"repositories": [
{
"type": "vcs",
"url": "https://github.com/your-recipe-repo"
}
]
3.3 ã¬ã·ãé©ç¨ã®æé
ç®çã®ã¬ã·ããComposerã§ã¤ã³ã¹ãã¼ã«ãã¾ãã
composer require your-recipe-package-name:^1.0
ãã®å¾ãDrupalã³ã¢ã¹ã¯ãªãããå©ç¨ãã¦ã¬ã·ããé©ç¨ãã¾ãï¼æ¬ç¨¿å·çæç¹ã®ã³ãã³ãä¾ï¼ã
php core/scripts/drupal recipe recipes/contrib/your-recipe-name
ããã«ãããæå®ãããã¢ã¸ã¥ã¼ã«ãè¨å®ãèªåçã«å°å ¥ã»å¤æ´ããã¾ãã
è£è¶³
ä»å¾ã®Drupalã¢ãããã¼ãã§ã³ãã³ãã®å½¢æ
ï¼ä¾: drupal recipes:apply
ï¼ãã¤ã³ã¹ãã¼ã«æé ãå¤æ´ãããå¯è½æ§ãããã¾ãã常ã«å
¬å¼ããã¥ã¡ã³ããææ°ãªãªã¼ã¹ãã¼ããåç
§ããææ°æ
å ±ã確èªãã¦ãã ããã
4. ã¬ã·ãã®ã«ã¹ã¿ãã¤ãºæ¹æ³
4.1 recipe.ymlãã¡ã¤ã«ã«ããå®ç¾©
ç¬èªã®ã¬ã·ããä½æããã«ã¯ãrecipe.yml
ãä¸å¿ã«æ§æãå®ç¾©ãã¾ããä¾ãã°ã以ä¸ã®ããã«ã¢ã¸ã¥ã¼ã«ã®ã¤ã³ã¹ãã¼ã«ãè¨å®æä½ãè¨è¿°ã§ãã¾ãã
name: 'Custom Recipe'
type: 'Content type'
recipes:
- base_recipe
install:
- module_name_1
- module_name_2
config:
actions:
user.role.editor:
grantPermissions:
- 'edit any content'
- 'delete any content'
4.2 æ§æãã©ã«ã
/config
: ã¢ã¸ã¥ã¼ã«ä¾åé¢ä¿ããã¤ã³ãã¼ãããè¨å®ã¨ã³ãã£ãã£ãé ç½®/content
: åæã³ã³ãã³ãï¼ãã¼ããã¿ã¯ã½ããã¼ãªã©ï¼ãæä¾
4.3 composer.jsonãã¡ã¤ã«
ã¬ã·ãèªä½ãå¿ è¦ã¨ããã¢ã¸ã¥ã¼ã«ããã¼ãã®ä¾åé¢ä¿ãå®ç¾©ããComposerã§èªåçã«ãã¦ã³ãã¼ãã»é©ç¨ã§ããããã«ãã¾ãã
5. ã¬ã·ãä¸è¦§ã®ä½ææ¹æ³
5.1 JSON:APIã«ããåå¾
JSON:APIã¢ã¸ã¥ã¼ã«ãæå¹åããã¦ããã°ãã¬ã·ãã®ã¨ã³ãã£ãã£æ
å ±ã /jsonapi/recipes
ã¨ã³ããã¤ã³ãããåå¾ãããã¨ãå¯è½ã§ãã
curl -X GET http://your-drupal-site/jsonapi/recipes
5.2 ã«ã¹ã¿ã ãªã¹ããViewsã§ã®è¡¨ç¤º
ããã³ãã¨ã³ãå´ã§ä¸è¨JSONãã¼ã¿ã解æããã¬ã·ãä¸è¦§ã表示ãããã¨ãã§ãã¾ããããã«ãDrupalã®Viewsã¢ã¸ã¥ã¼ã«ã¨çµã¿åããããã¨ã§ãGUIä¸ã§ç°¡åã«ã¬ã·ãä¸è¦§ãã¼ã¸ãæ§ç¯å¯è½ã§ãã
6. ã¬ã·ãæ´»ç¨ä¾ã¨ä»å¾ã®å±æ
- æ¨æºã¬ã·ãï¼ã³ã³ãã³ãã¿ã¤ãï¼ä¾: è¨äºï¼ãç·¨éã¯ã¼ã¯ããã¼ãSEOåããã¼ã«ã»ãããªã©ãå ¬éããã¦ãã¾ããä»å¾ãµã¼ããã¼ãã£ãã³ãã¥ããã£ã«ããã¬ã·ãã®æ¡å ãæå¾ ããã¾ãã
- ãã£ã¹ããªãã¥ã¼ã·ã§ã³ï¼ã¤ã³ã¹ãã¼ã«ãããã¡ã¤ã«ã¨ã®ä½µç¨ï¼ã¬ã·ãã¯ãæ¢åã®å¤§è¦æ¨¡ãã£ã¹ããªãã¥ã¼ã·ã§ã³ãè£å®ããå°è¦æ¨¡ããã±ã¼ã¸ã¨ãã¦ãå©ç¨å¯è½ã§ãã
- 管çUIããã®å°å ¥ï¼Drupal CMSã«ã¯ãããã¸ã§ã¯ããã©ã¦ã¶ã¼ããå®è£ ããã¦ããããã®æ©è½ãéãã¦ã¬ã·ããç°¡åã«æ¤ç´¢ã»ã¤ã³ã¹ãã¼ã«ãããã¨ãã§ãã¾ãã管çç»é¢ããç´æçã«ã¬ã·ããè¦ã¤ããå°å ¥ãããã¨ãå¯è½ã§ãã
ã¾ã¨ã
Drupal 10.3ã§"å®é¨ç"ã«å°å ¥ãããã¬ã·ãã¯ãã¢ã¸ã¥ã¼ã«ãè¨å®ã®é©ç¨ãä¸æ¬ã§è¡ãã便å©ãªä»çµã¿ã§ãããã£ã¹ããªãã¥ã¼ã·ã§ã³ãã¤ã³ã¹ãã¼ã«ãããã¡ã¤ã«ãå®å ¨ã«ç½®ãæããããã§ã¯ããã¾ããããæè»ãªãµã¤ãæ§ç¯ãé¨åçãªæ©è½é©ç¨ãå¿ è¦ãªã±ã¼ã¹ã§å¤§ãã«å½¹ç«ã¤å¯è½æ§ãããã¾ãã
ãã ããæ¬ç¨¿å·çæç¹ã§ã¯ä»æ§ãã³ãã³ããå¤æ´ãããå¯è½æ§ãé«ã段éã§ããå°å ¥ã®éã¯å¿ ãææ°ã®å ¬å¼ããã¥ã¡ã³ããDrupal.orgã®issue queueã確èªããååãªãã¹ããè¡ã£ãä¸ã§å©ç¨ãã¦ãã ããã
ããããDrupalã®ããã¸ã§ã¯ããå§ãã人ã¯ããã²ã¬ã·ãæ©è½ã試ãã¦ã¿ã¦ã¯ãããã§ããããããµã¤ãæ§ç¯ã«ãããæ°ããé¸æè¢ã¨ãã¦ãä»å¾ããã«æ³¨ç®ãé«ã¾ã£ã¦ãããã¨ãäºæ³ããã¾ãã
ããããè¨äº
é¢é£ã³ã³ãã³ã
- Drupal 11ã®æ¦è¦ - åä½ç°å¢ã¨Drupal10ã¨ã®éã
- 大è¦æ¨¡ãµã¤ãã®CMSé¸å®åºæº - ã¤ã³ãã©ã³ã¹ãã¨éç¨è² è·ã®æé©åã¬ã¤ã
- Drupalã®ç¹å¾´ã¨ã¯ï¼ ä»CMSã¨ã®æ¯è¼è§£èª¬
- Drupalã®åºæ¬ï¼æ£ããèªã¿æ¹ã¨æ´å²
- Drupalã®ä½¿ãåæã¯ï¼ä½¿ãã«ããç¹ã¨è§£æ±ºç
- Drupalã使ã£ãä¼å¡ãµã¤ãæ§ç¯ã®ãã¤ã³ãã¨ã¡ãªãã
- Drupalã¨WordPressã®éãâã©ã¡ãã®CMSãæ¡ç¨ãã¹ãã
- ç´æçãªæä½æ§ï¼Drupalã®ç®¡çç»é¢ãå¾¹åºè§£å
- Drupalã®å®å ¨æ§ãæ¯ããã³ãã¥ããã£ã¼ã®åãçµã¿
- ãããã¬ã¹Drupalã®åºç¤ã¨ãã¸ãã¹ã§ã®æ´»ç¨æ³
Drupal åå¿è è¬åº§ããã¯ãã³ãã¼
- Drupal 9/10 åå¿è è¬åº§
- 第 1 å æ´å²ã«è¦ã Drupal ã® DNA
- 第 2 å Drupal ã¯ãã¬ã¼ã ã¯ã¼ã¯ãï¼CMS ãï¼ä»ã® CMS ã¨ã®æ¯è¼
- 第 3 å Drupal ã®ç¹å¾´
- 第 4 å Drupal 9 / 10 ã®ã¤ã³ã¹ãã¼ã« (1)
- 第 5 å Drupal 9 / 10 ã®ã¤ã³ã¹ãã¼ã« (2)
- 第 6 å Drupal ã«ã³ã³ãã³ããæ稿ãã¦ã¿ã
- 第 7 å Drupal ã®ããã£ãã©ãªã¨ã¿ã¯ã½ããã¼ã®ä½¿ãæ¹
- 第 8 å ã³ã³ãã³ã管çã«ããã Drupal ã¨ä»ã® CMS ã¨ã®æ¯è¼
- 第 9 å Drupal ã®ãããã¯ã·ã¹ãã
- 第 10 å Drupal ã®æ¨æºã¯ã¨ãªãã«ãã¼ Views ã®ä½¿ãæ¹
- 第 11 å Drupal ã¨ä»ã® CMS ã®ã¯ã¨ãªãã«ãã¼æ©è½ãæ¯è¼
- 第 12 å Drupal ã®å¤è¨èªæ©è½ã¨ä»ã® CMS ããµã¼ãã¹ã¨ã®æ¯è¼
- 第 13 å Drupal ã®æ¨©éè¨å®ã¨ WordPress ã Movable Type ã¨ã®æ¯è¼
- 第 14 å Drupal ã®ãã¼ãã·ã¹ãã ã«ã¤ãã¦
- 第 15 å Drupal ã®æ¡å¼µã¢ã¸ã¥ã¼ã«ã®é¸å®ã¨ä½¿ãæ¹
- 第 16 å Drupal ããã£ã¨ç¥ãããæ¹ã«åããå種æ å ±