Update (post): only show table of contents if there are at least 3 toc items

This commit is contained in:
2023-09-25 19:54:51 +08:00
parent 8faf131f13
commit e3fe8bf877
8 changed files with 82 additions and 94 deletions

View File

@@ -30,7 +30,7 @@ public static function readFile($storage_driver, $relative_directory, $filename)
$filepath = rtrim($relative_directory, '/').'/'.$filename;
try {
return Storage::disk($storage_driver)->get($filepath);
return Storage::disk($storage_driver)->get($filepath);
} catch (\Exception $e) {
return null;
@@ -39,7 +39,6 @@ public static function readFile($storage_driver, $relative_directory, $filename)
return null;
}
public static function uploadJson($storage_driver, $relative_directory, $filename, $jsonData)
{
$jsonString = json_encode($jsonData, JSON_PRETTY_PRINT);