summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorSquibid <me@zacharyscheiman.com>2023-10-30 12:47:55 -0400
committerSquibid <me@zacharyscheiman.com>2023-10-30 12:47:55 -0400
commit1bc1454b9312e4322d486437055408d1ff35fb22 (patch)
tree98b270badb82304f520414c35ac8d6b25d7ea466 /index.php
parent2d90cc615120fcc892c1b22a2d00578b1c486c72 (diff)
downloadsite-1bc1454b9312e4322d486437055408d1ff35fb22.tar.gz
site-1bc1454b9312e4322d486437055408d1ff35fb22.tar.bz2
site-1bc1454b9312e4322d486437055408d1ff35fb22.zip
New blog entry and changes to how blogs are displayed
- blogs are now in subdirs - blog list is generated through helper function - full blog list is in blog subdir
Diffstat (limited to '')
-rw-r--r--index.php19
1 files changed, 2 insertions, 17 deletions
diff --git a/index.php b/index.php
index c20508e..09badc6 100644
--- a/index.php
+++ b/index.php
@@ -64,24 +64,9 @@
</p>
</hgroup>
<p id="blogpreview">
- <?php
- $path = "blog";
- $files = scandir($path."/");
- $i = 0;
- foreach ($files as $file) {
- if (preg_match("/.+?(?=\.html|\.php)/", $file, $matches)) {
- if ($i > 4)
- break;
- $tags = get_meta_tags($path.'/'.$file);
- printf('<a href='.$path.'/%s>%s</a><span>%s</span><br>',
- $matches[0], str_replace("-", " ", $matches[0]),
- $tags["date"] ? $tags["date"] : "¯\_(ツ)_/¯");
- $i++;
- }
- }
- ?>
+ <?php include('misc/tools.php'); entries("blog", 5); ?>
</p>
- <a href="/blog.php">more...</a>
+ <a href="/blog">more...</a>
</div>
</div>
</div>