X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/b4b191a5b6f881b6d6e8b9ff43f9798e7fa851b1..d3ed59c2753c2babd5aa9a1c5e0109c644904ba8:/article.inc.php?ds=inline diff --git a/article.inc.php b/article.inc.php index a6a4ef8..98cd475 100644 --- a/article.inc.php +++ b/article.inc.php @@ -17,16 +17,32 @@ function showdate($parts) class ArchiveArticle { public $raw, $preface, $title, $body; + public $meta = []; function __construct($path) { - $this->page = $path; - $this->link = preg_replace('{(?:/index)?\.html$}', '', $path); - if (file_exists($this->page)) { - $this->raw = file_get_contents($this->page); - @list ($this->preface, $this->title, $this->body) = - preg_split('{
|
\s* (.*?)
- }sx', $this->raw, $bodyp, PREG_OFFSET_CAPTURE)) { - # fallback paragraph contents following the page header - if ($bodyp[1][1] < 256) { - return $bodyp[1][0]; - } - } - - # starting paragraph for documents without title (assumed simple/partial) - if (strpos($this->raw, '