fix: move uri out of state

This commit is contained in:
morelazers 2023-05-30 10:46:56 +02:00
parent 28327fbc2b
commit 6d34abf090

View File

@ -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])