Skip to content

Instantly share code, notes, and snippets.

@jsbls
Created March 4, 2023 01:18
Show Gist options
  • Save jsbls/d0858e1e254652c1deb71b063904c778 to your computer and use it in GitHub Desktop.
Save jsbls/d0858e1e254652c1deb71b063904c778 to your computer and use it in GitHub Desktop.
Statamic SSG Placeholder Error Fix
diff --git a/src/Generator.php b/src/Generator.php
index 0618fe7..d7be006 100644
--- a/src/Generator.php
+++ b/src/Generator.php
@@ -110,6 +110,11 @@ public function bindGlide()
Glide::cacheStore()->clear();
$directory = Arr::get($this->config, 'glide.directory');
+ config([
+ 'statamic.assets.image_manipulation.cache' => true,
+ 'statamic.assets.image_manipulation.cache_path' => $this->config['destination'].'/'.$directory,
+ ]);
+
@jsbls
Copy link
Author

jsbls commented Mar 4, 2023

  1. Create a folder named patches/ at root level
  2. Add the contents to a Generator.php.diff file inside the folder.
  3. Prepend the following code to "extra":´{...} in composer.json:
"patches": {
  "statamic/ssg": {
    "Fix placeholder bug": "patches/Generator.php.diff"
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment