]> Sergey Matveev's repositories - public-inbox.git/blob - Documentation/design_www.txt
87631840e0806a9fc80c32de7fbae61a86c4ebae
[public-inbox.git] / Documentation / design_www.txt
1 URL naming
2 ----------
3
4 ### Unstable endpoints
5 /$LISTNAME/?r=$GIT_COMMIT                 -> HTML only
6 /$LISTNAME/new.atom                       -> Atom feed
7
8 #### Optional, relies on Search::Xapian
9 /$LISTNAME/$MESSAGE_ID/t/                 -> HTML content of thread
10 /$LISTNAME/$MESSAGE_ID/t.atom             -> Atom feed for thread
11 /$LISTNAME/$MESSAGE_ID/t.mbox.gz          -> gzipped mbox of thread
12
13 ### Stable endpoints
14 /$LISTNAME/$MESSAGE_ID/                   -> HTML content (short quotes)
15 /$LISTNAME/$MESSAGE_ID                    -> 301 to /$LISTNAME/$MESSAGE_ID
16 /$LISTNAME/$MESSAGE_ID/raw                -> raw mbox
17 /$LISTNAME/$MESSAGE_ID/f/                 -> HTML content (full quotes)
18
19 ### Legacy endpoints (may be ambiguous given Message-IDs with similar suffies)
20 /$LISTNAME/m/$MESSAGE_ID/                 -> 301 to /$LISTNAME/$MESSAGE_ID/
21 /$LISTNAME/m/$MESSAGE_ID.html             -> 301 to /$LISTNAME/$MESSAGE_ID/
22 /$LISTNAME/m/$MESSAGE_ID.txt              -> 301 to /$LISTNAME/$MESSAGE_ID/raw
23 /$LISTNAME/f/$MESSAGE_ID.html             -> 301 to /$LISTNAME/$MESSAGE_ID/f/
24 /$LISTNAME/f/$MESSAGE_ID.txt [1]          -> 301 to /$LISTNAME/$MESSAGE_ID/raw
25
26 /$LISTNAME/atom.xml [2]                   -> identical to /$LISTNAME/new.atom
27
28 FIXME: we must refactor/cleanup/add tests for most of our CGI before
29 adding more endpoints and features.
30
31 [1] These URLs were never linked, but only exist as a convenience to folks
32     who edit existing URLs
33
34 [2] Do not make this into a 301 since feed readers may not follow them as well
35     as normal browsers do.
36
37 Encoding notes
38 --------------
39
40 Raw HTML and XML should only contain us-ascii characters which render
41 to UTF-8.
42
43 Plain text (raw message) endpoints display in the original encoding(s)
44 of the original email.
45
46 Guidelines for using limited HTML
47 ---------------------------------
48 We mainly use HTML for linking pages together with <a>.
49 We also set <title> to make window management easier.
50
51 We favor <pre>-formatted text since public-inbox is intended as a place
52 to share and discuss patches and code.  Unfortunately, long paragraphs
53 tends to be less readable with fixed-width serif fonts which GUI
54 browsers default to.  So perhaps we will add different endpoints for
55 variable-width fonts.
56
57 * No graphics, images, or icons at all.  We tolerate, but do not
58   encourage the use of GUIs.
59
60 * No setting colors or font sizes, power to users to decide those.
61
62 * Only one font type (fixed or variable) per page.  This is for
63   accessibility, we must not blow certain elements out-of-proportion
64   when a reader increases font size.
65
66 * Bold and underline elements are OK since they should render fine
67   regardless of chosen font and gracefully degrade if a display does
68   not support them.  Italics and strike-through elements must be
69   avoided as they do not render well with some displays or user-chosen
70   fonts.
71
72 * No JavaScript. JS is historically too buggy and insecure, and we will
73   never expect our readers to do either of the following:
74   a) read and audit all our code for on every single page load
75   b) trust us and and run code without reading it
76
77 * We only use CSS for one reason: wrapping pre-formatted text
78   This is necessary because unfortunate GUI browsers tend to be
79   prone to layout widening.  w3m is fine here without CSS :)
80   No other CSS is allowed, especially with scary things like:
81
82         http://thejh.net/misc/website-terminal-copy-paste