a brief introduction to our use of wml, for the folks considering revamping our website image
Roger Dingledine

Roger Dingledine commited on 2009-09-16 10:03:29
Zeige 1 geänderte Dateien mit 51 Einfügungen und 0 Löschungen.

... ...
@@ -0,0 +1,51 @@
1
+Here's a brief overview of how our wml set-up works.
2
+----------------------------------------------------
3
+
4
+Here's a typical wml file:
5
+https://svn.torproject.org/svn/website/trunk/en/bridges.wml
6
+
7
+The top of the file has:
8
+
9
+  ## translation metadata
10
+  # Revision: $Revision$
11
+  # Translation-Priority: 1-high
12
+
13
+  #include "head.wmi" TITLE="Tor: Bridges" CHARSET="UTF-8"
14
+
15
+  <div class="main-column">
16
+
17
+and the bottom of the file has:
18
+
19
+    </div><!-- #main -->
20
+
21
+  #include <foot.wmi>
22
+
23
+and the middle is standard html, plus a few extra tags like
24
+<page> that we've added to automatically link to the translated
25
+pages when they exist. So that wml page produces this html page:
26
+https://www.torproject.org/bridges aka
27
+https://www.torproject.org/bridges.html.en
28
+
29
+Then head.wmi and foot.wmi are just other mostly-html files you import
30
+to handle the repeat parts of each page (well, that plus some embedded
31
+perl scripts to generate some of the static content).
32
+https://svn.torproject.org/svn/website/trunk/include/head.wmi
33
+https://svn.torproject.org/svn/website/trunk/en/foot.wmi
34
+
35
+You can basically ignore the wml part of them, and to a first
36
+approximation just think of them as more html.
37
+
38
+So in summary, wml is like html with a bit more markup.
39
+
40
+----------------------------------------------------
41
+
42
+Where it gets interesting is the download page:
43
+https://svn.torproject.org/svn/website/trunk/en/easy-download.wml
44
+
45
+It has the standard header and footer section, but in the body of the page
46
+it includes links like <a href="<package-osx-bundle-stable>". Rather than
47
+putting URLs and Tor versions into every wml page, and then requiring
48
+the translators to update their page whenever we bump a version number,
49
+we instead define each URL and version as a new wml element:
50
+https://svn.torproject.org/svn/website/trunk/include/versions.wmi
51
+
0 52