mirror of
https://github.com/tadad/blog.git
synced 2024-08-17 08:40:20 +03:00
feat: add export scry path to json
This commit is contained in:
parent
f4b2717f0b
commit
d6e4299ec9
@ -31,7 +31,7 @@
|
||||
`this(themes (~(gas by themes) [%default default-theme:blog-lib]~))
|
||||
++ on-save !>(state)
|
||||
++ on-load
|
||||
|= =vase
|
||||
|= =vase
|
||||
^- (quip card _this)
|
||||
=+ !<(old=versioned-state vase)
|
||||
?- -.old
|
||||
@ -140,6 +140,38 @@
|
||||
=; 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)
|
||||
%- pairs:enjs:format
|
||||
|
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