]> Sergey Matveev's repositories - public-inbox.git/blob - Documentation/design_www.txt
226a22c9704b427ddea9620a27be9a6888043923
[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 Maybe TODO (these might be expensive)
17 -------------------------------------
18 /$LISTNAME/t/$MESSAGE_ID.html                   -> HTML content of thread
19 /$LISTNAME/t/$MESSAGE_ID.mbox                   -> mbox content of thread
20
21 We use file name suffixes on all of these (except /) so URLs may easily
22 cached/memoized using a static file server.
23
24 Guidelines for using limited HTML
25 ---------------------------------
26 We mainly use HTML for linking pages together with <a>.
27 We also set <title> to make window management easier.
28
29 We favor <pre>-formatted text since public-inbox is intended as a place
30 to share and discuss patches and code.  Unfortunately, long paragraphs
31 tends to be less readable with fixed-width serif fonts which GUI
32 browsers default to.  So perhaps we will add different endpoints for
33 variable-width fonts.
34
35 * Do not build <a> links from user-generated-content, this prevents
36   public-inbox deployments from being turned into a spam linkfarm.
37
38 * No graphics, images, or icons at all.  We tolerate, but do not
39   encourage the use of GUIs.
40
41 * No setting colors or font sizes, power to users to decide those.
42
43 * No JavaScript. JS is historically too buggy and insecure, and we will
44   never expect our readers to do either of the following:
45   a) read and audit all our code for on every single page load
46   b) trust us and and run code without reading it
47
48 * We only use CSS for one reason: wrapping pre-formatted text
49   This is necessary because unfortunate GUI browsers tend to be
50   prone to layout widening.  lynx is fine here without CSS :)
51   No other CSS is allowed, especially with scary things like:
52
53         http://thejh.net/misc/website-terminal-copy-paste