]> Sergey Matveev's repositories - public-inbox.git/blob - Documentation/design_www.txt
0c38ae5f299949c2a1ffd610656330b414c517b8
[public-inbox.git] / Documentation / design_www.txt
1 URL naming
2 ----------
3
4 ### Unstable endpoints
5 /$LISTNAME/?r=$GIT_COMMIT                       -> HTML only
6 /$LISTNAME/atom.xml                             -> Atom feed
7
8 ### Stable endpoints
9 /$LISTNAME/m/$MESSAGE_ID.html                   -> HTML content (short quotes)
10 /$LISTNAME/m/$MESSAGE_ID.txt                    -> raw original
11 /$LISTNAME/m/$MESSAGE_ID                        -> 301 to .html version
12 /$LISTNAME/f/$MESSAGE_ID.html                   -> HTML content (full quotes)
13 /$LISTNAME/f/$MESSAGE_ID                        -> 301 to .html version
14 /$LISTNAME/f/$MESSAGE_ID.txt                    -> 301 to m/$MESSAGE_ID.txt
15
16 FIXME: we must refactor/cleanup/add tests for most of our CGI before
17 adding more endpoints and features.
18
19 Maybe TODO (these might be expensive)
20 -------------------------------------
21 /$LISTNAME/t/$MESSAGE_ID.html                   -> HTML content of thread
22 /$LISTNAME/t/$MESSAGE_ID.mbox                   -> mbox content of thread
23
24 We use file name suffixes on all of these (except /) so URLs may easily
25 cached/memoized using a static file server.
26
27 Encoding notes
28 --------------
29
30 Raw HTML and XML should only contain us-ascii characters which render
31 to UTF-8.
32
33 Plain text (raw message) endpoints display in the original encoding(s)
34 of the original email.
35
36 Guidelines for using limited HTML
37 ---------------------------------
38 We mainly use HTML for linking pages together with <a>.
39 We also set <title> to make window management easier.
40
41 We favor <pre>-formatted text since public-inbox is intended as a place
42 to share and discuss patches and code.  Unfortunately, long paragraphs
43 tends to be less readable with fixed-width serif fonts which GUI
44 browsers default to.  So perhaps we will add different endpoints for
45 variable-width fonts.
46
47 * No graphics, images, or icons at all.  We tolerate, but do not
48   encourage the use of GUIs.
49
50 * No setting colors or font sizes, power to users to decide those.
51
52 * No JavaScript. JS is historically too buggy and insecure, and we will
53   never expect our readers to do either of the following:
54   a) read and audit all our code for on every single page load
55   b) trust us and and run code without reading it
56
57 * We only use CSS for one reason: wrapping pre-formatted text
58   This is necessary because unfortunate GUI browsers tend to be
59   prone to layout widening.  w3m is fine here without CSS :)
60   No other CSS is allowed, especially with scary things like:
61
62         http://thejh.net/misc/website-terminal-copy-paste