Merge branch 'main' of git.oishi-ra.men:oishi-ramen/simple-blog into nikus-blog

main^2
jonas.psotka 5 months ago
commit d0be56258a
  1. 2
      README.md
  2. 2
      source/_layouts/main.blade.php
  3. 32
      source/rss.blade.xml

@ -5,4 +5,4 @@ Here is the template of my blog, released under the MIT license.
Format Date for Posts like here
https://unicode-org.github.io/icu/userguide/format_parse/datetime/#date-field-symbol-table
The main branch is the template and the nikus-blog branch is the template with my content.
The Blog needs at least one post to compile sucessfully, because of that, there is already a template.md in `source/_posts`

@ -41,7 +41,7 @@
<section>
<p>Linkpage: <a href="https://nikurasu.de">https://nikurasu.de</a></p>
<p>E-Mail: <a href="mailTo({{ $page->email }})">{{ $page->email }}</p>
<p><a href="/feed.rss">RSS-Feed</a></p>
<p><a href="/rss.xml">RSS-Feed</a></p>
<p><a href="#">Proof of Identity</a></p>
</section>
</div>

@ -0,0 +1,32 @@
{!! '<'.'?'.'xml version="1.0" encoding="UTF-8" ?>' !!}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:media="http://search.yahoo.com/mrss/">
<channel>
<title>{{ $page->siteName }}</title>
<link>{{ $page->baseUrl }}</link>
<description><![CDATA[{{ $page->siteDescription }}]]></description>
<atom:link href="{{ $page->getUrl() }}" rel="self" type="application/rss+xml" />
<language>{{ $page->siteLanguage }}</language>
<lastBuildDate>{{ date(DateTime::RSS, $posts->first()->date) }}</lastBuildDate>
@foreach($posts as $post)
<item>
<title><![CDATA[{!! $post->title !!}]]></title>
<link>{{ $post->getUrl() }}</link>
<guid isPermaLink="true">{{ $post->getUrl() }}</guid>
<description><![CDATA[{!! $post->description !!}]]></description>
<content:encoded><![CDATA[{!! $post->getContent() !!}]]></content:encoded>
<dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">{{ $post->author }}</dc:creator>
<pubDate>{{ date(DateTime::RSS, $post->date) }}</pubDate>
@if($post->cover_image)
<media:content
medium="image"
url="{{ $page->baseUrl . $post->cover_image }}"
type="image/jpeg"
width="150"
height="150" />
@endif
</item>
@endforeach
</channel>
</rss>
Loading…
Cancel
Save