mirror of
https://github.com/silverstripe/silverstripe-staticpublisher
synced 2024-10-22 14:05:54 +02:00
Add environment flags for managing publisher settings
SS_STATICPUBLISHER_ENABLED - Set in the environment file if static publisher enabled or disabled SS_STATICPUBLISHER_CACHEDIR - Set the cache directory (if not /cache) SS_STATICPUBLISHER_DEBUG - modify debug flag.
This commit is contained in:
parent
3e14e51643
commit
52f04b7435
22
main.php
22
main.php
@ -22,10 +22,24 @@
|
||||
*/
|
||||
|
||||
require_once('../framework/core/Constants.php');
|
||||
|
||||
$cacheEnabled = true;
|
||||
$cacheDebug = false;
|
||||
$cacheBaseDir = '../cache/'; // Should point to the same folder as FilesystemPublisher->destFolder
|
||||
|
||||
if(defined('SS_STATICPUBLISHER_ENABLED')) {
|
||||
$cacheEnabled = SS_STATICPUBLISHER_ENABLED;
|
||||
} else {
|
||||
$cacheEnabled = true;
|
||||
}
|
||||
|
||||
if(defined('SS_STATICPUBLISHER_CACHEDIR')) {
|
||||
$cacheBaseDir = SS_STATICPUBLISHER_CACHEDIR;
|
||||
} else {
|
||||
$cacheBaseDir = '../cache/';
|
||||
}
|
||||
|
||||
if(defined('SS_STATICPUBLISHER_DEBUG')) {
|
||||
$cacheDebug = SS_STATICPUBLISHER_DEBUG;
|
||||
} else {
|
||||
$cacheDebug = false;
|
||||
}
|
||||
|
||||
// Optional settings for FilesystemPublisher::$domain_based_mapping=TRUE
|
||||
$hostmapLocation = '../subsites/host-map.php';
|
||||
|
Loading…
Reference in New Issue
Block a user