diff --git a/.DS_Store b/.DS_Store index 4ec2d6f..1a4c029 100755 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/monstra/Blocks.php b/monstra/Blocks.php index ca990fe..783d49d 100755 --- a/monstra/Blocks.php +++ b/monstra/Blocks.php @@ -38,7 +38,7 @@ class Blocks { $blocks_cache_id = ''; - $blocks = File::scan(STORAGE_PATH . '/blocks', 'md'); + $blocks = File::scan(CONTENT_PATH . '/blocks', 'md'); if ($blocks) { foreach ($blocks as $block) { @@ -70,7 +70,7 @@ class Blocks */ public static function get($name) { - if (File::exists($block_path = STORAGE_PATH .'/blocks/' . $name . '.md')) { + if (File::exists($block_path = CONTENT_PATH .'/blocks/' . $name . '.md')) { // Create Unique Cache ID for Block $block_cache_id = md5('block' . ROOT_DIR . $block_path . filemtime($block_path)); diff --git a/monstra/Pages.php b/monstra/Pages.php index abcca2f..3707120 100755 --- a/monstra/Pages.php +++ b/monstra/Pages.php @@ -88,7 +88,7 @@ class Pages */ public static function getPages($url = '', $order_by = 'date', $order_type = 'DESC', $ignore = array('404'), $limit = null) { - $pages = File::scan(STORAGE_PATH . '/pages/' . $url, 'md'); + $pages = File::scan(CONTENT_PATH . '/pages/' . $url, 'md'); if ($pages) { foreach ($pages as $page) { @@ -110,7 +110,7 @@ class Pages $_pages[$key] = Yaml::parse($_page[1]); - $url = str_replace(STORAGE_PATH . '/pages', Url::getBase(), $page); + $url = str_replace(CONTENT_PATH . '/pages', Url::getBase(), $page); $url = str_replace('index.md', '', $url); $url = str_replace('.md', '', $url); $url = str_replace('\\', '/', $url); @@ -165,23 +165,23 @@ class Pages public static function getPage($url) { - // If url is empty that its a homepage + // If url is empty then its a homepage if ($url) { - $file = STORAGE_PATH . '/pages/' . $url; + $file = CONTENT_PATH . '/pages/' . $url; } else { - $file = STORAGE_PATH . '/pages/' . 'index'; + $file = CONTENT_PATH . '/pages/' . Config::get('site.pages.main') . '/' . 'index'; } // Select the file if (is_dir($file)) { - $file = STORAGE_PATH . '/pages/' . $url .'/index.md'; + $file = CONTENT_PATH . '/pages/' . $url .'/index.md'; } else { $file .= '.md'; } // Get 404 page if file not exists if (!file_exists($file)) { - $file = STORAGE_PATH . '/pages/' . '404.md'; + $file = CONTENT_PATH . '/pages/404/' . 'index.md'; Response::status(404); } @@ -197,7 +197,7 @@ class Pages $page = Yaml::parse($_page[1]); - $url = str_replace(STORAGE_PATH . '/pages', Url::getBase(), $file); + $url = str_replace(CONTENT_PATH . '/pages', Url::getBase(), $file); $url = str_replace('index.md', '', $url); $url = str_replace('.md', '', $url); $url = str_replace('\\', '/', $url); diff --git a/monstra/boot/defines.php b/monstra/boot/defines.php index 5a90bf4..aef9214 100755 --- a/monstra/boot/defines.php +++ b/monstra/boot/defines.php @@ -12,11 +12,11 @@ // Define the path to the root directory (without trailing slash). define('ROOT_DIR', str_replace(DIRECTORY_SEPARATOR, '/', getcwd())); -// Define the path to the storage directory (without trailing slash). -define('SITE_PATH', ROOT_DIR . '/site'); +// Define the path to the site directory (without trailing slash). +define('SITE_PATH', ROOT_DIR . '/site-katerinasitnikova'); -// Define the path to the storage directory (without trailing slash). -define('STORAGE_PATH', SITE_PATH . '/storage'); +// Define the path to the content directory (without trailing slash). +define('CONTENT_PATH', SITE_PATH . '/content'); // Define the path to the themes directory (without trailing slash). define('THEMES_PATH', SITE_PATH . '/themes'); @@ -29,6 +29,3 @@ define('CONFIG_PATH', SITE_PATH . '/config'); // Define the path to the cache directory (without trailing slash). define('CACHE_PATH', SITE_PATH . '/cache'); - -// Define the path to the cache directory (without trailing slash). -define('ACCOUNTS_PATH', SITE_PATH . '/cache'); diff --git a/site/accounts/.gitkeep b/site/accounts/.gitkeep deleted file mode 100755 index e69de29..0000000 diff --git a/site/storage/blocks/fansoro-docs.md b/site/content/blocks/fansoro-docs.md similarity index 100% rename from site/storage/blocks/fansoro-docs.md rename to site/content/blocks/fansoro-docs.md diff --git a/site/storage/pages/404.md b/site/content/pages/404/index.md similarity index 100% rename from site/storage/pages/404.md rename to site/content/pages/404/index.md diff --git a/site/storage/pages/contact.md b/site/content/pages/contact/index.md similarity index 89% rename from site/storage/pages/contact.md rename to site/content/pages/contact/index.md index bcc9a93..dbbd90c 100755 --- a/site/storage/pages/contact.md +++ b/site/content/pages/contact/index.md @@ -5,7 +5,7 @@ description: Monstra is a simple and light-weighted Content Management System ## Stay in touch -[Monstra official site](http://monstra.org/) +[Monstra official site](http://Monstra.org/) [Monstra forum](http://forum.Monstra.org/) [Monstra on Github](https://github.com/Monstra/Monstra) [Monstra Gitter chat room](https://gitter.im/Monstra/Monstra) diff --git a/site/content/pages/home/index.md b/site/content/pages/home/index.md new file mode 100755 index 0000000..871da36 --- /dev/null +++ b/site/content/pages/home/index.md @@ -0,0 +1,7 @@ +--- +title: Главная страница +description: страница +template: home +--- + +home diff --git a/site/storage/pages/index.md b/site/storage/pages/index.md deleted file mode 100755 index 3b98abc..0000000 --- a/site/storage/pages/index.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Welcome -description: Monstra is a simple and light-weighted Content Management System -template: index ---- -## Monstra is succesfully installed! -You can start editing the content and customising your site. - -### Edit this Page -To edit this page, simply go to the folder you installed Monstra, and then browse to the `/storage/pages/` folder and open the `index.md` file in your editor. - -### Create a New page -Creating a new page is very simple in Monstra. - -1. Launch your text editor and paste this sample text: - - ``` - --- - title: My New Page - --- - My new page body. - ``` - -2. Save this file in the `/storage/pages/` folder as `my-new-page.md` and its will be available by this url: http://yoursite/my-new-page - -That is it! - -{block name=Monstra-docs}