]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/contributor/website-work.itexi
f0225c3f5b313cac8b8cdb224f36aca8a4042f0b
[lilypond.git] / Documentation / contributor / website-work.itexi
1 @c -*- coding: utf-8; mode: texinfo; -*-
2 @node Website work
3 @chapter Website work
4
5 @menu
6 * Introduction to website work::  
7 * Uploading and security::
8 * Translating the website::
9 @end menu
10
11
12 @node Introduction to website work
13 @section Introduction to website work
14
15 The website is @emph{not} written directly in HTML;
16 instead, the source is Texinfo, which is then generated into HTML,
17 PDF, and Info formats.  The sources are
18
19 @verbatim
20 Documentation/web.texi
21 Documentation/web/*.texi
22 @end verbatim
23
24 Unless otherwise specified, follow the instructions and policies
25 given in @ref{Documentation work}.  That chapter also contains a
26 quick introduction to Texinfo; consulting an external Texinfo
27 manual should be not necessary.
28
29 @subheading Exceptions to the documentation policies
30
31 @itemize
32
33 @item
34 Sectioning: the website only uses chapters and sections; no
35 subsections or subsubsections.
36
37 @item
38 @@ref@{@}s to other manuals (@@ruser, @@rlearning, etc): you can't
39 link to any pieces of automatically generated documentation, like
40 the IR or certain NR appendices.
41
42 @dots{}
43
44 @item
45 For anything not listed here, just follow the same style as the
46 existing texinfo files.
47
48 @end itemize
49
50
51 @node Uploading and security
52 @section Uploading and security
53
54 The website is generated hourly by user @code{graham} the host
55 @code{lilypond.org}.  For security reasons, we do not use the
56 makefiles and scripts directly from git; copies of the relevant
57 scripts are examined and copied to
58 @code{~graham/lilypond/trusted-scripts/}
59
60 Get latest source code:
61
62 @verbatim
63 ### update-git.sh
64 #!/bin/sh
65 cd $HOME/lilypond/lilypond-git
66 git fetch origin
67 git merge origin/master
68 @end verbatim
69
70 Check for any updates to trusted scripts / files:
71
72 @verbatim
73 ### check-git.sh
74 #!/bin/sh
75 GIT=$HOME/lilypond/lilypond-git
76 DEST=$HOME/lilypond/trusted-scripts
77 diff -u $DEST/website.make $GIT/make/website.make
78 diff -u $DEST/lilypond-texi2html.init $GIT/Documentation/lilypond-texi2html.init
79 diff -u $DEST/extract_texi_filenames.py $GIT/scripts/build/extract_texi_filenames.py
80 diff -u $DEST/create-version-itexi.py $GIT/scripts/build/create-version-itexi.py
81 diff -u $DEST/create-weblinks-itexi.py $GIT/scripts/build/create-weblinks-itexi.py
82 diff -u $DEST/mass-link.py $GIT/scripts/build/mass-link.py
83 diff -u $DEST/website_post.py $GIT/scripts/build/website_post.py
84 diff -u $DEST/lilypond.org.htaccess $GIT/Documentation/web/server/lilypond.org.htaccess
85 diff -u $DEST/website-dir.htaccess $GIT/Documentation/web/server/website-dir.htaccess
86 @end verbatim
87
88 If the changes look ok, make them trusted:
89
90 @verbatim
91 ### copy-from-git.sh
92 #!/bin/sh
93 GIT=$HOME/lilypond/lilypond-git
94 DEST=$HOME/lilypond/trusted-scripts
95 cp $GIT/make/website.make $DEST/website.make
96 cp $GIT/Documentation/lilypond-texi2html.init $DEST/lilypond-texi2html.init
97 cp $GIT/scripts/build/extract_texi_filenames.py $DEST/extract_texi_filenames.py
98 cp $GIT/scripts/build/create-version-itexi.py $DEST/create-version-itexi.py
99 cp $GIT/scripts/build/create-weblinks-itexi.py $DEST/create-weblinks-itexi.py
100 cp $GIT/scripts/build/mass-link.py $DEST/mass-link.py
101 cp $GIT/scripts/build/website_post.py $DEST/website_post.py
102 cp $GIT/Documentation/web/server/lilypond.org.htaccess $DEST/lilypond.org.htaccess
103 cp $GIT/Documentation/web/server/website-dir.htaccess $DEST/website-dir.htaccess
104 @end verbatim
105
106 Build the website:
107
108 @verbatim
109 ### make-website.sh
110 #!/bin/sh
111 DEST=$HOME/web/
112 BUILD=$HOME/lilypond/build-website
113 mkdir -p $BUILD
114 cd $BUILD
115 cp $HOME/lilypond/trusted-scripts/website.make .
116
117 make -f website.make WEBSITE_ONLY_BUILD=1 website
118 rsync -raO $BUILD/out-website/website/ $DEST/website/
119 cp $BUILD/out-website/pictures $DEST
120 cp $BUILD/out-website/.htaccess $DEST
121 @end verbatim
122
123 Cronjob to automate the trusted portions:
124
125 @verbatim
126 # website-rebuild.cron
127 11 * * * * $HOME/lilypond/trusted-scripts/update-git.sh >/dev/null 2>&1
128 22 * * * * $HOME/lilypond/trusted-scripts/make-website.sh >/dev/null 2>&1
129 @end verbatim
130
131
132 To reduce the CPU burden on the shared host (as well as some
133 security concerns), the @file{Documentation/pictures/} and
134 @file{Documentation/web/ly-examples/} directories are @strong{not}
135 compiled.  If you modify any files in those directories, a user in
136 the @code{lilypond} group must upload them to @file{~graham/media}
137 on the host.
138
139 Upload latest pictures/ and ly-examples/ (local script):
140
141 @verbatim
142 ### upload-lily-web-media.sh
143 #!/bin/sh
144 BUILD_DIR=$HOME/src/build-lilypond
145
146 PICS=$BUILD_DIR/Documentation/pictures/out-www/
147 EXAMPLES=$BUILD_DIR/Documentation/web/ly-examples/out-www/
148
149 cd $BUILD_DIR
150 rsync -a $PICS graham@lilypond.org:media/pictures
151 rsync -a $EXAMPLES graham@lilypond.org:ly-examples
152 @end verbatim
153
154
155 @subsubheading Additional information
156
157 Some information about the website is stored in
158 @file{~graham/lilypond/*.txt}; this information should not be
159 shared with people without trusted access to the server.
160
161 If you have created any files in @file{~graham/lilypond/} then
162 please run:
163
164 @example
165 chgrp lilypond ~graham/lilypond/ -R
166 chmod 775 ~graham/lilypond/ -R
167 @end example
168
169 You should symlink your own @file{~/lilypond/} to
170 @file{~graham/lilypond/}
171
172
173 @node Translating the website
174 @section Translating the website
175
176 As it has much more audience, the website should be translated before
177 the documentation; see @ref{Translating the documentation}.
178
179 In addition to the normal documentation translation practices,
180 there are a few additional things to note:
181
182 @itemize
183
184 @item
185 Build the website with:
186
187 @example
188 make website
189 @end example
190
191 @noindent
192 however, please note that this command is not designed for being
193 run multiple times.  If you see unexpected output (mainly the page
194 footers getting all messed up), then delete your
195 @file{out-website} directory and run @code{make website} again.
196
197 @item
198 Some of the translation infrastructure is defined in python files;
199 you must look at the @code{### translation data} sections in:
200
201 @example
202 scripts/build/create-weblinks-itexi.py
203 scripts/build/website_post.py
204 @end example
205
206 @item
207 Translations are not included by default in @code{make website}.
208 To test your translation, edit the @code{WEB_LANGS} line in
209 @file{make/website.make}.  Do not submit a patch to add your language
210 to this file unless @code{make website} completes with less than 5
211 warnings.
212
213 @item
214 Links to manuals are done with macros like
215 @code{@@manualDevelLearningSplit}.  To get translated links, you
216 must change that to @code{@@manualDevelLearningSplit-es} (for
217 es/Spanish translations, for example).
218
219 @end itemize
220
221
222