diff --git a/config.php b/config.php
index c796691..2558fb3 100644
--- a/config.php
+++ b/config.php
@@ -1,40 +1,84 @@
+ * @license MIT License
+ * @link http://marcel-kapfer.de/rangitaki
+ */
+
+// Blog Title / Set here an individual title of yourblog by replacing
+// Rangitaki Blog with it.
+$blogtitle = 'Example Blog';
+
// Blog Author - Set here your name
-$blogauthor = 'Marcel Kapfer';
+$blogauthor = 'John';
+
// Blog description
-$blogdescription = 'Rangitaki - A PHP blogging engine without any database dependency';
+$blogdescription = 'A short description of your blog';
+
// Home - set yes if you want to link to your homepage and no if not
$bloghome = 'yes';
-// Home URL - Set here the url to your main page. Either relative (e.g. '../') or absolute (e.g. 'http://github.com')
+
+// Home URL - Set here the url to your main page. Either as a path (e.g. '../')
+// or as an url (e.g. 'http://github.com')
$bloghomeurl = '../';
+
// Home name - Set here an individual name for your main page
$bloghomename = 'Home';
+
// Main Blog name -> Set a specific name for your main blog
// This value is empty by default
$blogmainname = '';
+
// Intro - set yes if you have a blog intro and no if you don't have one
$blogintro = 'yes';
-// Disqus - Provide here your Disqus shortname. Leave empty if you don't want to use it.
+
+// Disqus - Provide here your Disqus shortname. Leave empty if you don't
+// want to use it.
$blogdisqus = 'rangitaki';
+
// Share FAB - this enables or disables the share button
$sharefab = 'yes';
-// Google Analytics - Provide here your Google Analytics Tracking-ID. Leave empty if you don't want to use it.
+
+// Google Analytics - Provide here your Google Analytics Tracking-ID. Leave
+// empty if you don't want to use it.
$bloganalytics = '';
-// Footer - set here the text for your footer (e.g. a copyright info). You can replace the whole text after the '=' with your own one.
-$blogfooter = 'Rangitaki ' . date("Y") . ' github.com/mmk2410/Rangitaki';
-// This enables the optional rangitaki control center. Please read the documentation before you enable it.
+
+// Footer - set here the text for your footer (e.g. a copyright info). You can
+// replace the whole text after the '=' with your own one.
+$blogfooter = 'Rangitaki ' . date("Y") .
+ '
+ github.com/mmk2410/Rangitaki';
+
+// This enables the optional rangitaki control center. Please read the
+// documentation before you enable it.
$rcc = 'yes';
-// Here you can disable and enable the navigation menu. Usefull if you have no subblogs and no home directory
+
+// Here you can disable and enable the navigation menu. Usefull if you have
+// no subblogs and no home directory
$nav_drawer = 'yes';
+
// Set here the name of your theme. Read the documentation for more themes
$theme = 'material-light';
+
// Set here your language. The file must exist in the lang directory
$language = "en";
+
+// pagination: how many articles should be on one page
+// set to 0 to disable it
+$pagination = 0;
+
// Favicon - Set here the path to your favicon
-$favicon = "https://example.com/res/img/favicon.png";
+$favicon = "http://example.com/res/img/favicon.png";
diff --git a/index.php b/index.php
index 49a3c5d..5277a35 100644
--- a/index.php
+++ b/index.php
@@ -1,6 +1,6 @@
-
-
+
+
-
+
@@ -89,8 +109,10 @@ if (isset($getarticle)) {
-
-
+
+
+
-
@@ -114,40 +137,65 @@ if (isset($getarticle)) {
// Checking if the navigation drawer is enabled. If not -> skip it
if ($nav_drawer == "yes") {
?>
-
+
+
-
+
3) { // Checking if not in article or tag view and if there are more the one blog. The 3 is for these three array entries: 'main.md', '.', '..'
+ // Getting everything from the blog directory
+ $blogs = scandir("./blogs/");
+ // Checking if not in article or tag view and if there are more the one
+ // blog. The 3 is for these three array entries: 'main.md', '.', '..'
+ if (!isset($getarticle) && !isset($gettag) && sizeof($blogs) > 3) {
echo "";
- echo "
" . $BLOGLANG['Blogs on'] . " $blogtitle:
"; // 1. Set localized string 2. Set blogtitle
- foreach ($blogs as $navblog) { // iterating through the blogs/ directory
- if (strlen($navblog) >= 3 && substr($navblog, -3) == ".md") { // check if filename is larger than three chars and if the file ends with ".md"
+ // 1. Set localized string 2. Set blogtitle
+ echo "
" .
+ $BLOGLANG['Blogs on'] .
+ " $blogtitle:
";
+ // iterating through the blogs/ directory
+ foreach ($blogs as $navblog) {
+ // check if filename is larger than three chars and if the
+ // file ends with ".md"
+ if (strlen($navblog) >= 3 && substr($navblog, -3) == ".md") {
if ($getblog == "") { // Run when on main blog
if ($navblog != "main.md") { // excluding main blog
- BlogListGenerator::listBlog("./blogs/", $navblog, $blogtitle); // creating navigation item
+ // creating navigation item
+ BlogListGenerator::listBlog(
+ "./blogs/", $navblog, $blogtitle
+ );
}
} else {
- if ($getblog . ".md" != $navblog) { // Check if $blog is current blog -> this blog will be excluded
- BlogListGenerator::listBlog("./blogs/", $navblog, $blogmaintitle); // creating navigation item
+ // Check if $blog is current blog
+ // -> this blog will be excluded
+ if ($getblog . ".md" != $navblog) {
+ // creating navigation item
+ BlogListGenerator::listBlog(
+ "./blogs/", $navblog, $blogmaintitle
+ );
}
}
}
}
echo "";
- } elseif (isset($getarticle) || isset($gettag)) { // If viewing a blog or a tag
+ } elseif (isset($getarticle) || isset($gettag)) {
+ // If viewing a blog or a tag
?>
- Go back
+
+ Go back
-
+
+
+
@@ -158,35 +206,56 @@ if ($nav_drawer == "yes") {
?>
3) { // if there is no content, don't show the intro
?>
@@ -204,24 +273,40 @@ if ($nav_drawer == "yes") {
}
// TAG VIEW
if (isset($gettag)) { // if there's a tag -> tag view
- $articles = scandir($articlesdir, 1); // save the content of the directory in the articles variable
- foreach ($articles as $article) { // iterate through all articles
- $tags = ArticleGenerator::getTags($articlesdir, $article); // get the article tags
- if (in_array($gettag, $tags)) { // if the article has the requested tag
- if (strlen($article) >= 3 && substr($article, -3) == ".md") { // check if the file is a article file
- ArticleGenerator::newArticle($articlesdir, $article, $getblog); // generate the article
+ // save the content of the directory in the articles variable
+ $articles = scandir($articlesdir, 1);
+ // iterate through all articles
+ foreach ($articles as $article) {
+ // get the article tags
+ $tags = ArticleGenerator::getTags($articlesdir, $article);
+ // if the article has the requested tag
+ if (in_array($gettag, $tags)) {
+ // check if the file is a article file
+ if (strlen($article) >= 3 && substr($article, -3) == ".md") {
+ // generate the article
+ ArticleGenerator::newArticle(
+ $articlesdir, $article, $getblog
+ );
}
}
}
- } elseif ($getarticle == "") { // NORMAL VIEW if there's no article request -> normal view
- $articles = scandir($articlesdir, 1); // save the content of the directory in the articles variable
- foreach ($articles as $article) { // iterate through this variable
- if (strlen($article) >= 3 && substr($article, -3) == ".md") { // check if the file is a article file
- ArticleGenerator::newArticle($articlesdir, $article, $getblog); // generate the article
+ } elseif ($getarticle == "") {
+ // NORMAL VIEW if there's no article request -> normal view
+ // save the content of the directory in the articles variable
+ $articles = scandir($articlesdir, 1);
+ // iterate through this variable
+ foreach ($articles as $article) {
+ // check if the file is a article file
+ if (strlen($article) >= 3 && substr($article, -3) == ".md") {
+ // generate the article
+ ArticleGenerator::newArticle($articlesdir, $article, $getblog);
}
}
} elseif (isset($getarticle)) { // ARTICLE VIEW
- ArticleGenerator::newArticle($articlesdir, $getarticle . ".md", $getblog); // generate the requested article
+ // generate the requested article
+ ArticleGenerator::newArticle(
+ $articlesdir, $getarticle . ".md", $getblog
+ );
include './res/php/Disqus.php'; // include disques
} else { // SOMETHING STRANGE: THIS SHOULDN'T HAPPEN
echo "Some error occured, please go back.";
@@ -236,25 +321,38 @@ if ($nav_drawer == "yes") {
?>