Skip to content

Instantly share code, notes, and snippets.

@navilan
Created November 9, 2015 15:24
Show Gist options
  • Save navilan/24812f35eff40ee7d972 to your computer and use it in GitHub Desktop.
Save navilan/24812f35eff40ee7d972 to your computer and use it in GitHub Desktop.
diff --git a/content/media/js/meta.yaml b/content/media/js/meta.yaml
new file mode 100644
index 0000000..057bf05
--- /dev/null
+++ b/content/media/js/meta.yaml
@@ -0,0 +1 @@
+uses_template: False
diff --git a/layout/blog.j2 b/layout/blog.j2
index 8c3aec0..3697716 100644
--- a/layout/blog.j2
+++ b/layout/blog.j2
@@ -133,6 +133,30 @@
<div class="addthis_recommended_horizontal"></div>
{% endif %}
+
+ <div class="container padding-top">
+ {% set next = resource['next_by_time'~'_'~resource.meta.language] %}
+ {% set prev = resource['prev_by_time'~'_'~resource.meta.language] %}
+ <nav class="nav-single clearfix">
+ {% if next %}
+ <div class="nav-previous text-left">
+ <a href="{{ next.full_url }}">
+ <small>Previous Post</small>
+ <span>{{ next.meta.title }}</span>
+ </a>
+ </div>
+ {% endif %}
+ {% if prev %}
+ <div class="nav-next text-right">
+ <a href="{{ prev.full_url }}">
+ <small>Next Post</small>
+ <span>{{ prev.meta.title }}</span>
+ </a>
+ </div>
+ {% endif %}
+ </nav>
+ </div>
+
{% endblock %}
<!-- vim: set filetype=htmldjango: -->
diff --git a/site-local.yaml b/site-local.yaml
index 074908b..69b9951 100644
--- a/site-local.yaml
+++ b/site-local.yaml
@@ -21,47 +21,34 @@ syntax:
use_figure: False
sorter:
- name:
- attr: name
- filters:
- source_file.kind: html
- is_processable: True
- time:
- attr: meta.created
- reverse: True
- filters:
- source_file.kind: html
- is_processable: True
-
-#sorter:
-# name:
-# attr:
-# - relative_path
-# time:
-# attr:
-# - meta.created
-# reverse: true
-# filters:
-# source.kind: html
-# meta.listable: true
-# time_fr:
-# attr:
-# - meta.created
-# - relative_path
-# reverse: true
-# filters:
-# source.kind: html
-# meta.listable: true
-# meta.language: fr
-# time_en:
-# attr:
-# - meta.created
-# - relative_path
-# reverse: true
-# filters:
-# source.kind: html
-# meta.listable: true
-# meta.language: en
+ name:
+ attr:
+ - relative_path
+ time:
+ attr:
+ - meta.created
+ reverse: true
+ filters:
+ source.kind: html
+ meta.listable: true
+ time_es:
+ attr:
+ - meta.created
+ - relative_path
+ reverse: true
+ filters:
+ source.kind: html
+ meta.listable: true
+ meta.language: es
+ time_en:
+ attr:
+ - meta.created
+ - relative_path
+ reverse: true
+ filters:
+ source.kind: html
+ meta.listable: true
+ meta.language: en
tagger:
sorter: time
@@ -123,6 +110,7 @@ context:
meta:
encoding: utf-8
nodemeta: meta.yaml
+ listable: true
# created: !!timestamp 2012-08-02 14:04:01
lc: 'en_US'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment