Fix: Feeds didn't show article content
This commit is contained in:
parent
681f4c3c83
commit
e9c09311fe
2 changed files with 8 additions and 5 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
||||||
nbproject/
|
nbproject/
|
||||||
.idea/
|
.idea/
|
||||||
completer.hist
|
completer.hist
|
||||||
|
feed/
|
||||||
|
|
|
@ -51,7 +51,7 @@ if ($_SESSION['login']) {
|
||||||
|
|
||||||
$writer->title = $blogtitle;
|
$writer->title = $blogtitle;
|
||||||
$writer->site_url = $blogurl;
|
$writer->site_url = $blogurl;
|
||||||
$writer->feed_url = $blogurl . "/feed/feed.atom";
|
$writer->feed_url = $blogurl . "/feed/" . $_GET['blog'] . ".atom";
|
||||||
$writer->author = array(
|
$writer->author = array(
|
||||||
'name' => $blogauthor,
|
'name' => $blogauthor,
|
||||||
'url' => $blogurl,
|
'url' => $blogurl,
|
||||||
|
@ -67,6 +67,10 @@ if ($_SESSION['login']) {
|
||||||
if ($amount == 10) {
|
if ($amount == 10) {
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
|
$file = ArticleGenerator::getText($art_dir, $article);
|
||||||
|
$text = Parsedown::instance()
|
||||||
|
->setBreaksEnabled(true)// with linebreaks
|
||||||
|
->text($file);
|
||||||
$writer->items[] = array(
|
$writer->items[] = array(
|
||||||
'title' => ArticleGenerator::getTitle($art_dir, $article),
|
'title' => ArticleGenerator::getTitle($art_dir, $article),
|
||||||
'updated' => strtotime(
|
'updated' => strtotime(
|
||||||
|
@ -75,11 +79,9 @@ if ($_SESSION['login']) {
|
||||||
'url' => $blogurl . "./?article=" .
|
'url' => $blogurl . "./?article=" .
|
||||||
substr($article, 0, strlen($article) - 3),
|
substr($article, 0, strlen($article) - 3),
|
||||||
'summary'=> ArticleGenerator::getSummary(
|
'summary'=> ArticleGenerator::getSummary(
|
||||||
$art_dir, $articles
|
$art_dir, $article
|
||||||
),
|
),
|
||||||
'content' => "<p>" . ArticleGenerator::getText(
|
'content' => $text
|
||||||
$art_dir, $articles
|
|
||||||
) . "</p>"
|
|
||||||
);
|
);
|
||||||
$amount += 1;
|
$amount += 1;
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue