This is the drupal 10 codebase for the ReliefWeb site.
ReliefWeb is the largest humanitarian information portal in the world. Founded in 1996, the portal now hosts more than 850,000 humanitarian situation reports, press releases, evaluations, guidelines, assessments, maps and infographics.
The ReliefWeb site offers several type of content.
Reports
: humanitarian situation reports, press releases, evaluations, guidelines, assessments, maps, infographics etc.Jobs
: job opportunities in humanitarian fieldsTraining
: training opportunities in humanitarian fieldsCountries
: humanitarian information on countriesDisasters
: humanitarian information on natural disasters (floods, epidemics etc.)Sources
: organizations (NGOs, governments etc.) that provide humanitarian information or job/training opportuniesTopics
: curated pages dedicated to humanitarian themes and specific humanitarian crisesBlog
: ReliefWeb blog
To ReliefWeb site's codebase is highly customized to facilitate the work of the editorial team and display the various types of content.
The html/modules/custom folder contains custom modules. Some of the most important ones are:
- reliefweb_api provides integration with the ReliefWeb API to power the lists of content
- reliefweb_entities provides customization of the content entities (forms, display etc.)
- reliefweb_fields provides customization of various fields
- reliefweb_files provides handling of the report attachments
- reliefweb_form provides form customizations
- reliefweb_moderation provides everything related to the moderation (editorial) workflow
- reliefweb_revisions handles the display of an entity history for the editorial workflow
- reliefweb_rivers handles the display of lists of content (ex: /updates)
- reliefweb_utility provides various helpers, filters, twig extensions used by the other modules
ReliefWeb
uses the Common Design theme and extends its subtheme.
The html/themes/custom/common_design_subtheme folder contains various custom components and templates.
The docker folder contains the docker file and customizations to build the ReliefWeb site image.
For local development, see local stack.
Sometimes, content on ReliefWeb needs to be retagged. For example when organizations are consolidated.
Most of the time, this can be achieved via a simple script. See retagging for more information.
git clone --branch develop [email protected]:UN-OCHA/rwint9-site.git
cd rwint9-site
mkdir -p private_files
fin start
fin composer install
cp .docksal/settings.local.php html/sites/default/
- edit html/sites/default/settings.php and include snippet below
fin drush si --existing-config
if (file_exists($app_root . '/' . $site_path . '/settings.local.php')) {
include $app_root . '/' . $site_path . '/settings.local.php';
}
# with coverage
XDEBUG_MODE=coverage ./vendor/bin/phpunit --testsuite Unit
XDEBUG_MODE=coverage ./vendor/bin/phpunit --testsuite Existing
# without coverage
./vendor/bin/phpunit --testsuite Unit
./vendor/bin/phpunit --testsuite Existing
or run all test in custom
# with coverage
XDEBUG_MODE=coverage vendor/bin/phpunit
# without coverage
vendor/bin/phpunit
drush rapi-i --alias job --verbose
drush rw-job:index --verbose
cget ocha_ai.settings --include-overridden
cget ocha_ai_tag.settings --include-overridden
cget ocha_ai_chat.settings --include-overridden
cget reliefweb_api.settings --include-overridden
cset ocha_ai.settings plugins.source.reliefweb.api_url https://dev.api-reliefweb-int.ahconu.org/v1
cset ocha_ai.settings plugins.source.reliefweb.converter_url https://xxx:[email protected]/search/converter/json
cset reliefweb_api.settings api_url https://dev.api-reliefweb-int.ahconu.org/v1
cset reliefweb_api.settings api_url_external https://dev.api-reliefweb-int.ahconu.org/v1
cset reliefweb_api.settings website: https://dev.reliefweb-int.ahconu.org
queue:list
queue:run --verbose reliefweb_job_tagger