Skip to content

Commit f09e226

Browse files
committed
Add missing markdown and smtp
1 parent 108601d commit f09e226

9 files changed

+2018
-1925
lines changed

composer.json

+3
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
"drupal/google_analytics": "^2.2.0",
6565
"drupal/inline_entity_form": "^1.0.0-beta1",
6666
"drupal/languagefield": "^1.4.0",
67+
"drupal/markdown": "^3.0",
6768
"drupal/memcache": "^2.0",
6869
"drupal/metatag": "^1.10",
6970
"drupal/name": "^1.0.0-beta1",
@@ -72,11 +73,13 @@
7273
"drupal/quick_node_clone": "^1.15",
7374
"drupal/recaptcha": "^3.0",
7475
"drupal/redirect": "^1.0.0",
76+
"drupal/smtp": "^1.2",
7577
"drupal/token": "^1.1.0",
7678
"drupal/upgrade_status": "^3.11",
7779
"drupal/views_slideshow": "^4.6.0",
7880
"drupal/webform": "^6.1",
7981
"drush/drush": "*",
82+
"league/commonmark": "^1",
8083
"webmozart/path-util": "^2.3.0"
8184
},
8285
"require-dev": {

composer.lock

+1,849-1,861
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docroot/.ht.router.php

+6
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@
2424
* @see http://php.net/manual/en/features.commandline.webserver.php
2525
*/
2626

27+
if (PHP_SAPI !== 'cli-server') {
28+
// Bail out if this is not PHP's Development Server.
29+
header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden');
30+
exit;
31+
}
32+
2733
$url = parse_url($_SERVER['REQUEST_URI']);
2834
if (file_exists(__DIR__ . $url['path'])) {
2935
// Serve the requested resource as-is.

docroot/.htaccess

+9-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44

55
# Protect files and directories from prying eyes.
6-
<FilesMatch "\.(engine|inc|install|make|module|profile|po|sh|.*sql|theme|twig|tpl(\.php)?|xtmpl|yml)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^(\.(?!well-known).*|Entries.*|Repository|Root|Tag|Template|composer\.(json|lock)|web\.config)$|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig|\.save)$">
6+
<FilesMatch "\.(engine|inc|install|make|module|profile|po|sh|.*sql|theme|twig|tpl(\.php)?|xtmpl|yml)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^(\.(?!well-known).*|Entries.*|Repository|Root|Tag|Template|composer\.(json|lock)|web\.config|yarn\.lock|package\.json)$|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig|\.save)$">
77
<IfModule mod_authz_core.c>
88
Require all denied
99
</IfModule>
@@ -32,12 +32,17 @@ AddEncoding gzip svgz
3232
php_value assert.active 0
3333
</IfModule>
3434

35+
# PHP 8, Apache 1 and 2.
36+
<IfModule mod_php.c>
37+
php_value assert.active 0
38+
</IfModule>
39+
3540
# Requires mod_expires to be enabled.
3641
<IfModule mod_expires.c>
3742
# Enable expirations.
3843
ExpiresActive On
3944

40-
# Cache all files for 2 weeks after access (A).
45+
# Cache all files and redirects for 2 weeks after access (A).
4146
ExpiresDefault A1209600
4247

4348
<FilesMatch \.php$>
@@ -153,12 +158,12 @@ AddEncoding gzip svgz
153158
# Serve gzip compressed CSS files if they exist and the client accepts gzip.
154159
RewriteCond %{HTTP:Accept-encoding} gzip
155160
RewriteCond %{REQUEST_FILENAME}\.gz -s
156-
RewriteRule ^(.*)\.css $1\.css\.gz [QSA]
161+
RewriteRule ^(.*css_[a-zA-Z0-9-_]+)\.css$ $1\.css\.gz [QSA]
157162

158163
# Serve gzip compressed JS files if they exist and the client accepts gzip.
159164
RewriteCond %{HTTP:Accept-encoding} gzip
160165
RewriteCond %{REQUEST_FILENAME}\.gz -s
161-
RewriteRule ^(.*)\.js $1\.js\.gz [QSA]
166+
RewriteRule ^(.*js_[a-zA-Z0-9-_]+)\.js$ $1\.js\.gz [QSA]
162167

163168
# Serve correct content types, and prevent double compression.
164169
RewriteRule \.css\.gz$ - [T=text/css,E=no-gzip:1,E=no-brotli:1]

docroot/robots.txt

+4
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ Disallow: /user/register
4949
Disallow: /user/password
5050
Disallow: /user/login
5151
Disallow: /user/logout
52+
Disallow: /media/oembed
53+
Disallow: /*/media/oembed
5254
# Paths (no clean URLs)
5355
Disallow: /index.php/admin/
5456
Disallow: /index.php/comment/reply/
@@ -59,3 +61,5 @@ Disallow: /index.php/user/password
5961
Disallow: /index.php/user/register
6062
Disallow: /index.php/user/login
6163
Disallow: /index.php/user/logout
64+
Disallow: /index.php/media/oembed
65+
Disallow: /index.php/*/media/oembed

docroot/sites/default/default.services.yml

+33-9
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,21 @@ parameters:
9393
# Disabling the Twig cache is not recommended in production environments.
9494
# @default true
9595
cache: true
96+
# File extensions:
97+
#
98+
# List of file extensions the Twig system is allowed to load via the
99+
# twig.loader.filesystem service. Files with other extensions will not be
100+
# loaded unless they are added here. For example, to allow a file named
101+
# 'example.partial' to be loaded, add 'partial' to this list. To load files
102+
# with no extension, add an empty string '' to the list.
103+
#
104+
# @default ['css', 'html', 'js', 'svg', 'twig']
105+
allowed_file_extensions:
106+
- css
107+
- html
108+
- js
109+
- svg
110+
- twig
96111
renderer.config:
97112
# Renderer required cache contexts:
98113
#
@@ -132,6 +147,14 @@ parameters:
132147
#
133148
# @default []
134149
tags: []
150+
# Renderer cache debug:
151+
#
152+
# Allows cache debugging output for each rendered element.
153+
#
154+
# Enabling render cache debugging is not recommended in production
155+
# environments.
156+
# @default false
157+
debug: false
135158
# Cacheability debugging:
136159
#
137160
# Responses with cacheability metadata (CacheableResponseInterface instances)
@@ -146,15 +169,15 @@ parameters:
146169
# @default false
147170
http.response.debug_cacheability_headers: false
148171
factory.keyvalue: {}
149-
# Default key/value storage service to use.
150-
# @default keyvalue.database
151-
# default: keyvalue.database
152-
# Collection-specific overrides.
153-
# state: keyvalue.database
172+
# Default key/value storage service to use.
173+
# @default keyvalue.database
174+
# default: keyvalue.database
175+
# Collection-specific overrides.
176+
# state: keyvalue.database
154177
factory.keyvalue.expirable: {}
155-
# Default key/value expirable storage service to use.
156-
# @default keyvalue.database.expirable
157-
# default: keyvalue.database.expirable
178+
# Default key/value expirable storage service to use.
179+
# @default keyvalue.database.expirable
180+
# default: keyvalue.database.expirable
158181
# Allowed protocols for URL generation.
159182
filter_protocols:
160183
- http
@@ -181,7 +204,8 @@ parameters:
181204
allowedHeaders: []
182205
# Specify allowed request methods, specify ['*'] to allow all possible ones.
183206
allowedMethods: []
184-
# Configure requests allowed from specific origins.
207+
# Configure requests allowed from specific origins. Do not include trailing
208+
# slashes with URLs.
185209
allowedOrigins: ['*']
186210
# Sets the Access-Control-Expose-Headers header.
187211
exposedHeaders: false

docroot/sites/default/default.settings.php

+112-49
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,21 @@
138138
* request as needed. The fourth line creates a new database with a name of
139139
* "extra".
140140
*
141+
* For MySQL, MariaDB or equivalent databases the 'isolation_level' option can
142+
* be set. The recommended transaction isolation level for Drupal sites is
143+
* 'READ COMMITTED'. The 'REPEATABLE READ' option is supported but can result
144+
* in deadlocks, the other two options are 'READ UNCOMMITTED' and 'SERIALIZABLE'.
145+
* They are available but not supported; use them at your own risk. For more
146+
* info:
147+
* https://dev.mysql.com/doc/refman/5.7/en/innodb-transaction-isolation-levels.html
148+
*
149+
* On your settings.php, change the isolation level:
150+
* @code
151+
* $databases['default']['default']['init_commands'] = [
152+
* 'isolation_level' => 'SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED',
153+
* ];
154+
* @endcode
155+
*
141156
* You can optionally set a prefix for all database table names by using the
142157
* 'prefix' setting. If a prefix is specified, the table name will be prepended
143158
* with its value. Be sure to use valid database characters only, usually
@@ -170,9 +185,9 @@
170185
* information on these defaults and the potential issues.
171186
*
172187
* More details can be found in the constructor methods for each driver:
173-
* - \Drupal\Core\Database\Driver\mysql\Connection::__construct()
174-
* - \Drupal\Core\Database\Driver\pgsql\Connection::__construct()
175-
* - \Drupal\Core\Database\Driver\sqlite\Connection::__construct()
188+
* - \Drupal\mysql\Driver\Database\mysql\Connection::__construct()
189+
* - \Drupal\pgsql\Driver\Database\pgsql\Connection::__construct()
190+
* - \Drupal\sqlite\Driver\Database\sqlite\Connection::__construct()
176191
*
177192
* Sample Database configuration format for PostgreSQL (pgsql):
178193
* @code
@@ -343,10 +358,13 @@
343358
# $settings['reverse_proxy'] = TRUE;
344359

345360
/**
346-
* Specify every reverse proxy IP address in your environment.
347-
* This setting is required if $settings['reverse_proxy'] is TRUE.
361+
* Reverse proxy addresses.
362+
*
363+
* Specify every reverse proxy IP address in your environment, as an array of
364+
* IPv4/IPv6 addresses or subnets in CIDR notation. This setting is required if
365+
* $settings['reverse_proxy'] is TRUE.
348366
*/
349-
# $settings['reverse_proxy_addresses'] = ['a.b.c.d', ...];
367+
# $settings['reverse_proxy_addresses'] = ['a.b.c.d', 'e.f.g.h/24', ...];
350368

351369
/**
352370
* Reverse proxy trusted headers.
@@ -490,6 +508,48 @@
490508
*/
491509
# $settings['file_public_path'] = 'sites/default/files';
492510

511+
/**
512+
* Additional public file schemes:
513+
*
514+
* Public schemes are URI schemes that allow download access to all users for
515+
* all files within that scheme.
516+
*
517+
* The "public" scheme is always public, and the "private" scheme is always
518+
* private, but other schemes, such as "https", "s3", "example", or others,
519+
* can be either public or private depending on the site. By default, they're
520+
* private, and access to individual files is controlled via
521+
* hook_file_download().
522+
*
523+
* Typically, if a scheme should be public, a module makes it public by
524+
* implementing hook_file_download(), and granting access to all users for all
525+
* files. This could be either the same module that provides the stream wrapper
526+
* for the scheme, or a different module that decides to make the scheme
527+
* public. However, in cases where a site needs to make a scheme public, but
528+
* is unable to add code in a module to do so, the scheme may be added to this
529+
* variable, the result of which is that system_file_download() grants public
530+
* access to all files within that scheme.
531+
*/
532+
# $settings['file_additional_public_schemes'] = ['example'];
533+
534+
/**
535+
* File schemes whose paths should not be normalized:
536+
*
537+
* Normally, Drupal normalizes '/./' and '/../' segments in file URIs in order
538+
* to prevent unintended file access. For example, 'private://css/../image.png'
539+
* is normalized to 'private://image.png' before checking access to the file.
540+
*
541+
* On Windows, Drupal also replaces '\' with '/' in URIs for the local
542+
* filesystem.
543+
*
544+
* If file URIs with one or more scheme should not be normalized like this, then
545+
* list the schemes here. For example, if 'porcelain://china/./plate.png' should
546+
* not be normalized to 'porcelain://china/plate.png', then add 'porcelain' to
547+
* this array. In this case, make sure that the module providing the 'porcelain'
548+
* scheme does not allow unintended file access when using '/../' to move up the
549+
* directory tree.
550+
*/
551+
# $settings['file_sa_core_2023_005_schemes'] = ['porcelain'];
552+
493553
/**
494554
* Private file path:
495555
*
@@ -553,7 +613,7 @@
553613
*
554614
* Note: This setting does not apply to installation and update pages.
555615
*/
556-
# $settings['maintenance_theme'] = 'bartik';
616+
# $settings['maintenance_theme'] = 'claro';
557617

558618
/**
559619
* PHP settings:
@@ -578,21 +638,6 @@
578638
# ini_set('pcre.backtrack_limit', 200000);
579639
# ini_set('pcre.recursion_limit', 200000);
580640

581-
/**
582-
* Add Permissions-Policy header to disable Google FLoC.
583-
*
584-
* By default, Drupal sends the 'Permissions-Policy: interest-cohort=()' header
585-
* to disable Google's Federated Learning of Cohorts feature, introduced in
586-
* Chrome 89.
587-
*
588-
* See https://en.wikipedia.org/wiki/Federated_Learning_of_Cohorts for more
589-
* information about FLoC.
590-
*
591-
* If you don't wish to disable FLoC in Chrome, you can set this value
592-
* to FALSE.
593-
*/
594-
# $settings['block_interest_cohort'] = TRUE;
595-
596641
/**
597642
* Configuration overrides.
598643
*
@@ -618,33 +663,6 @@
618663
# $config['system.site']['name'] = 'My Drupal site';
619664
# $config['user.settings']['anonymous'] = 'Visitor';
620665

621-
/**
622-
* Fast 404 pages:
623-
*
624-
* Drupal can generate fully themed 404 pages. However, some of these responses
625-
* are for images or other resource files that are not displayed to the user.
626-
* This can waste bandwidth, and also generate server load.
627-
*
628-
* The options below return a simple, fast 404 page for URLs matching a
629-
* specific pattern:
630-
* - $config['system.performance']['fast_404']['exclude_paths']: A regular
631-
* expression to match paths to exclude, such as images generated by image
632-
* styles, or dynamically-resized images. The default pattern provided below
633-
* also excludes the private file system. If you need to add more paths, you
634-
* can add '|path' to the expression.
635-
* - $config['system.performance']['fast_404']['paths']: A regular expression to
636-
* match paths that should return a simple 404 page, rather than the fully
637-
* themed 404 page. If you don't have any aliases ending in htm or html you
638-
* can add '|s?html?' to the expression.
639-
* - $config['system.performance']['fast_404']['html']: The html to return for
640-
* simple 404 pages.
641-
*
642-
* Remove the leading hash signs if you would like to alter this functionality.
643-
*/
644-
# $config['system.performance']['fast_404']['exclude_paths'] = '/\/(?:styles)|(?:system\/files)\//';
645-
# $config['system.performance']['fast_404']['paths'] = '/\.(?:txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i';
646-
# $config['system.performance']['fast_404']['html'] = '<!DOCTYPE html><html><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The requested URL "@path" was not found on this server.</p></body></html>';
647-
648666
/**
649667
* Load services definition file.
650668
*/
@@ -703,6 +721,8 @@
703721
* @endcode
704722
* will allow the site to run off of all variants of example.com and
705723
* example.org, with all subdomains included.
724+
*
725+
* @see https://www.drupal.org/docs/installing-drupal/trusted-host-settings
706726
*/
707727

708728
/**
@@ -752,6 +772,49 @@
752772
*/
753773
$settings['migrate_node_migrate_type_classic'] = FALSE;
754774

775+
/**
776+
* The default settings for migration sources.
777+
*
778+
* These settings are used as the default settings on the Credential form at
779+
* /upgrade/credentials.
780+
*
781+
* - migrate_source_version - The version of the source database. This can be
782+
* '6' or '7'. Defaults to '7'.
783+
* - migrate_source_connection - The key in the $databases array for the source
784+
* site.
785+
* - migrate_file_public_path - The location of the source Drupal 6 or Drupal 7
786+
* public files. This can be a local file directory containing the source
787+
* Drupal 6 or Drupal 7 site (e.g /var/www/docroot), or the site address
788+
* (e.g http://example.com).
789+
* - migrate_file_private_path - The location of the source Drupal 7 private
790+
* files. This can be a local file directory containing the source Drupal 7
791+
* site (e.g /var/www/docroot), or empty to use the same value as Public
792+
* files directory.
793+
*
794+
* Sample configuration for a drupal 6 source site with the source files in a
795+
* local directory.
796+
*
797+
* @code
798+
* $settings['migrate_source_version'] = '6';
799+
* $settings['migrate_source_connection'] = 'migrate';
800+
* $settings['migrate_file_public_path'] = '/var/www/drupal6';
801+
* @endcode
802+
*
803+
* Sample configuration for a drupal 7 source site with public source files on
804+
* the source site and the private files in a local directory.
805+
*
806+
* @code
807+
* $settings['migrate_source_version'] = '7';
808+
* $settings['migrate_source_connection'] = 'migrate';
809+
* $settings['migrate_file_public_path'] = 'https://drupal7.com';
810+
* $settings['migrate_file_private_path'] = '/var/www/drupal7';
811+
* @endcode
812+
*/
813+
# $settings['migrate_source_connection'] = '';
814+
# $settings['migrate_source_version'] = '';
815+
# $settings['migrate_file_public_path'] = '';
816+
# $settings['migrate_file_private_path'] = '';
817+
755818
/**
756819
* Load local development override configuration, if available.
757820
*

docroot/sites/example.settings.local.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* @see https://wiki.php.net/rfc/expectations
3434
*/
3535
assert_options(ASSERT_ACTIVE, TRUE);
36-
\Drupal\Component\Assertion\Handle::register();
36+
assert_options(ASSERT_EXCEPTION, TRUE);
3737

3838
/**
3939
* Enable local development services.

0 commit comments

Comments
 (0)