diff --git a/blogs/external.md b/blogs/external.md
new file mode 100644
index 0000000..49cf58b
--- /dev/null
+++ b/blogs/external.md
@@ -0,0 +1,2 @@
+%TITLE: Docs
+%URL: https://mmk2410.org/rangitaki/docs/
diff --git a/res/php/BlogListGenerator.php b/res/php/BlogListGenerator.php
index 8f5caa5..ab0159f 100644
--- a/res/php/BlogListGenerator.php
+++ b/res/php/BlogListGenerator.php
@@ -46,18 +46,25 @@ class BlogListGenerator
// check if the first line includes a title
if (substr($blog, 0, 6) == "%TITLE") {
// grab the title
- $blog = substr($blog, 8, strpos($blog, "\n") - 8);
+ $itemname = substr($blog, 8, strpos($blog, "\n") - 8);
// if on main blog
- if ($blog == "main") {
+ if ($itemname == "main") {
// create a nav item to the main blog
- echo "$blogmaintitle";
+ $atag = "$blogmaintitle";
} else {
// create a link to the blog
$link = "./?blog=" . substr($blogname, 0, -3);
// create a nav item to the blog
- echo "$blog";
+ $atag = "$itemname";
}
+ $blog = substr($blog, strpos($blog, "\n") + 1);
}
+ // nav item as link to external page
+ if (substr($blog, 0, 4) == "%URL") {
+ $itemurl = substr($blog, 6, strpos($blog, "\n") - 6);
+ $atag = "$itemname";
+ }
+ echo $atag;
}
/**