mirror of
https://github.com/tadad/blog.git
synced 2024-09-11 12:55:07 +03:00
fixing
This commit is contained in:
parent
497675ba2e
commit
8e6bf7c313
@ -36,26 +36,22 @@
|
|||||||
%blog-action
|
%blog-action
|
||||||
=+ !<(act=action:blog vase)
|
=+ !<(act=action:blog vase)
|
||||||
?- -.act
|
?- -.act
|
||||||
%blog-bind
|
%unbind-post :: TODO probably dont' need this
|
||||||
:_ this
|
:_ this
|
||||||
[%pass /bind %arvo %e %connect `path.act dap.bowl]~
|
[%pass /bind %arvo %e %disconnect `bind.act]~
|
||||||
::
|
|
||||||
%blog-unbind
|
|
||||||
:_ this
|
|
||||||
[%pass /bind %arvo %e %disconnect `path.act]~
|
|
||||||
::
|
::
|
||||||
%save-file
|
%save-file
|
||||||
~& > text.act
|
~& > text.act
|
||||||
~& > file.act
|
~& > file.act
|
||||||
:: /=blog=/blogs/...
|
:: /=blog=/blogs/...
|
||||||
=* file
|
=* file [%posts file.act]
|
||||||
%+ weld
|
|
||||||
/(scot %p our.bowl)/blog/(scot %da now.bowl)/blogs
|
|
||||||
file.act
|
|
||||||
=* nor `nori:clay`[%& [file %ins %html !>(text.act)]~]
|
=* nor `nori:clay`[%& [file %ins %html !>(text.act)]~]
|
||||||
[%pass / %arvo %c %info %blog nor]~^this
|
:_ this
|
||||||
|
:~ [%pass / %arvo %c %info %blog nor]
|
||||||
|
[%pass /serve %arvo %e %serve `file.act dap.bowl /gen/blog/hoon ~]
|
||||||
|
==
|
||||||
::
|
::
|
||||||
%delete-file
|
%delete-file :: TODO unbind here as well
|
||||||
=* nor `nori:clay`[%& [file.act %del ~]~]
|
=* nor `nori:clay`[%& [file.act %del ~]~]
|
||||||
[%pass / %arvo %c %info %blog nor]~^this
|
[%pass / %arvo %c %info %blog nor]~^this
|
||||||
==
|
==
|
||||||
@ -70,12 +66,16 @@
|
|||||||
^- (unit (unit cage))
|
^- (unit (unit cage))
|
||||||
?+ path ~
|
?+ path ~
|
||||||
::
|
::
|
||||||
:: [%x %existing-bindings ~]
|
[%x %existing-bindings ~]
|
||||||
:: =* pax /(scot %p our.bowl)/bindings/(scot %da now.bowl)
|
=* pax /(scot %p our.bowl)/bindings/(scot %da now.bowl)
|
||||||
:: :^ ~ ~ %bindings !>
|
:^ ~ ~ %bindings !>
|
||||||
:: .^((list [binding:eyre duct action:eyre]) %e pax)
|
.^((list [binding:eyre duct action:eyre]) %e pax)
|
||||||
::
|
::
|
||||||
[%x %blog ^]
|
[%x %posts ~]
|
||||||
|
=* pax /(scot %p our.bowl)/blog/(scot %da now.bowl)/blogs
|
||||||
|
``arch+!>((turn ~(tap by dir:.^(arch %cy pax)) head))
|
||||||
|
::
|
||||||
|
[%x %content ^]
|
||||||
:^ ~ ~ %html
|
:^ ~ ~ %html
|
||||||
!> ^- cord
|
!> ^- cord
|
||||||
%- of-wain:format
|
%- of-wain:format
|
||||||
@ -92,7 +92,7 @@
|
|||||||
|= [=wire =sign-arvo]
|
|= [=wire =sign-arvo]
|
||||||
^- (quip card _this)
|
^- (quip card _this)
|
||||||
?+ wire (on-arvo:def wire sign-arvo)
|
?+ wire (on-arvo:def wire sign-arvo)
|
||||||
[%bind ~]
|
[%serve ~]
|
||||||
?> ?=(%eyre -.sign-arvo)
|
?> ?=(%eyre -.sign-arvo)
|
||||||
?> ?=(%bound +<.sign-arvo)
|
?> ?=(%bound +<.sign-arvo)
|
||||||
?- accepted.sign-arvo
|
?- accepted.sign-arvo
|
||||||
|
13
gen/blog.hoon
Normal file
13
gen/blog.hoon
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
|= [[now=@da eny=@uvJ byk=beak] ~ ~]
|
||||||
|
|= [authenticated=? =request:http]
|
||||||
|
^- simple-payload:http
|
||||||
|
=* data
|
||||||
|
%- as-octs:mimes:html
|
||||||
|
.^ @t
|
||||||
|
%cx
|
||||||
|
%+ weld
|
||||||
|
/(scot %p p.byk)/blog/(scot r.byk)/posts
|
||||||
|
(pa:dejs:format [%s url.request])
|
||||||
|
==
|
||||||
|
:_ `(unit octs)``data
|
||||||
|
`response-header:http`[200 ['Content-Type' 'text/html']~]
|
16
mar/arch.hoon
Normal file
16
mar/arch.hoon
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
|_ arch=(list @ta)
|
||||||
|
::
|
||||||
|
++ grab
|
||||||
|
|%
|
||||||
|
++ noun (list @ta)
|
||||||
|
--
|
||||||
|
::
|
||||||
|
++ grow
|
||||||
|
|%
|
||||||
|
++ noun arch
|
||||||
|
++ json
|
||||||
|
[%a (turn arch |=(c=@ta [%s c]))]
|
||||||
|
--
|
||||||
|
::
|
||||||
|
++ grad %noun
|
||||||
|
--
|
1
mar/bill.hoon
Symbolic link
1
mar/bill.hoon
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../base-dev/mar/bill.hoon
|
19
mar/bindings.hoon
Normal file
19
mar/bindings.hoon
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
|_ bind=(list [binding:eyre duct action:eyre])
|
||||||
|
::
|
||||||
|
++ grab
|
||||||
|
|%
|
||||||
|
++ noun (list [binding:eyre duct action:eyre])
|
||||||
|
--
|
||||||
|
::
|
||||||
|
++ grow
|
||||||
|
|%
|
||||||
|
++ noun bind
|
||||||
|
++ json
|
||||||
|
:- %a
|
||||||
|
%+ turn bind
|
||||||
|
|= [=binding:eyre duct action:eyre]
|
||||||
|
(path:enjs:format path.binding)
|
||||||
|
--
|
||||||
|
::
|
||||||
|
++ grad %noun
|
||||||
|
--
|
@ -5,12 +5,9 @@
|
|||||||
|%
|
|%
|
||||||
++ noun action:blog
|
++ noun action:blog
|
||||||
++ json
|
++ json
|
||||||
|= jon=^json
|
|
||||||
=, dejs:format
|
=, dejs:format
|
||||||
^- action:pyro
|
|
||||||
%- of
|
%- of
|
||||||
:~ [%blog-bind pa]
|
:~ [%unbind-post pa]
|
||||||
[%blog-unbind pa]
|
|
||||||
[%save-file (ot ~[file+pa text+so])]
|
[%save-file (ot ~[file+pa text+so])]
|
||||||
[%delete-file pa]
|
[%delete-file pa]
|
||||||
==
|
==
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
|%
|
|%
|
||||||
+$ action
|
+$ action
|
||||||
$% [%blog-bind =path]
|
$% [%unbind-post bind=path]
|
||||||
[%blog-unbind =path]
|
|
||||||
[%save-file file=path text=@t]
|
[%save-file file=path text=@t]
|
||||||
[%delete-file file=path]
|
[%delete-file file=path]
|
||||||
==
|
==
|
||||||
|
Loading…
Reference in New Issue
Block a user