Skip to content

UN-OCHA/rwint9-site

Repository files navigation

ReliefWeb - Drupal 10 version

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.

Content

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 fields
  • Training: training opportunities in humanitarian fields
  • Countries: humanitarian information on countries
  • Disasters: humanitarian information on natural disasters (floods, epidemics etc.)
  • Sources: organizations (NGOs, governments etc.) that provide humanitarian information or job/training opportunies
  • Topics: curated pages dedicated to humanitarian themes and specific humanitarian crises
  • Blog: ReliefWeb blog

Codebase

To ReliefWeb site's codebase is highly customized to facilitate the work of the editorial team and display the various types of content.

Custom modules

The html/modules/custom folder contains custom modules. Some of the most important ones are:

Theme

ReliefWeb uses the Common Design theme and extends its subtheme.

The html/themes/custom/common_design_subtheme folder contains various custom components and templates.

Docker image

The docker folder contains the docker file and customizations to build the ReliefWeb site image.

Local development

For local development, see local stack.

Retagging

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.

Docksal

  • 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';
}

Testing Coverage Status

# 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

For dev

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