aboutsummaryrefslogtreecommitdiffstats
path: root/greek/devel/website/using_wml.wml
blob: 469285f4338a5ed55e685aaef71d53ede0e93b9b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#use wml::debian::template title="Using WML"
#use wml::debian::translation-check translation="24a8bbc5bf2fd2fbe025f0baa536bf1126f83723" maintainer="galaxico"

<p>WML stands for web site meta language. This means that WML takes input
.wml files, processes whatever is inside them (it can be anything from basic
HTML to Perl code!), and outputs whatever you want it to output, for example
.html or .php.</p>

<p>The documentation for WML is not easy to learn from. It is actually quite
complete, but until you begin to understand how it works (and it is quite
powerful) it is easiest to learn from examples. You may find template files
used for the Debian site useful. They can be found in
<code><a href="https://salsa.debian.org/webmaster-team/webwml/tree/master/english/template/debian">\
webwml/english/template/debian/</a></code>.</p>

<p>This assumes that you have WML installed on your machine.
WML is available as a
<a href="https://packages.debian.org/wml">Debian package</a>.


<h2>Editing WML sources</h2>

<p>One thing all .wml files will have is one or more opening <code>#use</code>
lines. You must not change or translate their syntax, only the quoted
strings such as those after <code>title=</code>, which would change the
&lt;title&gt; element in the output files.</p>

<p>Other than the header lines, most of our .wml pages contain simple HTML.
If you encounter tags such as &lt;define-tag&gt; or &lt;: ... :&gt;, be
careful, because those delimit code that's processed by one of WML's special
passes. See below for more information.</p>


<h2>Building Debian web pages</h2>

<p>Simply type <kbd>make</kbd> in webwml/&lt;lang&gt;. We have set up
makefiles that call <kbd>wml</kbd> with all the right arguments.</p>

<p>If you do a <kbd>make install</kbd> then the HTML files will be built and
placed in the directory <kbd>../../www/</kbd>.</p>


<h2>Extra WML features we use</h2>

<p>One of the features of WML that we make extensive use of is the use of Perl.
Remember, these are not dynamic pages. Perl is used at the time the HTML
pages are generated to do, well, whatever you like. Two good examples of how
we are using Perl in the pages is to create the list of most recent news items for
the main page and to generate the links to translations at the end of the page.

# TODO: add the basic stuff from webwml/english/po/README here

<p>To rebuild the templates of our web site, wml version &gt;= 2.0.6 is
needed. To rebuild the gettext templates for non-English translations,
mp4h &gt;= 1.3.0 is necessary.</p>


<h2>Specific issues with WML</h2>

<p>Multi-byte languages may need special pre- or post-processing of the .wml
files in order to handle the character set properly. This can be done by
changing the variables <kbd>WMLPROLOG</kbd> and <kbd>WMLEPILOG</kbd> in
<kbd>webwml/&lt;lang&gt;/Make.lang</kbd> appropriately. Depending on how
your <kbd>WMLEPILOG</kbd> program works, you may need to change the value of
<kbd>WMLOUTFILE</kbd>.
<br>
See the Japanese or Chinese translations for an example.
</p>

© 2014-2024 Faster IT GmbH | imprint | privacy policy