From a9d3c8b644678a823cc3dde4b5410fcc9317d71a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jurij=20Podgor=C5=A1ek?= Date: Wed, 5 Apr 2023 20:30:50 +0200 Subject: [PATCH 1/4] webhook test --- test | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 test diff --git a/test b/test new file mode 100644 index 0000000..e69de29 -- 2.30.2 From 2b8f7fb9cea7159bba8a8d3b024a8dbc3133aa5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jurij=20Podgor=C5=A1ek?= Date: Wed, 5 Apr 2023 21:44:14 +0200 Subject: [PATCH 2/4] Testna vsebina (dve strani, en meni) --- composer.json | 3 + composer.lock | 235 +++++++++++++++++- uvozi-vsebino.sh | 3 + .../yufu_data/content/homepage.content.yml | 11 + .../yufu_data/content/meni.content.yml | 17 ++ .../yufu_data/content/onas.content.yml | 12 + web/modules/yufu_data/yufu_data.info.yml | 5 + 7 files changed, 284 insertions(+), 2 deletions(-) create mode 100755 uvozi-vsebino.sh create mode 100644 web/modules/yufu_data/content/homepage.content.yml create mode 100644 web/modules/yufu_data/content/meni.content.yml create mode 100644 web/modules/yufu_data/content/onas.content.yml create mode 100644 web/modules/yufu_data/yufu_data.info.yml diff --git a/composer.json b/composer.json index 1b64363..13bd127 100644 --- a/composer.json +++ b/composer.json @@ -22,6 +22,9 @@ "drupal/core-recommended": "^10.0", "drupal/gin": "^3.0@RC", "drupal/gin_toolbar": "^1.0@RC", + "drupal/jsonapi_menu_items": "^1.2", + "drupal/single_content_sync": "^1.3", + "drupal/yaml_content": "^1.0@dev", "drush/drush": "^11.4" }, "conflict": { diff --git a/composer.lock b/composer.lock index 9fe7a58..13721e7 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "73a6c15351a576b9f11a60fec8748fd5", + "content-hash": "71ddb6ffcc6a7fe35213ac457365e193", "packages": [ { "name": "asm89/stack-cors", @@ -1593,6 +1593,236 @@ } ] }, + { + "name": "drupal/jsonapi_menu_items", + "version": "1.2.4", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/jsonapi_menu_items.git", + "reference": "1.2.4" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/jsonapi_menu_items-1.2.4.zip", + "reference": "1.2.4", + "shasum": "84f4c896b7addbe21c6af7261b0ea4a1740dd9eb" + }, + "require": { + "drupal/core": "^9 || ^10", + "drupal/jsonapi_resources": "^1.0" + }, + "require-dev": { + "drupal/jsonapi_hypermedia": "^1.6" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "1.2.4", + "datestamp": "1670645270", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "acbramley", + "homepage": "https://www.drupal.org/user/1036766" + }, + { + "name": "Deciphered", + "homepage": "https://www.drupal.org/user/103796" + }, + { + "name": "larowlan", + "homepage": "https://www.drupal.org/user/395439" + }, + { + "name": "mglaman", + "homepage": "https://www.drupal.org/user/2416470" + } + ], + "description": "Adds a JSON API resource for menu items.", + "homepage": "https://www.drupal.org/project/jsonapi_menu_items", + "keywords": [ + "Drupal", + "JSON API" + ], + "support": { + "source": "https://git.drupalcode.org/project/jsonapi_menu_items" + } + }, + { + "name": "drupal/jsonapi_resources", + "version": "1.0.0-beta5", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/jsonapi_resources.git", + "reference": "8.x-1.0-beta5" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/jsonapi_resources-8.x-1.0-beta5.zip", + "reference": "8.x-1.0-beta5", + "shasum": "dfd7145978efad8c258b023b47413220e590812b" + }, + "require": { + "drupal/core": "^8.8 || ^9 || ^10" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "8.x-1.0-beta5", + "datestamp": "1668787739", + "security-coverage": { + "status": "not-covered", + "message": "Beta releases are not covered by Drupal security advisories." + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "API-First Initiative", + "homepage": "https://www.drupal.org/user/3616626" + }, + { + "name": "gabesullice", + "homepage": "https://www.drupal.org/user/2287430" + }, + { + "name": "mglaman", + "homepage": "https://www.drupal.org/user/2416470" + } + ], + "description": "This module let's you define custom resources at routes of your choice that use existing resource types.", + "homepage": "https://www.drupal.org/project/jsonapi_resources", + "keywords": [ + "Drupal", + "JSON API" + ], + "support": { + "source": "https://git.drupalcode.org/project/jsonapi_resources" + } + }, + { + "name": "drupal/single_content_sync", + "version": "1.3.13", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/single_content_sync.git", + "reference": "1.3.13" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/single_content_sync-1.3.13.zip", + "reference": "1.3.13", + "shasum": "e1db23df460b5a92c7347f8e85629d7e2fbeeb11" + }, + "require": { + "drupal/core": "^9.3 || ^10", + "ext-dom": "*", + "ext-zip": "*", + "php": ">=7.4" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "1.3.13", + "datestamp": "1680707225", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "Alex Kuzava (nginex)", + "homepage": "https://www.drupal.org/u/nginex", + "role": "Maintainer" + }, + { + "name": "nginex", + "homepage": "https://www.drupal.org/user/2822325" + } + ], + "description": "This is a simple way of exporting a single node to yml file with possibility to import it on another environment.", + "homepage": "https://drupal.org/project/single_content_sync", + "support": { + "source": "https://cgit.drupalcode.org/single_content_sync", + "issues": "https://drupal.org/project/issues/single_content_sync" + } + }, + { + "name": "drupal/yaml_content", + "version": "dev-1.x", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/yaml_content.git", + "reference": "9f39fa762fda3285d091b276b787b4f6247b43c4" + }, + "require": { + "drupal/core": "^9 || ^10" + }, + "require-dev": { + "mikey179/vfsstream": "^1.0" + }, + "type": "drupal-module", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + }, + "drupal": { + "version": "8.x-1.0-alpha8+1-dev", + "datestamp": "1666891400", + "security-coverage": { + "status": "not-covered", + "message": "Project has not opted into security advisory coverage!" + } + }, + "drush": { + "services": { + "drush.services.yml": "^9" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "DamienMcKenna", + "homepage": "https://www.drupal.org/user/108450" + }, + { + "name": "shrop", + "homepage": "https://www.drupal.org/user/14767" + }, + { + "name": "slucero", + "homepage": "https://www.drupal.org/user/1612534" + } + ], + "description": "Demo content generator using yaml content templates.", + "homepage": "https://www.drupal.org/project/yaml_content", + "support": { + "source": "https://git.drupalcode.org/project/yaml_content" + } + }, { "name": "drush/drush", "version": "11.4.0", @@ -6017,7 +6247,8 @@ "minimum-stability": "dev", "stability-flags": { "drupal/gin": 5, - "drupal/gin_toolbar": 5 + "drupal/gin_toolbar": 5, + "drupal/yaml_content": 20 }, "prefer-stable": true, "prefer-lowest": false, diff --git a/uvozi-vsebino.sh b/uvozi-vsebino.sh new file mode 100755 index 0000000..97fc76a --- /dev/null +++ b/uvozi-vsebino.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +ddev drush yaml-content-import-module yufu_data diff --git a/web/modules/yufu_data/content/homepage.content.yml b/web/modules/yufu_data/content/homepage.content.yml new file mode 100644 index 0000000..e246342 --- /dev/null +++ b/web/modules/yufu_data/content/homepage.content.yml @@ -0,0 +1,11 @@ +- entity: "node" + type: "page" + title: YuFu + status: 1 + body: + - format: "plain_text" + value: "Dobrodošli na YuFu projektu.\n\nV izgradnji." + + path: + - alias: '/home' + pathauto: false diff --git a/web/modules/yufu_data/content/meni.content.yml b/web/modules/yufu_data/content/meni.content.yml new file mode 100644 index 0000000..1e46eb3 --- /dev/null +++ b/web/modules/yufu_data/content/meni.content.yml @@ -0,0 +1,17 @@ +- entity: "menu_link_content" + title: "Home" + menu_name: "main" + weight: 0 + # Defaults to enabled if omitted, but can be disabled by setting to 0. + enabled: 1 + link: + uri: "internal:/home" + +- entity: "menu_link_content" + title: "O nas" + menu_name: "main" + weight: 1 + # Defaults to enabled if omitted, but can be disabled by setting to 0. + enabled: 1 + link: + uri: "internal:/o-nas" diff --git a/web/modules/yufu_data/content/onas.content.yml b/web/modules/yufu_data/content/onas.content.yml new file mode 100644 index 0000000..49c416b --- /dev/null +++ b/web/modules/yufu_data/content/onas.content.yml @@ -0,0 +1,12 @@ +- entity: "node" + type: "page" + title: "O projektu" + status: 1 + uid: 1 + body: + - format: "plain_text" + value: "Platforma za pisanje jugofuturističnega manifesta.\r\nVeč o Jugofuturizmu na Maski: https://maska.si/projekti/yufu/\r\nCikel Jugofuturizem na Radiu Študent: https://radiostudent.si/kultura/cikel-jugofuturizem" + + path: + - alias: '/o-nas' + pathauto: false diff --git a/web/modules/yufu_data/yufu_data.info.yml b/web/modules/yufu_data/yufu_data.info.yml new file mode 100644 index 0000000..ff92cf3 --- /dev/null +++ b/web/modules/yufu_data/yufu_data.info.yml @@ -0,0 +1,5 @@ +name: YuFu data +type: module +description: Prvotni podatki (YAML) +package: YuFu +core_version_requirement: ^9 || ^10 -- 2.30.2 From 5dde3ea36b37c884c6c6237ee2d58e8873300fe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jurij=20Podgor=C5=A1ek?= Date: Wed, 5 Apr 2023 21:48:38 +0200 Subject: [PATCH 3/4] Dokumentiran uvoz testne vsebine --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index fc6d85e..77caac1 100644 --- a/README.md +++ b/README.md @@ -41,3 +41,11 @@ Po potrebi vsebino `.env` prilagodimo. Nato poženemo izgrajevalnik / strežnik: `npm run dev` + +### Uvoz testne vsebine + +`./uvozi-vsebino.sh` + +Dodatne testne vsebine lahko definiramo v modulu `yufu_data`, v poddirektoriju `content`. Pazit moramo na ime - vsak fajl se mora končati s `.content.yml`. + +Navodila za konstruiranje fajlov pa so tukaj: https://www.drupal.org/docs/contributed-modules/yaml-content/examples -- 2.30.2 From d66327821466c36efb4adf75113377e5d4c7c09e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jurij=20Podgor=C5=A1ek?= Date: Tue, 11 Apr 2023 01:45:45 +0200 Subject: [PATCH 4/4] Skripte v podfolder, config export, dodan jsonapi meni modul --- README.md | 2 +- config/sync/core.extension.yml | 5 ++++- config/sync/single_content_sync.settings.yml | 9 +++++++++ config/sync/system.action.content_bulk_export.yml | 13 +++++++++++++ uvozi-vsebino.sh => skripte/uvozi-vsebino.sh | 0 5 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 config/sync/single_content_sync.settings.yml create mode 100644 config/sync/system.action.content_bulk_export.yml rename uvozi-vsebino.sh => skripte/uvozi-vsebino.sh (100%) diff --git a/README.md b/README.md index 77caac1..f3204a7 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ Nato poženemo izgrajevalnik / strežnik: ### Uvoz testne vsebine -`./uvozi-vsebino.sh` +`./skripte/uvozi-vsebino.sh` Dodatne testne vsebine lahko definiramo v modulu `yufu_data`, v poddirektoriju `content`. Pazit moramo na ime - vsak fajl se mora končati s `.content.yml`. diff --git a/config/sync/core.extension.yml b/config/sync/core.extension.yml index fae8ba6..75d87ba 100644 --- a/config/sync/core.extension.yml +++ b/config/sync/core.extension.yml @@ -10,7 +10,6 @@ module: comment: 0 config: 0 config_translation: 0 - content_as_config: 0 contextual: 0 datetime: 0 dblog: 0 @@ -25,6 +24,8 @@ module: history: 0 image: 0 jsonapi: 0 + jsonapi_menu_items: 0 + jsonapi_resources: 0 language: 0 link: 0 locale: 0 @@ -40,6 +41,7 @@ module: path_alias: 0 search: 0 serialization: 0 + single_content_sync: 0 system: 0 taxonomy: 0 text: 0 @@ -47,6 +49,7 @@ module: update: 0 user: 0 views_ui: 0 + yaml_content: 0 yufu_admin: 0 content_translation: 10 views: 10 diff --git a/config/sync/single_content_sync.settings.yml b/config/sync/single_content_sync.settings.yml new file mode 100644 index 0000000..1888af6 --- /dev/null +++ b/config/sync/single_content_sync.settings.yml @@ -0,0 +1,9 @@ +_core: + default_config_hash: F--1EKAki5zF_jdKTc4ZLmgN89WJ2SDrMOkwbqj06-Y +allowed_entity_types: + block_content: { } + media: { } + menu_link_content: { } + node: { } + taxonomy_term: { } +site_uuid_check: true diff --git a/config/sync/system.action.content_bulk_export.yml b/config/sync/system.action.content_bulk_export.yml new file mode 100644 index 0000000..8da8b1f --- /dev/null +++ b/config/sync/system.action.content_bulk_export.yml @@ -0,0 +1,13 @@ +uuid: 4eb27688-3e78-463d-8334-eef1c071d827 +langcode: en +status: true +dependencies: + module: + - single_content_sync +_core: + default_config_hash: h64R0kZquzABmTQ3k2X7VbJJvANnn0p3ubKUYNtQj8s +id: content_bulk_export +label: 'Export content' +type: node +plugin: content_bulk_export +configuration: { } diff --git a/uvozi-vsebino.sh b/skripte/uvozi-vsebino.sh similarity index 100% rename from uvozi-vsebino.sh rename to skripte/uvozi-vsebino.sh -- 2.30.2