From 6d34abf0906e817bfce4bdf98bf5a89b28c2f440 Mon Sep 17 00:00:00 2001 From: morelazers Date: Tue, 30 May 2023 10:46:56 +0200 Subject: [PATCH] fix: move uri out of state --- app/blog.hoon | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/blog.hoon b/app/blog.hoon index fdc4fe3..5a73669 100644 --- a/app/blog.hoon +++ b/app/blog.hoon @@ -25,7 +25,6 @@ files=(map path [html=@t md=@t theme=@tas]) drafts=(map path md=@t) themes=(map @tas css=@t) - uri=@t pub-paths=_(mk-pubs blog-paths ,[%paths ~]) == +$ card $+(card card:agent:gall) @@ -59,13 +58,12 @@ (~(urn by files.old) |=([=path html=@t md=@t] [html md %none])) drafts.old (~(gas by *(map @tas @t)) [%default default-theme:blog-lib]~) - uri=*@t pub-paths == == :: %2 - =. state [%3 files.old drafts.old themes.old uri=*@t pub-paths] + =. state [%3 files.old drafts.old themes.old pub-paths] =^ cards pub-paths (give:du-paths [%paths ~] [%init ~(key by files)]) :_ this %+ welp cards @@ -179,7 +177,7 @@ :: %update-uri =^ cards pub-paths (give:du-paths [%paths ~] [%uri uri.act]) - :_ this(uri uri.act) cards + [cards this] == :: %sss-to-pub @@ -197,7 +195,7 @@ [%x %html ^] ``blog+!>(-:(~(got by files) t.t.path)) [%x %draft ^] ``blog+!>((~(got by drafts) t.t.path)) [%x %theme @ ~] ``blog+!>((~(got by themes) i.t.t.path)) - [%x %uri ~] ``blog+!>(uri) + [%x %uri ~] ``blog+!>(uri:rock:(~(got by read:du-paths) [%paths ~])) :: [%x %pages ~] =; pages ``json+!>([%a pages])