From 977366968421189478fef9f70886444e2e3fc45f Mon Sep 17 00:00:00 2001 From: "Marcel Kapfer (mmk2410)" Date: Fri, 22 Apr 2016 18:49:14 +0200 Subject: [PATCH] Config switch script --- bin/config.php | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++ config.yaml | 22 ++++++++++++++++- 2 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 bin/config.php diff --git a/bin/config.php b/bin/config.php new file mode 100644 index 0000000..05f4535 --- /dev/null +++ b/bin/config.php @@ -0,0 +1,67 @@ + array( + "title" => $blogtitle, + "author" => $blogauthor, + "description" => $blogdescription, + "home" => $bloghome, + "homeurl" => $bloghomeurl, + "homename" => $bloghomename, + "mainname" => $blogmainname, + "intro" => $blogintro, + "disqus" => $blogdisqus, + "analytics" => $bloganalytics, + "footer" => $blogfooter, + "url" => $blogurl + ), + "design" => array( + "fab" => $sharefab, + "drawer" => $nav_drawer, + "theme" => $theme, + "pagination" => $pagination, + "favicon" => $favicon, + ), + "rcc" => array( + "rcc" => "off", + "api" => "off", + ), + "language" => $language, +); + +$config = new Config('config.yaml', 'vendor/autoload.php'); + +if ($config->writeConfig($yaml)) { + echo "YAML config saved.\nYou can delete the config.php file\n"; +} else { + echo "Failed to save YAML config."; +} diff --git a/config.yaml b/config.yaml index c3c3c2c..818a280 100644 --- a/config.yaml +++ b/config.yaml @@ -1,3 +1,23 @@ +blog: + title: 'Example Blog' + author: John + description: 'A short description of your blog' + home: 'on' + homeurl: ../ + homename: Home + mainname: '' + intro: 'on' + disqus: rangitaki + analytics: '' + footer: "Rangitaki 2016 \n github.com/mmk2410/Rangitaki" + url: 'https://example.com/blog/' +design: + fab: 'on' + drawer: 'on' + theme: material-light + pagination: 0 + favicon: 'http://example.com/res/img/favicon.png' rcc: - rcc: 'off' + rcc: 'on' api: 'on' +language: en