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