Skip to content

Commit

Permalink
implement full blog
Browse files Browse the repository at this point in the history
  • Loading branch information
beheh committed Jul 21, 2015
1 parent e4961ca commit ad3e889
Show file tree
Hide file tree
Showing 13 changed files with 479 additions and 64 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -4,3 +4,4 @@ tracking.txt
background.jpg
nbproject/
/vendor/
/contents/
5 changes: 3 additions & 2 deletions composer.json
Expand Up @@ -3,11 +3,12 @@
"type": "project",
"require": {
"league/flysystem": "^1.0",
"klein/klein": "^2.1",
"twig/twig": "^1.18",
"aptoma/twig-markdown": "^1.2",
"erusev/parsedown-extra": "^0.7.0",
"twig/extensions": "^1.2"
"twig/extensions": "^1.2",
"league/route": "^1.1",
"symfony/http-foundation": "^2.7"
},
"authors": [
{
Expand Down
214 changes: 185 additions & 29 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Adapter/ParsedownExtraEngine.php
Expand Up @@ -20,7 +20,7 @@ class ParsedownExtraEngine implements MarkdownEngineInterface
*/
public function transform($content)
{
return ParsedownExtra::instance()->line($content);
return ParsedownExtra::instance()->text($content);
}

/**
Expand Down
10 changes: 10 additions & 0 deletions templates/404.tpl
@@ -0,0 +1,10 @@
{% extends "index.tpl" %}

{% block contents %}
<div class="container">
<section>
<h1>Wupps&hellip;</h1>
<p>Diese Seite gibt es nicht.</p>
</section>
</div>
{% endblock %}
10 changes: 10 additions & 0 deletions templates/500.tpl
@@ -0,0 +1,10 @@
{% extends "index.tpl" %}

{% block contents %}
<div class="container">
<section>
<h1>Sorry!</h1>
<p>Da ist was schiefgegangen.</p>
</section>
</div>
{% endblock %}
13 changes: 13 additions & 0 deletions templates/article.tpl
@@ -0,0 +1,13 @@
{% extends "index.tpl" %}

{% block contents %}
<div class="container">
<article>
<header>
{% if nicetime %}<time>{{nicetime}}</time>{% endif %}
<h1>{{title}}</h1>
</header>
{{body|markdown}}
</article>
</div>
{% endblock %}
17 changes: 17 additions & 0 deletions templates/feed.tpl
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Benedict Etzel</title>
<link rel="self" href="https://beheh.de" />
<subtitle>Student an der Ostsee</subtitle>
<updated>2015-07-21T16:08:01+02:00</updated>
<generator>beheh.de</generator>
<id>https://beheh.de</id>
{% for entry in entries %}
<entry>
<title type="html"><![CDATA[{{entry.title}}]]></title>
<link href="https://beheh.de/{{entry.filename}}" />
<id>https://beheh.de/{{entry.filename}}</id>
<content type="html"><![CDATA[{{entry.contents|markdown}}]]></content>
<updated>{{entry.timestamp}}</updated>
</entry>{% endfor %}
</feed>

0 comments on commit ad3e889

Please sign in to comment.