X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/f0a0679f7ec71d6ae4969d39da4d6be84147fcb4..072ed096973a4acca34602462ffd711752d985c3:/article.inc.php diff --git a/article.inc.php b/article.inc.php index e3a3ee8..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('{
|
(.*?)
- }sx', $this->raw, $bodyp, PREG_OFFSET_CAPTURE)) { - # fallback paragraph contents following the page header - if ($bodyp[1][1] < 256) { - return $bodyp[1][0]; - } + \G (?> \s+ |