Browse Source

Added atom support to basic layout

main
Lakshmi Vyasarajan 13 years ago
parent
commit
15f0d8eb05
4 changed files with 16 additions and 19 deletions
  1. +2
    -2
      README.rst
  2. +13
    -4
      hyde/layouts/basic/layout/atom.j2
  3. +0
    -12
      hyde/layouts/basic/layout/macros.j2
  4. +1
    -1
      hyde/version.py

+ 2
- 2
README.rst View File

@@ -1,4 +1,4 @@
Version 0.8rc1
Version 0.8rc2

A brand new **hyde**
====================
@@ -108,7 +108,7 @@ Next Steps
4. Plugins:

- Tags ✓
- Atom / RSS
- Atom / RSS
- Text Compressor (CSS, JS, HTML) ✓
- Image optimizer ✓



+ 13
- 4
hyde/layouts/basic/layout/atom.j2 View File

@@ -15,7 +15,7 @@
{% block feed_extra %}
{% endblock %}

<updated>{{ now|xmldatetime }}</updated>
<updated>{{ time_now|xmldatetime }}</updated>

<id>{{ content_url(resource.url) }}/</id>

@@ -27,13 +27,22 @@
<updated>{{ res.meta.created|xmldatetime }}</updated>
<published>{{ res.meta.created|xmldatetime }}</published>
<id>{{ content_url(res.url) }}</id>
{% for tag in res.meta.tags %}
<category scheme="{{ content_url('blog/tags') }}"
term="{{tag}}"
label="{{ tag|title }}" />
{% endfor %}

<content type="html">
{% refer to res.url as article -%}
{% filter forceescape -%}
{% if resource.meta.excerpts_only -%}
{{ render_excerpt(res) }}
{{ article.image|markdown|typogrify }}
{{ article.excerpt|markdown|typogrify }}
{%- else %}
{{ render_post(res) }}
{{ article.post|markdown|typogrify }}
{%- endif %}
{{ res.text }}
{%- endfilter %}
</content>
</entry>
{% endfor %}

+ 0
- 12
hyde/layouts/basic/layout/macros.j2 View File

@@ -1,15 +1,3 @@
{% macro render_post(res) %}
{% refer to res.url as article %}
<article>
<h3><a href="{{ content_url(res.url) }}">{{ res.meta.title }}</a></h3>
<time datetime="{{ res.meta.created.strftime('%Y-%m-%d') }}">
Posted: {{ res.meta.created.strftime('%a, %d %b %Y') }}
</time>
{{ article.post|markdown|typogrify }}
</article>
{% endmacro %}


{% macro render_excerpt(res, class=None) %}
{% refer to res.url as post %}
<article {{'class='~class if class }}>


+ 1
- 1
hyde/version.py View File

@@ -3,4 +3,4 @@
Handles hyde version
TODO: Use fabric like versioning scheme
"""
__version__ = '0.8rc1'
__version__ = '0.8rc2'

Loading…
Cancel
Save