mirror of
https://github.com/tadad/blog.git
synced 2024-09-11 12:55:07 +03:00
feat: add export scry path to json
This commit is contained in:
parent
f4b2717f0b
commit
d6e4299ec9
@ -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
4
gen/blog-export.hoon
Normal file
@ -0,0 +1,4 @@
|
||||
:- %say
|
||||
|= [[now=@da @ our=@p ^] *]
|
||||
:- %json
|
||||
.^(json %gx /(scot %p our)/blog/(scot %da now)/export/json)
|
Loading…
Reference in New Issue
Block a user