From 31f7695ebfe9d01cb5fff091f98f3aa4fc40f6b6 Mon Sep 17 00:00:00 2001 From: Joan Josep Ordinas Rosa Date: Sun, 2 Dec 2018 12:36:34 +0100 Subject: [PATCH] Removed dot for pages --- bin/jqt | 4 ++-- docs/blocks/body/_blog/markup.html | 2 +- docs/blocks/filters.jq | 15 ++++++++------- docs/blocks/menu-bar/markup.html | 4 ++-- docs/content/jqt.1.text | 2 +- share/sake.d/phase3.make | 1 + 6 files changed, 15 insertions(+), 13 deletions(-) diff --git a/bin/jqt b/bin/jqt index ef40be9..9aa8169 100755 --- a/bin/jqt +++ b/bin/jqt @@ -279,8 +279,8 @@ function convert echo "import \"${basename}\" as \$${module};" done - # $M as a global reference to '.' - echo '. as $M |' + # $jqt as a global reference to '.' + echo '. as $jqt |' # define helper functions for JSON modules for module in ${!IMPORTS[@]}; do diff --git a/docs/blocks/body/_blog/markup.html b/docs/blocks/body/_blog/markup.html index b6eeb02..7b4142a 100644 --- a/docs/blocks/body/_blog/markup.html +++ b/docs/blocks/body/_blog/markup.html @@ -2,7 +2,7 @@ # Body for blog posts ######################################################################>&
- {% pages("blog")[] %} + {% pages[] | select(.Section=="blog") %}
{{.title}}

{{.description}} diff --git a/docs/blocks/filters.jq b/docs/blocks/filters.jq index 1619b10..15c6bed 100644 --- a/docs/blocks/filters.jq +++ b/docs/blocks/filters.jq @@ -2,7 +2,7 @@ # Extra filters for this site # -import "pages-by-id" as $pages; +#import "pages-by-id" as $pages; #import "phase1_site" as $site; # Remove XML tags @@ -12,14 +12,15 @@ def striptags: ; #def site: $site::site[0]; -def pages: $pages::pages[0]; +#def pages: $pages::pages[0]; -def pages($section): - [$pages::pages[0][] | select(.Section=="blog")] -; +#def pages($section): +# [$pages::pages[0][] | select(.Section=="blog")] +#; -def sections: - [$pages::pages[0].section] +def sections($pages): + # . as $pages + map(.section) | unique | map(select(. != null and . != "")) ; diff --git a/docs/blocks/menu-bar/markup.html b/docs/blocks/menu-bar/markup.html index f1ad3b1..5668e44 100644 --- a/docs/blocks/menu-bar/markup.html +++ b/docs/blocks/menu-bar/markup.html @@ -3,9 +3,9 @@ ######################################################################>&