From ad6e84c0f6809c3465d464377b1865351f2ef0a7 Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Tue, 27 Mar 2018 17:30:31 -0700 Subject: [PATCH] test renderers on example.md --- app/test.hoon | 43 +++++++++++++++++++++++++++++++++---------- app/test/example.md | 9 +++++++++ 2 files changed, 42 insertions(+), 10 deletions(-) create mode 100644 app/test/example.md diff --git a/app/test.hoon b/app/test.hoon index 2d172c6ed..d2bf643fe 100644 --- a/app/test.hoon +++ b/app/test.hoon @@ -5,6 +5,7 @@ [%cores p=path] [%hoons p=path] [%names p=path] + [%render p=path] == -- :: @@ -13,6 +14,8 @@ |= {a/cord b/(list cord)} ?~ b '' (rap 3 |-([i.b ?~(t.b ~ [a $(b t.b)])])) +:: +++ fake-fcgi [%many [%blob *cred:eyre] $+[%n ~] ~] -- :: =, gall @@ -58,6 +61,31 @@ [[%core now-beak a] [%$ %cont !>(b)]] == :: +++ made-a-rend + |= {a/wire @uvH b/gage} + ?> ?=([ren=mark ~] a) + =+ `[ren=term pax=path]`?~(a !! a) + :_ +>.$ + ?> ?=([%tabl [(each) (each)] ~] b) + %- (slog (report-error /[ren.i.a]/ren p.i.p.b)) + =/ nex/(list term) + =<(p ;;(,[%& %cont * p=(list term)] q.i.p.b)) + ?~ nex ~&(%rens-tested ~) + [ost (build-rend nex)]~ +:: +++ build-rend + |= [a=term b=(list term)] + ~& >> [%ren a] + =/ bem/beam (need (de-beam %/example)) + =. -.bem now-beak + :^ %exec a-rend+/[a] our + %- some + ^- bilk + :- -.bem + :~ %tabl + [`silk`[%bake a fake-fcgi bem] [%$ %cont !>(b)]] + == +:: ++ poke-noun |= a=test :_ +> @@ -66,6 +94,7 @@ %cores [ost (build-core [- +]:(list-hoons p.a))]~ %names ~&((list-names p.a) ~) %marks !! ::TODO restore historical handler + %render [ost (build-rend [- +]:(list-names p.a))]~ == :: ++ list-names @@ -98,8 +127,11 @@ ++ skip-completely ^~ ^- (map path tape) %- my :~ ::TODO don't hardcode - :- /ren/test-tree "recursive" :- /sys "generally out of scope" + :: + :- /ren/css "not meant to be called outside /web/pack" + :- /ren/js "not meant to be called outside /web/pack" + :- /ren/run "not meant to be called except on a (different) hoon file" :: :- /app/gh "hangs for some reason" :- /mar/gh "hangs for some reason" @@ -121,15 +153,6 @@ :- /lib/sole "ford can't handle surs from libs" :- /lib/hall "ford can't handle surs from libs" :- /lib/twitter "ford can't handle surs from libs" - :- /ren/css "not meant to be called outside /web/pack" - :- /ren/js "not meant to be called outside /web/pack" - :- /ren/rss-xml "uses /$" - :- /ren/run "not meant to be called except on a (different) hoon file" - :- /ren/tree/body "uses ren/tree" - :- /ren/tree/head "uses /$" - :- /ren/tree/json "uses /$" - :- /ren/urb "uses ren/tree" - :- /ren/urb/tree "uses ren/tree" :- /sys/arvo "BROKEN" :- /sys/vane/jael "expects our" :- /sys/vane/xmas "expects our" diff --git a/app/test/example.md b/app/test/example.md new file mode 100644 index 000000000..12e980193 --- /dev/null +++ b/app/test/example.md @@ -0,0 +1,9 @@ +--- +comments: true +--- + +# Static + +You can put static files in here to serve them to the web. Actually, you can put static files anywhere in `/web` and see them in a browser. + +Docs on static publishing with urbit are forthcoming — but feel free to drop markdown files in `/web` to try it out. \ No newline at end of file