]> Sergey Matveev's repositories - public-inbox.git/blob - Documentation/design_www.txt
implement per-thread Atom feeds
[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 #### Optional, relies on Search::Xapian
9 /$LISTNAME/t/$MESSAGE_ID/                       -> HTML content of thread
10 /$LISTNAME/t/$MESSAGE_ID/atom                   -> Atom feed for thread
11 /$LISTNAME/t/$MESSAGE_ID/mbox.gz                -> gzipped mbox of thread
12
13 ### Stable endpoints
14 /$LISTNAME/m/$MESSAGE_ID/                       -> HTML content (short quotes)
15 /$LISTNAME/m/$MESSAGE_ID                        -> 301 to above
16 /$LISTNAME/m/$MESSAGE_ID/raw                    -> raw mbox
17 /$LISTNAME/f/$MESSAGE_ID/                       -> HTML content (full quotes)
18 /$LISTNAME/f/$MESSAGE_ID                        -> 301 to above
19 /$LISTNAME/f/$MESSAGE_ID/raw (*)                -> 301 to ../m/$MESSAGE_ID/raw
20
21 ### Legacy endpoints (may be ambiguous given Message-IDs with similar suffies)
22 /$LISTNAME/m/$MESSAGE_ID.html                   -> 301 to $MESSAGE_ID/
23 /$LISTNAME/m/$MESSAGE_ID.txt                    -> 301 to $MESSAGE_ID/raw
24 /$LISTNAME/f/$MESSAGE_ID.html                   -> 301 to $MESSAGE_ID/
25 /$LISTNAME/f/$MESSAGE_ID.txt (*)                -> 301 to ../m/$MESSAGE_ID/raw
26
27
28 FIXME: we must refactor/cleanup/add tests for most of our CGI before
29 adding more endpoints and features.
30
31 (*) These URLs were never linked, but only exist as a convenience to folks
32     who edit existing URLs
33
34 Encoding notes
35 --------------
36
37 Raw HTML and XML should only contain us-ascii characters which render
38 to UTF-8.
39
40 Plain text (raw message) endpoints display in the original encoding(s)
41 of the original email.
42
43 Guidelines for using limited HTML
44 ---------------------------------
45 We mainly use HTML for linking pages together with <a>.
46 We also set <title> to make window management easier.
47
48 We favor <pre>-formatted text since public-inbox is intended as a place
49 to share and discuss patches and code.  Unfortunately, long paragraphs
50 tends to be less readable with fixed-width serif fonts which GUI
51 browsers default to.  So perhaps we will add different endpoints for
52 variable-width fonts.
53
54 * No graphics, images, or icons at all.  We tolerate, but do not
55   encourage the use of GUIs.
56
57 * No setting colors or font sizes, power to users to decide those.
58
59 * No JavaScript. JS is historically too buggy and insecure, and we will
60   never expect our readers to do either of the following:
61   a) read and audit all our code for on every single page load
62   b) trust us and and run code without reading it
63
64 * We only use CSS for one reason: wrapping pre-formatted text
65   This is necessary because unfortunate GUI browsers tend to be
66   prone to layout widening.  w3m is fine here without CSS :)
67   No other CSS is allowed, especially with scary things like:
68
69         http://thejh.net/misc/website-terminal-copy-paste