feed: fix XML, add ID
[web.git] / ralf / _layouts / page.html
1 <!DOCTYPE html>
2 <html>
3
4   <head>
5     <meta charset="utf-8">
6     <meta name="viewport" content="width=device-width">
7
8     {% assign title = page.title %}
9     {% assign pretitle = page.pretitle %}
10     {% if page.vars %}{% include {{ page.vars | prepend: "vars/" }} %}{% endif %}
11
12     <title>{% if pretitle %}{{ pretitle }} • {% endif %}{{ title }}</title>
13     {% if page.excerpt %}<meta name="description" content="{{ page.excerpt | newline_to_br | replace:'<br />',' ' | strip_html | strip_newlines | truncate: 192 }}">{% endif %}
14
15     <link rel="stylesheet" href="{{ site.baseurl }}/style.css">
16     <link rel="canonical" href="{{ site.url }}{{ site.baseurl }}{{ page.url | replace:'/index.html','/' }}">
17     {% if page.rss %}
18         <link rel="alternate" type="application/atom+xml" title="{{ site.blog.title }}" href="{{ site.baseurl }}/blog/feed.xml" />
19         {% if page.category %}<link rel="alternate" type="application/atom+xml" title="{{ site.blog.title }} • {{ title }}" href="{{ site.baseurl }}{{ page.url | replace: '.html','.xml' }}" />{% endif %}
20     {% endif %}
21   </head>
22
23   <body><div id="-frame">
24
25     <nav id="-navi">
26       {% assign menu = site.pages | menu: page.url %}
27       {% include menu-level.html menu=menu %}
28     </nav>
29   
30     <article id="-content">
31       {% comment %} Unfortunately, the variables we set above are not preserved for sub-layouts. So, we have to have all the layout here. {% endcomment %}
32       {% if pretitle %}
33         <header class="pretitle">
34           {% if page.post %}
35             {% include post-header.html item=page %}
36           {% endif %}
37           <h1>{{ pretitle }}</h1>
38         </header>
39       {% endif %}
40
41       <header class="title">
42         <h1>{{ title }}</h1>
43       </header>
44
45       {{ content }}
46
47       {% if page.post %}<p class="comment">Comments? <a href="mailto:post-AT-ralfj-DOT-de">Drop me a mail</a>!</p>{% endif %}
48     </article>
49
50   </div></body>
51
52 </html>