Add date-ranges to some posts

This commit is contained in:
2016-01-13 13:56:00 +00:00
parent c3c955d739
commit 4bbcc676f3
22 changed files with 105 additions and 7 deletions

View File

@@ -12,14 +12,14 @@ if (!is_dir($sNewDir)) {
foreach (glob('blog/_posts/*.md') as $sFile) {
$sBasename = basename($sFile);
printf("%s...\n", $sBasename);
$sContents = file_get_contents($sFile);
$aContents = explode("\n", $sContents);
$aParts = explode('--', implode("\n", array_slice($aContents, 1)));
$aYaml = Yaml::parse(trim(str_replace(" - \n", null, current($aParts))));
if (strpos(end($aParts), '<') === false) {
echo " no html\n";
continue;