Merge branch 'main' of into nikus-blog

This commit is contained in:
jonas.psotka 2022-06-23 09:18:13 +02:00
commit d0be56258a
3 changed files with 34 additions and 2 deletions

View file

@ -5,4 +5,4 @@ Here is the template of my blog, released under the MIT license.
Format Date for Posts like here
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 in `source/_posts`

View file

@ -41,7 +41,7 @@
<p>Linkpage: <a href=""></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>

source/rss.blade.xml Normal file
View file

@ -0,0 +1,32 @@
{!! '<'.'?'.'xml version="1.0" encoding="UTF-8" ?>' !!}
<rss version="2.0" xmlns:atom="" xmlns:content="" xmlns:media="">
<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)
<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="">{{ $post->author }}</dc:creator>
<pubDate>{{ date(DateTime::RSS, $post->date) }}</pubDate>
url="{{ $page->baseUrl . $post->cover_image }}"
height="150" />