feat: add export scry path to json

This commit is contained in:
morelazers 2023-03-27 09:09:18 +02:00
parent f4b2717f0b
commit d6e4299ec9
2 changed files with 37 additions and 1 deletions

View File

@ -139,6 +139,38 @@
[%x %active-theme ^]
=; theme ``json+!>(s+theme)
theme:(~(got by files) t.t.path)
::
[%x %export ~]
=; export ``json+!>(export)
%- pairs:enjs:format
:~
:- 'published'
:- %a
%+ turn ~(tap by files)
|= [=^path html=@t md=@t theme=@tas]
:- %a
:~ (path:enjs:format path)
(tape:enjs:format [html ~])
(tape:enjs:format [md ~])
s+theme
==
:- 'drafts'
:- %a
%+ turn ~(tap by drafts)
|= [=^path md=@t]
:- %a
:~ (path:enjs:format path)
(tape:enjs:format [md ~])
==
:- 'themes'
:- %a
%+ turn ~(tap by themes)
|= [theme=@tas css=@t]
:- %a
:~ (path:enjs:format [theme ~])
(tape:enjs:format [css ~])
==
==
::
[%x %all-bindings ~]
=; the-thing ``json+!>(the-thing)

4
gen/blog-export.hoon Normal file
View File

@ -0,0 +1,4 @@
:- %say
|= [[now=@da @ our=@p ^] *]
:- %json
.^(json %gx /(scot %p our)/blog/(scot %da now)/export/json)