Add publish_date and expiry_date support
This commit is contained in:
parent
a22281c896
commit
4448798bf5
6 changed files with 148 additions and 3 deletions
|
|
@ -194,6 +194,13 @@ switch ($parsedPath['type']) {
|
|||
exit;
|
||||
}
|
||||
|
||||
$metadata = loadMetadata($dir);
|
||||
if (!isVisible($metadata)) {
|
||||
http_response_code(404);
|
||||
renderTemplate($ctx, "<h1>404 - Page Not Found</h1><p>The requested page could not be found.</p>", 404);
|
||||
exit;
|
||||
}
|
||||
|
||||
$contentFiles = findAllContentFiles($dir);
|
||||
if (!empty($contentFiles)) {
|
||||
renderMultipleFiles($ctx, $contentFiles, $dir);
|
||||
|
|
@ -218,7 +225,13 @@ switch ($parsedPath['type']) {
|
|||
|
||||
// Load metadata for this directory
|
||||
$metadata = loadMetadata($dir);
|
||||
|
||||
|
||||
if (!isVisible($metadata)) {
|
||||
http_response_code(404);
|
||||
renderTemplate($ctx, "<h1>404 - Page Not Found</h1><p>The requested page could not be found.</p>", 404);
|
||||
exit;
|
||||
}
|
||||
|
||||
// Check if hide_list is enabled - if so, treat as page
|
||||
if (isset($metadata['hide_list']) && $metadata['hide_list']) {
|
||||
if (!empty($contentFiles)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue