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 @@ ######################################################################>&