<?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>
<rss xmlns:yandex="http://news.yandex.ru" xmlns:media="http://search.yahoo.com/mrss/" xmlns:turbo="http://turbo.yandex.ru" version="2.0">
    <channel>
        <title>{{ config('ayarlar.baslik') }}</title>
        <link>{{ config('ayarlar.siteadresi') }}</link>
        <description>{{ config('ayarlar.seodesc') }}</description>
        <language>tr</language>
        @foreach ($haberler as $haber)
            @php
                $text = $haber->metadesc;
                $detay = $haber->detay;
                $image = '<p><img class="center" src="' . url('images/haberler/'.$haber->resim) . '"  alt="' . $haber->baslik . '"/></p>';
                $description = '<header>
                        <h1>'.$haber->baslik.'</h1>
                        <h2>'.$text.'</h2>
                        <figure>
                        <img src="'.url("images/haberler/".$haber->resim).'">
                        <figcaption>'.$haber->baslik.'</figcaption>
                    </figure>
                    </header>';
                $rssdetay = '<![CDATA['. $description.$detay . ']]>';
            @endphp
        <item turbo="true">
            <link>{{ url('haber/'.$haber->slug.'-'.$haber->id) }}</link>
            <category>{{ $haber->haberkat->baslik }}</category>
            <pubDate>{{date('r',strtotime($haber->tarih))}}</pubDate>
            <turbo:content>
                {!! $rssdetay !!}
            </turbo:content>
        </item>
        @endforeach
    </channel>
</rss>
