|
1 | 1 | <?php |
2 | | - |
3 | 2 | /** @var \App\Web\Blog\BlogPost[] $posts */ |
4 | 3 | ?> |
5 | 4 |
|
6 | 5 | <feed xmlns="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/"> |
7 | 6 | <id>https://tempestphp.com/rss</id> |
8 | | - <link rel="self" type="application/atom+xml" href="https://tempestphp.com/rss" /> |
| 7 | + <link rel="self" type="application/atom+xml" href="https://tempestphp.com/rss"/> |
9 | 8 | <title>Tempest</title> |
10 | 9 | <updated><?= date('c') ?></updated> |
11 | | - <?php foreach ($posts as $post): ?> |
12 | | - <entry> |
13 | | - <title><![CDATA[ <?= $post->title ?> ]]></title> |
14 | | - <link rel="alternate" href="<?= $post->uri ?>"/> |
15 | | - <id><?= $post->uri ?></id> |
16 | | - <category term="PHP" /> |
17 | | - <author> |
18 | | - <name><?= $post->author->getFullName() ?></name> |
19 | | - <uri><?= $post->author->getBluesky() ?></uri> |
20 | | - </author> |
21 | | - <?php if ($post->description): ?> |
22 | | - <summary type="html"><![CDATA[ <?= $post->description ?> ]]></summary> |
23 | | - <?php endif; ?> |
24 | | - <content type="html"><![CDATA[ <?= $post->content ?> ]]></content> |
25 | | - <updated><?= $post->createdAt->format('c') ?></updated> |
26 | | - <published><?= $post->createdAt->format('c') ?></published> |
27 | | - <media:content url="<?= $post->metaImageUri ?>" medium="image" /> |
28 | | - </entry> |
29 | | - <?php endforeach; ?> |
| 10 | + <entry :foreach="$posts as $post"> |
| 11 | + <title><![CDATA[ {!! $post->title !!} ]]></title> |
| 12 | + <link rel="alternate" :href="$post->uri"/> |
| 13 | + <id>{{ $post->uri }}</id> |
| 14 | + <category term="PHP"/> |
| 15 | + <author> |
| 16 | + <name>{{ $post->author->getFullName() }}</name> |
| 17 | + <uri>{{ $post->author->getBluesky() }}</uri> |
| 18 | + </author> |
| 19 | + <summary :if="$post->description" type="html"><![CDATA[ {!! $post->description !!} ]]></summary> |
| 20 | + <content type="html"><![CDATA[ {!! $post->content !!} ]]></content> |
| 21 | + <updated>{{ $post->createdAt->format('c') }}</updated> |
| 22 | + <published>{{ $post->createdAt->format('c') }}</published> |
| 23 | + <media:content url="{{ $post->metaImageUri }}" medium="image"/> |
| 24 | + </entry> |
30 | 25 | </feed> |
0 commit comments