]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/contributor/website-work.itexi
Merge branch 'lilypond/translation' of ssh://git.sv.gnu.org/srv/git/lilypond
[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/src/lilypond
66 git fetch origin
67 git merge origin/master
68 @end verbatim
69
70 Check for any updates to trusted scripts:
71
72 @verbatim
73 ### check-git.sh
74 #!/bin/sh
75 GIT=$HOME/src/lilypond
76 DEST=$HOME/lilypond/trusted-scripts
77 diff -u $GIT/website.make $DEST/website.make
78 diff -u $GIT/Documentation/lilypond-texi2html.init $DEST/lilypond-texi2html.init
79 diff -u $GIT/scripts/build/extract_texi_filenames.py $DEST/extract_texi_filenames.py
80 diff -u $GIT/scripts/build/create-version-itexi.py $DEST/create-version-itexi.py
81 diff -u $GIT/scripts/build/create-weblinks-itexi.py $DEST/create-weblinks-itexi.py
82 @end verbatim
83
84 If the changes look ok, make them trusted:
85
86 @verbatim
87 ### copy-from-git.sh
88 #!/bin/sh
89 GIT=$HOME/src/lilypond
90 DEST=$HOME/lilypond/trusted-scripts
91 cp $GIT/website.make $DEST/website.make
92 cp $GIT/Documentation/lilypond-texi2html.init $DEST/lilypond-texi2html.init
93 cp $GIT/scripts/build/extract_texi_filenames.py $DEST/extract_texi_filenames.py
94 cp $GIT/scripts/build/create-version-itexi.py $DEST/create-version-itexi.py
95 cp $GIT/scripts/build/create-weblinks-itexi.py $DEST/create-weblinks-itexi.py
96 @end verbatim
97
98 Build the website:
99
100 @verbatim
101 ### make-website.sh
102 #!/bin/sh
103 DEST=$HOME/public_html/
104 cd $HOME/src/build-website
105 cp $HOME/lilypond/trusted-scripts/website.make .
106
107 make -f website.make WEBSITE_ONLY_BUILD=1 website
108 rsync -ra $HOME/src/build-website/out-website/website/ $DEST/website/
109 cp $HOME/src/build-website/out-website/pictures $DEST
110 @end verbatim
111
112 Cronjob to automate the trusted portions:
113
114 @verbatim
115 # website-rebuild.cron
116 11 * * * * $HOME/lilypond/trusted-scripts/update-git.sh >/dev/null 2>&1
117 22 * * * * $HOME/lilypond/trusted-scripts/make-website.sh >/dev/null 2>&1
118 @end verbatim
119
120
121 To reduce the CPU burden on the shared host (as well as some
122 security concerns), the @file{Documentation/pictures/} and
123 @file{Documentation/web/ly-examples/} directories are @strong{not}
124 compiled.  If you modify any files in those directories, a user in
125 the @code{lilypond} group must upload them to @file{~graham/media}
126 on the host.
127
128 Upload latest pictures/ and ly-examples/ (local script):
129
130 @verbatim
131 ### upload-lily-web-media.sh
132 #!/bin/sh
133 BUILD_DIR=$HOME/src/build-lilypond
134
135 PICS=$BUILD_DIR/Documentation/pictures/out-www/
136 EXAMPLES=$BUILD_DIR/Documentation/web/ly-examples/out-www/
137
138 cd $BUILD_DIR
139 rsync -a $PICS graham@lilypond.org:media/pictures
140 rsync -a $EXAMPLES graham@lilypond.org:ly-examples
141 @end verbatim
142
143
144 @node Translating the website
145 @section Translating the website
146
147 As it has much more audience, the website should be translated before
148 the documentation; see @ref{Translating the documentation}.