Skip to content

Commit

Permalink
Build the static site with the GitHub pages relative URL in mind
Browse files Browse the repository at this point in the history
  • Loading branch information
adamziel committed May 1, 2024
1 parent d70b7dd commit 29f96c5
Show file tree
Hide file tree
Showing 52 changed files with 20 additions and 7,683 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
wp-content/uploads/simply-static
7 changes: 7 additions & 0 deletions blueprint-serve.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@
"slug": "create-block-theme"
}
},
{
"step": "installPlugin",
"pluginZipFile": {
"resource": "wordpress.org/plugins",
"slug": "gutenberg"
}
},
{
"step": "activatePlugin",
"pluginPath": "wp-docs-plugin/plugin.php"
Expand Down
7 changes: 7 additions & 0 deletions blueprint-static-site.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
},
"login": true,
"steps": [
{
"step": "defineWpConfigConsts",
"consts": {
"SIMPLY_STATIC_DESTINATION_URL_TYPE": "relative",
"SIMPLY_STATIC_RELATIVE_PATH": "/playground-docs-workflow"
}
},
{
"step": "installTheme",
"themeZipFile": {
Expand Down
5 changes: 2 additions & 3 deletions build-static-site.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

rm -rf output
mkdir -p output
bunx @wp-playground/cli@latest \
run-blueprint \
Expand All @@ -9,9 +10,7 @@ bunx @wp-playground/cli@latest \
--mount=./wp-content/uploads:/wordpress/wp-content/uploads \
--mount=./wp-content/themes/playground-docs:/wordpress/wp-content/themes/playground-docs \
--mount=./output:/output \
--blueprint=./blueprint-static-site.json \
--wp=6.5 \
--php=8.0
--blueprint=./blueprint-static-site.json

cd output
unzip export.zip
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ <h2 class="wp-block-heading">Save your site</h2>
<!-- /wp:paragraph -->

<!-- wp:image {"id":23,"sizeSlug":"full","linkDestination":"none"} -->
<figure class="wp-block-image size-full"><img src="https://playground.internal/wp-content/uploads/2024/04/23_export-button.png" alt="" class="wp-image-23"/></figure>
<figure class="wp-block-image size-full"><img src="https://playground.internal/wp-content/uploads/2024/04/23_export-button.png" alt="" class="wp-image-23" /></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
Expand All @@ -117,7 +117,7 @@ <h2 class="wp-block-heading">Restore a saved site</h2>
<!-- /wp:paragraph -->

<!-- wp:image {"id":22,"sizeSlug":"full","linkDestination":"none"} -->
<figure class="wp-block-image size-full"><img src="https://playground.internal/wp-content/uploads/2024/04/22_import-button.png" alt="" class="wp-image-22"/></figure>
<figure class="wp-block-image size-full"><img src="https://playground.internal/wp-content/uploads/2024/04/22_import-button.png" alt="" class="wp-image-22" /></figure>
<!-- /wp:image -->

<!-- wp:heading -->
Expand All @@ -129,7 +129,7 @@ <h2 class="wp-block-heading">Use a specific WordPress or PHP version</h2>
<!-- /wp:paragraph -->

<!-- wp:image {"id":21,"sizeSlug":"full","linkDestination":"none"} -->
<figure class="wp-block-image size-full"><img src="https://playground.internal/wp-content/uploads/2024/04/21_wp-version-switcher.png" alt="" class="wp-image-21"/></figure>
<figure class="wp-block-image size-full"><img src="https://playground.internal/wp-content/uploads/2024/04/21_wp-version-switcher.png" alt="" class="wp-image-21" /></figure>
<!-- /wp:image -->

<!-- wp:quote -->
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 29f96c5

Please sign in to comment.