diff --git a/docs/jobs/nightwatch.md b/docs/jobs/nightwatch.md
index 47da0b0b1a1b5abca494824f693995e748050cf4..18e336e79ab13f32c4ee3208a4fefe25a7c492bb 100644
--- a/docs/jobs/nightwatch.md
+++ b/docs/jobs/nightwatch.md
@@ -1,12 +1,15 @@
 # Nightwatch
 
-If your module contains [Nightwatch](https://nightwatchjs.org/) tests, this job will run them.
-
-It will set up a chrome browser and run the tests against it.
+The `Nightwatch` job will run [Nightwatch](https://nightwatchjs.org/) tests if your project contains them. Your javascript test files will need to match one of the following patterns:
+```
+tests/src/Nightwatch/**/*.js
+modules/*/tests/src/Nightwatch/**/*.js
+tests/modules/*/tests/src/Nightwatch/**/*.js
+```
 
-The results will be available as a `junit` artifact within the job.
+The results will be available as a `junit` artifact within the job, for browsing or download.
 
-This job allows for multiple variants to check previous, current and future versions of Drupal.
+In addition to testing at the 'current' Drupal core version, the Nightwatch job has all five additional [variants](docs/info/variants.md), to cover testing at previous and next core versions.
 
 ## Web driver versions
 
@@ -21,3 +24,12 @@ If your tests with Drupal 11.1+ still need to use the legacy driver, add the fol
     DRUPAL_TEST_WEBDRIVER_PORT: $DRUPAL_TEST_WEBDRIVER_PORT_LEGACY
     DRUPAL_TEST_WEBDRIVER_W3C: "false"
 ```
+
+## Customization
+If you need to add additional arguments to the Nightwatch command, you can use the `_NIGHTWATCH_EXTRA` variable. This can be set at the global level, or just for a specific variant. For example:
+```
+'nightwatch (max PHP version)':
+  variables:
+    _NIGHTWATCH_EXTRA: '--verbose'
+```
+The `--verbose` option writes extra detailed information to the log.
\ No newline at end of file
diff --git a/docs/jobs/pages.md b/docs/jobs/pages.md
index 02ee863a94e67e8ac86f2619e1440e4a78abad66..653f676eb1f35b192d77b35267e862df01fa7029 100644
--- a/docs/jobs/pages.md
+++ b/docs/jobs/pages.md
@@ -1,20 +1,19 @@
-# GitLab Pages
+# Pages
 
-The templates support the ability to publish a GitLab site. You can opt for using a supported default configuration or create your own integration.
+The `pages` job gives you the ability to publish a [GitLab Pages](https://docs.gitlab.com/user/project/pages/) documentation site, powered by [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/).
 
-## Default configuration
+## Configuration
 
-Projects can automatically publish a documentation site powered by [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/) and [GitLab Pages](https://docs.gitlab.com/ee/user/project/pages/).
+You can opt for using a supported default configuration or create your own integration.
+
+### Default configuration
 
 - Get started by creating `mkdocs.yml` and `docs/index.md` files.
 - GitLab Pages has a [tutorial on how to write these files](https://docs.gitlab.com/ee/user/project/pages/getting_started/pages_from_scratch.html).
 - With those in place, a site gets re-published every time the default branch changes. We only auto-publish the default branch for now.
 - [Material for MkDocs has a great docs site](https://squidfunk.github.io/mkdocs-material/) and offers lots of plugins that should work on our GitLab pages. You may need to install their prerequisites in a `before_script` step in the pages job.
 
-### Project Logo
-If the project has a logo image file `logo.png` this should be saved in the project's top-level directory, in accordance with the Drupal standard practice. However, the logo to be displayed in the MkDocs documentation site is taken from the `/docs` folder. This allows for an alternative logo on the documentation site. If there is no logo stored in the `/docs` folder then the file from the top-level folder will be used. You do not need to keep a duplicate file in both places.
-
-## Non-default configuration
+### Non-default configuration
 
 This option is also supported by [GitLab Pages](https://docs.gitlab.com/ee/user/project/pages/). All you need is to generate a `public` folder with the resulting static website that you want.
 
@@ -43,3 +42,9 @@ There are different tools that can generate a full documentation site based on y
 - [PhpDocumentor](https://www.phpdoc.org/)
 
 You could automate those tools and make them generate a folder containing the documentation site and then connect it with the previous code.
+
+## Customization
+To add additional arguments to the `mkdocs` command, you can use the `_MKDOCS_EXTRA` variable. For example: `_MKDOCS_EXTRA: '--verbose'`.
+
+## Project Logo
+If the project has a logo image file `logo.png` this should be saved in the project's top-level directory, in accordance with the Drupal standard practice. However, the logo to be displayed in the MkDocs documentation site is taken from the `/docs` folder. This allows for an alternative logo on the documentation site. If there is no logo stored in the `/docs` folder then the file from the top-level folder will be used. You do not need to keep a duplicate file in both places.
diff --git a/docs/jobs/phpstan.md b/docs/jobs/phpstan.md
index acf09bda051e7dee42ebb47fe93e4825dcfa977c..eb0a1820fa3ed336b6d4ae933009c8f87c17d603 100644
--- a/docs/jobs/phpstan.md
+++ b/docs/jobs/phpstan.md
@@ -2,9 +2,11 @@
 
 The `phpstan` jobs run static code quality checks using [PHPStan](https://phpstan.org/)
 
+## Configuration
+
 If the project contains a `phpstan.neon` configuration file it will be used. If not, a [default configuration](https://git.drupalcode.org/project/gitlab_templates/-/blob/main/assets/phpstan.neon) is used.
 
-The pipeline variable `_PHPSTAN_LEVEL` can be set to a value from 0-9 to specify how relaxed or severe the code quality checks should be. This can be used to temporarily override the value in your `phpstan.neon` file. If no value is given, either in the variable or the file, then the default of 0 is used. See the [PHPStan rule levels](https://phpstan.org/user-guide/rule-levels) for more information.
+## Baseline file
 
 Projects can optionally specify [baseline](https://phpstan.org/user-guide/baseline) file(s) of messages to ignore. The default baseline file `phpstan-baseline.neon` stored in the project top-level folder, will be included if using the default `phpstan.neon` config file. If your project's baseline file is called something different, then specify the name in the `_PHPSTAN_BASELINE_FILENAME` variable:
 ```
@@ -21,8 +23,21 @@ includes:
 
 A new baseline file is created which is available as a job artifact for download. This file will contain all warnings found, including those ignored in the single baseline file named in `_PHPSTAN_BASELINE_FILENAME`. Unmatched messages in the baseline file are reported in the log.
 
-In addition to testing at the current core version, the `phpstan` job has optional variants for the next major and minor core versions and the maximum PHP version.
+## Variants
+In addition to testing at the current core version, the `phpstan` job has optional [variants](docs/info/variants.md) for the next major and minor core versions and the maximum PHP version.
 
 Consider the PHP version when interpreting the results of the PHPStan job, as the analysis may give different results between major versions of PHP.
 
+## Customization
 If you do not want this job to be run, set the variable `SKIP_PHPSTAN: 1`
+
+To add additional arguments to the PHPStan command, you can use the `_PHPSTAN_EXTRA` variable. This can be set at the global level, or just for a specific variant. For example:
+```
+'phpstan (next minor)':
+  variables:
+    _PHPSTAN_EXTRA: '--debug'
+```
+The `--debug` option shows the name of each file that is being checked.
+
+The pipeline variable `_PHPSTAN_LEVEL` can be set to a value from 0-9 to specify how relaxed or severe the code quality checks should be. This can be used to temporarily override the value in your `phpstan.neon` file. If no value is given, either in the variable or the file, then the default of 0 is used. See the [PHPStan rule levels](https://phpstan.org/user-guide/rule-levels) for more information.
+
diff --git a/includes/include.drupalci.main.yml b/includes/include.drupalci.main.yml
index 9e52c63b8d0716a53beb5fffc0b58d9168d9cced..b00381cb54f008489c58a8aeba164f18dc5f37aa 100644
--- a/includes/include.drupalci.main.yml
+++ b/includes/include.drupalci.main.yml
@@ -571,7 +571,8 @@ pages:
         # Do not copy the logo if the destination file already exists.
         test -f docs/logo.png && echo "logo.png not copied to /docs because that file already exists." || cp -v logo.png docs/logo.png
       fi
-    - mkdocs build --site-dir public
+    - echo "Executing mkdocs build --site-dir public $_MKDOCS_EXTRA"
+    - mkdocs build --site-dir public $_MKDOCS_EXTRA
     - printf "$DIVIDER\n* The documentation will be published to the URL $CI_PAGES_URL in the 'pages:deploy' job.$DIVIDER\n"
   artifacts:
     paths:
@@ -731,18 +732,18 @@ phpcs:
     - php --version
     # Rely on PHPStan caching to execute analysis multiple times without performance drawback.
     # Output a copy in junit.
-    - echo "Executing php $CI_PROJECT_DIR/vendor/bin/phpstan analyze . --autoload-file='$CI_PROJECT_DIR/vendor/autoload.php' $LEVEL"
-    - php $CI_PROJECT_DIR/vendor/bin/phpstan analyze . --autoload-file="$CI_PROJECT_DIR/vendor/autoload.php" $LEVEL --no-progress --error-format=junit > $CI_PROJECT_DIR/junit.xml || true
+    - echo "Executing php $CI_PROJECT_DIR/vendor/bin/phpstan analyze . --autoload-file='$CI_PROJECT_DIR/vendor/autoload.php' $LEVEL $_PHPSTAN_EXTRA"
+    - php $CI_PROJECT_DIR/vendor/bin/phpstan analyze . --autoload-file="$CI_PROJECT_DIR/vendor/autoload.php" $LEVEL $_PHPSTAN_EXTRA --no-progress --error-format=junit > $CI_PROJECT_DIR/junit.xml || true
     # Output a copy in GitLab code quality format.
-    - php $CI_PROJECT_DIR/vendor/bin/phpstan analyze . --autoload-file="$CI_PROJECT_DIR/vendor/autoload.php" $LEVEL --no-progress --error-format=gitlab > $CI_PROJECT_DIR/phpstan-quality-report.json || true
+    - php $CI_PROJECT_DIR/vendor/bin/phpstan analyze . --autoload-file="$CI_PROJECT_DIR/vendor/autoload.php" $LEVEL $_PHPSTAN_EXTRA --no-progress --error-format=gitlab > $CI_PROJECT_DIR/phpstan-quality-report.json || true
     # Output a copy in plain text for human logs.
-    - php $CI_PROJECT_DIR/vendor/bin/phpstan analyze . --autoload-file="$CI_PROJECT_DIR/vendor/autoload.php" $LEVEL --no-progress || EXIT_CODE=$?
+    - php $CI_PROJECT_DIR/vendor/bin/phpstan analyze . --autoload-file="$CI_PROJECT_DIR/vendor/autoload.php" $LEVEL $_PHPSTAN_EXTRA --no-progress || EXIT_CODE=$?
     # Delete the phpstan baseline file so that the new one will contain all errors ignored in that baseline file.
     # This has to be delete (not just erase the contents) so that the symlink is broken, which will allow the file to be moved afterwards.
     - rm -v $_PHPSTAN_BASELINE_FILENAME
     - echo "Generating a PHPStan baseline file '$_PHPSTAN_BASELINE_FILENAME' available as a job artifact to download. This file will contain any new errors reported above, plus those already ignored in '$_PHPSTAN_BASELINE_FILENAME' if that file is being used."
     # The baseline is created in the current directory so that the paths are correctly relative. Then the file is moved to the top level folder.
-    - php $CI_PROJECT_DIR/vendor/bin/phpstan analyze . --autoload-file="$CI_PROJECT_DIR/vendor/autoload.php" $LEVEL --no-progress --generate-baseline=$_PHPSTAN_BASELINE_FILENAME --allow-empty-baseline || true
+    - php $CI_PROJECT_DIR/vendor/bin/phpstan analyze . --autoload-file="$CI_PROJECT_DIR/vendor/autoload.php" $LEVEL $_PHPSTAN_EXTRA --no-progress --generate-baseline=$_PHPSTAN_BASELINE_FILENAME --allow-empty-baseline || true
     - mv -v $_PHPSTAN_BASELINE_FILENAME $CI_PROJECT_DIR
     # Fix paths in message text in the reports.
     - cd $CI_PROJECT_DIR && pwd
@@ -1102,7 +1103,8 @@ cspell:
     - $CI_PROJECT_DIR/$_WEB_ROOT/core/node_modules/.bin/nightwatch --version
     # @todo Run per-directory: https://www.drupal.org/project/drupal/issues/3389763
     # - Add DRUPAL_NIGHTWATCH_SEARCH_DIRECTORY=$DRUPAL_PROJECTS_PATH to the below.
-    - cd core && corepack enable && sudo BABEL_DISABLE_CACHE=1 -u www-data -H -E yarn test:nightwatch --tag=$PROJECT_NAME
+    - echo "Executing sudo BABEL_DISABLE_CACHE=1 -u www-data -H -E yarn test:nightwatch --tag=$PROJECT_NAME $_NIGHTWATCH_EXTRA"
+    - cd core && corepack enable && sudo BABEL_DISABLE_CACHE=1 -u www-data -H -E yarn test:nightwatch --tag=$PROJECT_NAME $_NIGHTWATCH_EXTRA
   artifacts:
     expire_in: 6 mos
     expose_as: reports
diff --git a/includes/include.drupalci.variables.yml b/includes/include.drupalci.variables.yml
index 7f71b7beaf887b6c0106acec9f16fbb0897aecb2..17133b221a6ce416d579b8558b14dea91c9d0e36 100644
--- a/includes/include.drupalci.variables.yml
+++ b/includes/include.drupalci.variables.yml
@@ -76,6 +76,10 @@ variables:
     value: ''
     description: 'Set the file name of the Composer patches file that should be applied. That file must be a local file in the project, preferably located in the recommended "./.gitlab-ci/" subdirectory. The path should be relative to the module root or the recommended folder.'
 
+  _MKDOCS_EXTRA:
+    value: ''
+    description: 'Additional options that are appended to the `mkdocs` command in the `pages` job. The default is blank.'
+
   _PHPUNIT_TESTGROUPS:
     value: '--all'
     description: "Comma-separated list of test @group(s) to execute, for example 'group1,group2'. Enter '--all' for all tests in the module (this is the default value). Leave blank if providing test groups via a parallel job matrix."
@@ -92,6 +96,10 @@ variables:
     value: '32'
     description: 'Value for the `--concurrency` parameter when running with `_PHPUNIT_CONCURRENT: 1`.'
 
+  _NIGHTWATCH_EXTRA:
+    value: ''
+    description: 'Additional options that are appended to the `nightwatch` command. The default is blank.'
+
   _ALL_VALIDATE_ALLOW_FAILURE:
     value: ''
     description: 'Set to 1 to allow the all the validation/linting jobs to fail, set to 0 for not allowing any failure. Individual job variables can override this global settings. Leave blank to use the template defaults.'
@@ -176,6 +184,10 @@ variables:
     value: 'phpstan-baseline.neon'
     description: 'The PHPStan baseline file of warnings to ignore. The default is `phpstan-baseline.neon` but a project can have a custom filename if required.'
 
+  _PHPSTAN_EXTRA:
+    value: ''
+    description: 'Additional options that are appended to the `phpstan` command. The default is blank.'
+
   _SHOW_ENVIRONMENT_VARIABLES:
     value: '0'
     description: 'Set to 1 to show all the environment variables in the Composer and PhpUnit jobs. Known variables with Personal Identifiable Information will still be hidden. The default is 0 for no output at all.'