diff --git a/docs/Makefile b/docs/Makefile index 78fd212..a86b4bf 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -96,7 +96,6 @@ ifdef __phase_2 # __phase_3 # Defined rules for: # $(Metadata)/phase3.make -# $(DestinationPages) # Defined targets: # all # build @@ -130,6 +129,14 @@ include project.make # # Project specific makefile. All the previous modules are expected to be # independent, valid for any project without any change. +# +# Defined rules for: +# $(ManPage) +# /tmp/help +# Defined targets: +# all +# clean +# clobber ######################################################################## endif # __phase_3 diff --git a/docs/make.d/phase21.jq b/docs/make.d/phase21.jq index 8b4b13c..860a762 100644 --- a/docs/make.d/phase21.jq +++ b/docs/make.d/phase21.jq @@ -38,18 +38,23 @@ def page_path: def page_section: $Target | if test("(?\\d{4}-\\d{2}-\\d{2})-") | .date) - // "" + .filename | + (capture("^(?\\d{4}-\\d{2}-\\d{2})-") | .YMD) + // "" +; + +def page_url: + .path + .slug ; ######################################################################## @@ -65,15 +70,16 @@ def defaults: def properties: { - base: page_base, - date: page_date, id: page_id, - path: page_path, + base: page_base, + filename: page_name, section: page_section, - slug: page_slug, - source: $Source, - url: (page_path+page_slug) + path: page_path, + source: $Source } + | .date = page_date # in this order! + | .slug = page_slug + | .url = page_url ; . as $front_matter | diff --git a/docs/make.d/phase3.jq b/docs/make.d/phase3.jq index d2f15e1..8c6d8b1 100644 --- a/docs/make.d/phase3.jq +++ b/docs/make.d/phase3.jq @@ -13,11 +13,15 @@ def use: ; def flags: - if .flags then .flags | join(" ") else "" end + if .flags + then .flags | join(" ") + else "" end ; def data: - if .data then .data | map("-m\(.):$(Metadata)/snippets.json") | join(" ") else "" end + if .data + then .data | map("-m\(.):$(Metadata)/snippets.json") | join(" ") + else "" end ; ######################################################################## diff --git a/docs/project.make b/docs/project.make index 4854c91..fe55f86 100644 --- a/docs/project.make +++ b/docs/project.make @@ -1,6 +1,6 @@ ######################################################################## # -# Specific makefile for this web site +# Specific makefile for this web site # # Defined rules for: # $(ManPage)