Try to learn something about everything, and everything about somethingThomas Huxley “Darwin's bulldog” (1824-1895)

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
public:computers:pureblog [02/03/26 08:52 GMT] johnpublic:computers:pureblog [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1
Line 1: Line 1:
-<-[[.:start]] 
- 
- 
-====== Pureblog ====== 
- 
-** Description ** 
- 
-===== Section One ===== 
- 
- 
-===== Addons ===== 
- 
-<file php archive.php> 
-<?php 
-declare(strict_types=1); 
- 
-$allPosts = get_all_posts(false); 
-$postsByYear = []; 
- 
-foreach ($allPosts as $entry) { 
-    $year = !empty($entry['date']) ? date('Y', strtotime((string) $entry['date'])) : 'Unknown'; 
-    $postsByYear[$year][] = $entry; 
-} 
- 
-krsort($postsByYear, SORT_NATURAL); 
- 
-$pageTitle = 'Archive'; 
-$metaDescription = 'Browse all published posts by year.'; 
-?> 
-<?php require PUREBLOG_BASE_PATH . '/includes/header.php'; ?> 
-<?php render_masthead_layout($config); ?> 
-<main class=archive> 
-    <article> 
-        <h1>Archive</h1> 
-        <p><?= e((string) count($allPosts)) ?> published posts.</p> 
- 
-        <?php if (!$allPosts): ?> 
-            <p>No published posts yet.</p> 
-        <?php else: ?> 
-            <?php foreach ($postsByYear as $year => $yearPosts): ?> 
-                <h3><?= e((string) $year) ?> (<?= e((string) count($yearPosts)) ?>)</h3> 
-                <ul> 
-                    <?php foreach ($yearPosts as $postItem): ?> 
-                        <li> 
-                            <?php if (!empty($postItem['date'])): ?> 
-                              <!--  <small> --> 
-                                    <time datetime="<?= e((string) $postItem['date']) ?>"> 
-                                        <?= e(date('D Y-m-d H:i', strtotime((string) $postItem['date']))) ?> 
-                                    </time> 
-    <!--     </small> --> 
- &emsp; 
-                            <?php endif; ?> 
-                            <a href="/<?= e((string) ($postItem['slug'] ?? '')) ?>"> 
-                                <?= e((string) ($postItem['title'] ?? 'Untitled')) ?> 
-                            </a> 
-                        </li> 
-                    <?php endforeach; ?> 
-                </ul> 
-            <?php endforeach; ?> 
-        <?php endif; ?> 
-    </article> 
-</main> 
-<?php render_footer_layout($config); ?> 
-</body> 
-</html> 
- 
-</file> 
- 
- 
- 
-===== Further Information ===== 
- 
- 
-{{tag>}} 
- 
-Page created  : 02/03/26 08:50 GMT 
- 
-Page updated : ~~LASTMOD~~