This shows how to add draft posts feature to hyde. This will be a part of hyde 0.8.7.
mkdir ~/test_drafts
cd ~/test_drafts
hyde create
[caps]>[escape] | |
[lshift]>[=] | |
[up]>[obrack] | |
[down]>[cbrack] | |
[obrack]>[up] | |
[cbrack]>[down] | |
[scroll]>[shutdn] | |
[right]>[intl-\] | |
[left]>[`] | |
[intl-\]>[right] |
#!/usr/bin/env awk -f | |
function rel2abs(req, dir, root) | |
{ | |
"readlink --canonicalize " root|getline res | |
"sh -c \"cd " dir " && readlink --canonicalize " req "\""|getline resolved | |
gsub(res, "", resolved) | |
gsub(/^\//,"", resolved) | |
return resolved | |
} |
@ |
diff --git a/layout/base.j2 b/layout/base.j2 | |
index d2ad76b..4abfdf9 100644 | |
--- a/layout/base.j2 | |
+++ b/layout/base.j2 | |
@@ -85,7 +85,8 @@ | |
<ul class="nav navbar-nav pull-right"> | |
{#{% for menu_item in site.content.child_nodes|sort(attribute='name') %}#} | |
{#{% if menu_item.name != "media" %}#} | |
- {% for menu_item in site.content.child_nodes|sort(attribute='name') %} | |
+ {% set lang_root = site.content.node_from_relative_path(resource.meta.language|default('en')) %} |