mirror of
https://github.com/flextype/flextype.git
synced 2025-08-08 14:16:46 +02:00
using yaml instead of yml files
This commit is contained in:
@@ -66,7 +66,7 @@ class Flextype
|
||||
Registry::set('site', []);
|
||||
|
||||
// Set site items if site config exists
|
||||
if (Filesystem::fileExists($site_config = CONFIG_PATH . '/' . 'site.yml')) {
|
||||
if (Filesystem::fileExists($site_config = CONFIG_PATH . '/' . 'site.yaml')) {
|
||||
Registry::set('site', Yaml::parseFile($site_config));
|
||||
} else {
|
||||
throw new \RuntimeException("Flextype site config file does not exist.");
|
||||
|
@@ -99,7 +99,7 @@ class Plugins
|
||||
|
||||
// Go through...
|
||||
foreach ($plugins_list as $plugin) {
|
||||
if (Filesystem::fileExists($_plugin = PLUGINS_PATH . '/' . $plugin . '/' . $plugin . '.yml')) {
|
||||
if (Filesystem::fileExists($_plugin = PLUGINS_PATH . '/' . $plugin . '/' . $plugin . '.yaml')) {
|
||||
$plugins_cache_id .= filemtime($_plugin);
|
||||
}
|
||||
}
|
||||
@@ -119,11 +119,11 @@ class Plugins
|
||||
// Go through...
|
||||
foreach ($plugins_list as $plugin) {
|
||||
|
||||
if (Filesystem::fileExists($_plugin_manifest = PLUGINS_PATH . '/' . $plugin . '/' . $plugin . '.yml')) {
|
||||
if (Filesystem::fileExists($_plugin_manifest = PLUGINS_PATH . '/' . $plugin . '/' . $plugin . '.yaml')) {
|
||||
$plugin_manifest = Yaml::parseFile($_plugin_manifest);
|
||||
}
|
||||
|
||||
$_plugins_config[basename($_plugin_manifest, '.yml')] = $plugin_manifest;
|
||||
$_plugins_config[basename($_plugin_manifest, '.yaml')] = $plugin_manifest;
|
||||
}
|
||||
|
||||
Registry::set('plugins', $_plugins_config);
|
||||
@@ -135,7 +135,7 @@ class Plugins
|
||||
if (is_array($plugins_list) && count($plugins_list) > 0) {
|
||||
foreach (static::$locales as $locale => $locale_title) {
|
||||
foreach ($plugins_list as $plugin) {
|
||||
$language_file = PLUGINS_PATH . '/' . $plugin . '/languages/' . $locale . '.yml';
|
||||
$language_file = PLUGINS_PATH . '/' . $plugin . '/languages/' . $locale . '.yaml';
|
||||
if (Filesystem::fileExists($language_file)) {
|
||||
I18n::add($plugin, $locale, Yaml::parseFile($language_file));
|
||||
}
|
||||
|
@@ -60,7 +60,7 @@ class Themes
|
||||
if (Cache::driver()->contains($theme_cache_id)) {
|
||||
Registry::set('themes.'.Registry::get('site.theme'), Cache::driver()->fetch($theme_cache_id));
|
||||
} else {
|
||||
if (Filesystem::fileExists($theme_manifest_file = THEMES_PATH . '/' . $theme . '/' . $theme . '.yml')) {
|
||||
if (Filesystem::fileExists($theme_manifest_file = THEMES_PATH . '/' . $theme . '/' . $theme . '.yaml')) {
|
||||
$theme_manifest = Yaml::parseFile($theme_manifest_file);
|
||||
Registry::set('themes.'.Registry::get('site.theme'), $theme_manifest);
|
||||
Cache::driver()->save($theme_cache_id, $theme_manifest);
|
||||
|
Reference in New Issue
Block a user