Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 79 lines (62 sloc) 2.194 kb
21abc5b @klacke Initial revision
authored
1 <erl>
2
b12525a @klacke 1.01 checkin
authored
3
dbab7a3 @klacke ssi include with var expansion + docs
authored
4 out(A) ->
5 [{ssi, "HEAD",[],[]},
6 {ssi, "TOPTAB", [],[]},
7 {ehtml,
8 [{h2,[],"Yaws"},
9 {p,[],"Yaws is a HTTP high perfomance 1.1 webserver."
10 "Two separate modes of operations are supported."},
11 {ul,[],
12 [{li,[],
13 {p,[],"Standalone mode where yaws runs as a regular webserver "
14 "daemon. This is the default mode."}},
15 {li,[],
16 {p,[], "Embedded mode where Yaws runs as an embedded webserver in an"
17 "another erlang application."}}
18 ]},
19 {p,[], ["Yaws is entirely written in ",
20 {a, [{href, "http://www.erlang.org"}], "Erlang"},
21 " furthermore it is a multithreaded webserver where one "
22 "Erlang light weight process is used to handle each client."]},
23 {p,[], "As matter of fact, the "
24 "ad-hockery of php was one of major reasons "
25 "I started the Yaws project."},
26 {p,[],"Furthermore, Yaws has excellent performance and is able to"
27 " ship several thousands of dynamically generated pages per second."},
28
29 {h2,[], "yaws,hyber.org"},
30
31 {p,[], ["The www page for Yaws is ",
32 {a ,[{href,"http://yaws.hyber.org"}], "yaws.hyber.org"},
33 "The documentation, examples as well as releases can be "
34 "found there, and of cource, ",
35 {a ,[{href,"http://yaws.hyber.org"}],"yaws.hyber.org"},
36 " is itself powered by Yaws"]},
37
38 {p,[], ["A mailing list exists at: ",
39 {a,[{href,"https://lists.sourceforge.net/lists/listinfo/""erlyaws-list"}],
40 "https://lists.sourceforge.net/lists/listinfo/erlyaws-list"}]},
41 {hr},
42 gen_news(A),
43 {ssi, "END",[],[]}
44 ]}].
45
46
47 gen_news(A) ->
b2d5a00 @klacke postvar(), queryvar(), ssi docs
authored
48 case file:open(A#arg.docroot ++ "/news",[read]) of
49 {ok, Fd} ->
50 gen_news(Fd, io:get_line(Fd,''));
51 Err ->
52 {p,[], f("No news: ~p",[Err])}
53 end.
dbab7a3 @klacke ssi include with var expansion + docs
authored
54
55 gen_news(Fd, eof) ->
56 [];
57 gen_news(Fd, Line) ->
58 Items = gen_items(Fd, io:get_line(Fd, '')),
59 X = [{'div', [{class, "box"}],
60 [{h3, [], Line},
61 {ul, [], Items}]},
62 {br}, {hr}],
63
64 [X | gen_news(Fd, io:get_line(Fd,''))].
65
66 gen_items(Fd, [10]) ->
67 [];
68 gen_items(Fd,eof) ->
69 [];
70 gen_items(Fd,Line) ->
71 [{li, [], {p, [], Line}} |gen_items(Fd, io:get_line(Fd, ''))].
b12525a @klacke 1.01 checkin
authored
72
ad6ed86 @klacke ""
authored
73
74
dbab7a3 @klacke ssi include with var expansion + docs
authored
75 </erl>
e16ea1b @klacke ""
authored
76
77
f0b4192 @klacke ""
authored
78
Something went wrong with that request. Please try again.