feat: allow saving base uri

This commit is contained in:
morelazers 2023-05-25 15:01:45 +02:00
parent 08eeb8d28c
commit adbd7f792a
3 changed files with 7 additions and 1 deletions

View File

@ -26,6 +26,7 @@
files=(map path [html=@t md=@t theme=@tas]) files=(map path [html=@t md=@t theme=@tas])
drafts=(map path md=@t) drafts=(map path md=@t)
themes=(map @tas css=@t) themes=(map @tas css=@t)
uri=@t
=_pub-paths =_pub-paths
== ==
+$ card $+(card card:agent:gall) +$ card $+(card card:agent:gall)
@ -59,12 +60,13 @@
(~(urn by files.old) |=([=path html=@t md=@t] [html md %none])) (~(urn by files.old) |=([=path html=@t md=@t] [html md %none]))
drafts.old drafts.old
(~(gas by *(map @tas @t)) [%default default-theme:blog-lib]~) (~(gas by *(map @tas @t)) [%default default-theme:blog-lib]~)
uri=*@t
pub-paths pub-paths
== ==
== ==
:: ::
%2 %2
=. state [%3 files.old drafts.old themes.old pub-paths] =. state [%3 files.old drafts.old themes.old uri=*@t pub-paths]
=^ cards pub-paths (give:du-paths [%paths ~] [%init ~(key by files)]) =^ cards pub-paths (give:du-paths [%paths ~] [%init ~(key by files)])
:_ this :_ this
%+ welp cards %+ welp cards
@ -176,6 +178,7 @@
%delete-draft `this(drafts (~(del by drafts) path.act)) %delete-draft `this(drafts (~(del by drafts) path.act))
%save-theme `this(themes (~(put by themes) [theme css]:act)) %save-theme `this(themes (~(put by themes) [theme css]:act))
%delete-theme `this(themes (~(del by themes) theme.act)) %delete-theme `this(themes (~(del by themes) theme.act))
%update-uri `this(uri uri.act)
== ==
:: ::
%sss-to-pub %sss-to-pub
@ -193,6 +196,7 @@
[%x %html ^] ``blog+!>(-:(~(got by files) t.t.path)) [%x %html ^] ``blog+!>(-:(~(got by files) t.t.path))
[%x %draft ^] ``blog+!>((~(got by drafts) t.t.path)) [%x %draft ^] ``blog+!>((~(got by drafts) t.t.path))
[%x %theme @ ~] ``blog+!>((~(got by themes) i.t.t.path)) [%x %theme @ ~] ``blog+!>((~(got by themes) i.t.t.path))
[%x %uri ~] ``blog+!>(uri)
:: ::
[%x %pages ~] [%x %pages ~]
=; pages ``json+!>([%a pages]) =; pages ``json+!>([%a pages])

View File

@ -13,6 +13,7 @@
[%delete-draft (ot ~[path+pa])] [%delete-draft (ot ~[path+pa])]
[%save-theme (ot ~[theme+so css+so])] [%save-theme (ot ~[theme+so css+so])]
[%delete-theme (ot ~[theme+so])] [%delete-theme (ot ~[theme+so])]
[%update-uri (ot ~[uri+so])]
== ==
-- --
:: ::

View File

@ -7,6 +7,7 @@
[%delete-draft =path] [%delete-draft =path]
[%save-theme theme=@tas css=@t] [%save-theme theme=@tas css=@t]
[%delete-theme theme=@tas] [%delete-theme theme=@tas]
[%update-uri uri=@t]
== ==
+$ sub [%sub =ship] +$ sub [%sub =ship]
-- --