summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Ball <nullspoon@oper.io>2019-09-28 17:46:55 -0600
committerAaron Ball <nullspoon@oper.io>2019-09-28 17:46:55 -0600
commitbfcad999061f3abcba8d2d95d412d140ca73b9a7 (patch)
tree0df61748e22da14aee020a41664d9409b1ff45db
parentd55480b8a1c265a4098a8b8fa714f28499f68cb6 (diff)
downloadoper.io-bfcad999061f3abcba8d2d95d412d140ca73b9a7.tar.gz
oper.io-bfcad999061f3abcba8d2d95d412d140ca73b9a7.tar.xz
index:remove header reading
This wasn't very scalable. Now the Makefile adds header1 to the output html to avoid this problem.
-rwxr-xr-xindex.php7
1 files changed, 0 insertions, 7 deletions
diff --git a/index.php b/index.php
index 9fab2d8..4bded09 100755
--- a/index.php
+++ b/index.php
@@ -23,13 +23,6 @@ if($post[0] == '.' || $post[0] == '/') {
// Prevent access to any pages starting with '.' or '/'
print("<p>Error: the page you have requested does not exist.</p>");
} elseif(file_exists('html/' . $post . '.html')) {
- // Get the first line
- $f = fopen('posts/' . $post . '.adoc', 'r');
- $firstline = fgets($f);
- fclose($f);
- // Print the first line (title)
- print('<h1>' . $firstline . '</h1>');
-
// Get and print post body
print(file_get_contents('html/' . $post . '.html'));
} else {

Generated by cgit