Skip to content

Commit 5ab7a93

Browse files
committed
feat(docs): Minor updates to Docs
1 parent c82f74f commit 5ab7a93

File tree

3 files changed

+45
-7
lines changed

3 files changed

+45
-7
lines changed

content/en/docs/development/theming/_index.en.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,27 @@ c) Point to your new sub theme for **[WxT Library][wxt_library]** to properly lo
4545

4646
If the theme you are extending has custom block templates these won't be immediately inherited because a sub-theme creates copies of all the blocks in the parent theme and renames them with the sub-theme's name as a prefix. Twig block templates are derived from the block's name, so this breaks the link between these templates and their block.
4747

48-
To fix this problem it requires a hook in the sub-theme by adding the following code snippet to the `THEMENAME.theme` file:
48+
Fixing this problem currently requires a hook in the `THEMENAME.theme` file and should have the following contents:
49+
50+
```sh
51+
/**
52+
* Implements hook_theme_suggestions_HOOK_alter().
53+
*/
54+
function THEMENAME_theme_suggestions_block_alter(&$suggestions, $variables) {
55+
// Load theme suggestions for blocks from parent theme.
56+
// https://www.drupal.org/project/wxt/issues/3310485#comment-14715969
57+
for ($i = 0; $i < count($suggestions); $i++) {
58+
if (str_contains($suggestions[$i], 'THEMENAME_')) {
59+
$new_suggestions = [
60+
str_replace('THEMENAME_', '', $suggestions[$i]),
61+
str_replace('THEMENAME_', 'wxt_bootstrap_', $suggestions[$i]),
62+
];
63+
array_splice($suggestions, $i, 0, $new_suggestions);
64+
$i += 2;
65+
}
66+
}
67+
}
68+
```
4969
5070
### Programmatic Logic
5171

content/en/docs/environment/containers/_index.en.md

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,25 @@ make drupal_install
5959
./docker/bin/drush migrate:import --group gcweb --tag 'Menu'
6060
```
6161

62-
## MacOSX Environments
62+
## Modern OSX Environments
6363

64-
There are currently known performance issues related to the file mounting in `Docker for Desktop`
64+
If you have `Docker for Desktop` and a new enough OSX environment (Monterey or higher) then the steps are the exact same as those for the Linux environment given above.
6565

66-
- **[Improve Mac File system performance][docker-mac]**
66+
All that is required in advance is to enable `VirtioFS` accelerated directory sharing which you can see in the attached picture below.
67+
68+
{{< imgproc virtiofs Resize "x300" >}}
69+
Docker for Desktop VirtioFS
70+
{{< /imgproc >}}
71+
72+
For older environments you may still use mutagen which is discussed below.
73+
74+
## Legacy OSX Environments (Mutagen)
6775

68-
This is supposed to be fixed with the new virtualization framework in MacOSX 11.1+ but for the moment mutagen should be used.
76+
While this is fixed with the new virtualization framework discussed above.
77+
78+
For older environments mutagen will have to be used instead and as such requires a few additional steps.
79+
80+
- **[Improve Mac File system performance][docker-mac]**
6981

7082
```sh
7183
# Mutagen Setup
@@ -104,14 +116,20 @@ make drupal_install
104116
./docker/bin/drush migrate:import --group gcweb --tag 'Menu'
105117
```
106118

107-
Afterwards if you wish to have an empty docker environment you may execute the following commands.
119+
## Cleanup
120+
121+
If you wish to have a pristine docker environment you may execute the following commands.
108122

109123
```sh
110-
mutagen sync terminate <sync_xxxxx>
111124
docker rm $(docker ps -a -q)
112125
docker rmi $(docker images -q) --force
113126
docker volume prune -f
127+
```
114128

129+
For those still using Mutagen you may also need to execute the following command:
130+
131+
```sh
132+
mutagen sync terminate <sync_xxxxx>
115133
```
116134

117135
<!-- Links Referenced -->
76.9 KB
Loading

0 commit comments

Comments
 (0)