hgbook
changeset 859:84629ae2c99d
Adjust build system and web site structure.
author | gpiancastelli |
---|---|
date | Sun Aug 23 00:51:45 2009 +0200 (2009-08-23) |
parents | c3b12b14daf0 |
children | 600e7ab15c67 |
files | it/Makefile it/web/index-template.html stylesheets/it/web.xsl |
line diff
1.1 --- a/it/Makefile Sun Aug 23 00:37:30 2009 +0200 1.2 +++ b/it/Makefile Sun Aug 23 00:51:45 2009 +0200 1.3 @@ -1,9 +1,10 @@ 1.4 include Makefile.vars 1.5 1.6 -# Makefile.vars include the following system-dependent variables: 1.7 +# Makefile.vars includes the following system-dependent variables: 1.8 # 1.9 # dtd-url = the location of the DocBook 4.5 DTD on your filesystem 1.10 # system-xsl-dir = the location of DocBook XSLT on your filesystem 1.11 +# dynamic-link-command = the command to link the DocBook XSLT to our styles 1.12 # python = the location of Python 3.x on your filesystem 1.13 1.14 xml-src-files := \ 1.15 @@ -14,50 +15,51 @@ 1.16 1.17 xsltproc-opts := --nonet --xinclude 1.18 xmllint-opts := --noout --nonet --valid --path '$(dtd-url)' 1.19 - 1.20 -obj-web := html 1.21 + 1.22 +root-web := html 1.23 +support-web := $(root-web)/support 1.24 +obj-web := $(root-web)/read 1.25 figs-web-folder := $(obj-web)/figs 1.26 script-web := $(obj-web)/javascript 1.27 web-global := ../web 1.28 web-local := web 1.29 1.30 -html: $(obj-web)/index.html $(web-local)/index-read.html.in 1.31 +html: $(obj-web)/index.html $(web-local)/index-read.html.in figs 1.32 1.33 -#$(obj-web)/index.html: ../stylesheets/system-xsl .validated-00book.xml #../web/index-read.html.in 1.34 -$(obj-web)/index.html: .validated-00book.xml 1.35 +$(obj-web)/index.html: ../stylesheets/system-xsl .validated-00book.xml 1.36 xsltproc $(xsltproc-opts) -o $(obj-web)/x ../stylesheets/it/web.xsl 00book.xml 1.37 -# xsltproc $(xsltproc-opts) -o $(obj-web)/x ../stylesheets/chunk-stylesheet.xsl 00book.xml 1.38 - cp $(web-global)/styles.css $(obj-web) 1.39 + mkdir -p $(support-web) 1.40 + cp -f $(web-global)/icons/*.png $(support-web) 1.41 + cp $(web-global)/styles.css $(support-web) 1.42 + sed -i -e "s|figs/||g" $(support-web)/styles.css 1.43 mkdir -p $(figs-web-folder) 1.44 - cp -f $(web-global)/icons/*.png $(figs-web-folder) 1.45 - cp -f examples/figs/*.png $(figs-web-folder) 1.46 mkdir -p $(script-web) 1.47 cp -f $(web-local)/*.js $(script-web) 1.48 - sed -i -e "s|/support/||g" $(obj-web)/*.html 1.49 -# python ../web/texpand.py ../web/index-read.html.in html/read/index.html 1.50 -# for i in $(obj-web-read)/*.html; do \ 1.51 -# gzip -9 -c $$i > $$i.gz; \ 1.52 -# done 1.53 1.54 -#../stylesheets/system-xsl: $(system-xsl-dir) 1.55 -# ln -s $< $@ 1.56 +../stylesheets/system-xsl: $(system-xsl-dir) 1.57 + $(dynamic-link-command) 1.58 1.59 $(web-local)/index-read.html.in: $(web-local)/genindex.py $(xml-src-files) 1.60 cp $(web-local)/index-template.html $(obj-web)/index.html 1.61 - sed -i -e "s|{% block bodycontent %}{% endblock %}|$(shell cat $(web-local)/index-read.html.in)|g" ${obj-web}/index.html 1.62 + sed -i -e "s|{% block bodycontent %}{% endblock %}|$(shell cat $(web-local)/index-read.html.in)|g" $(obj-web)/index.html 1.63 + sed -i -e "s|/support/|../support/|g" $(obj-web)/*.html 1.64 + cp $(web-local)/index-template.html $(root-web)/index.html 1.65 + sed -i "s|{% block bodycontent %}{% endblock %}|$(shell cat $(web-local)/index-home.html.in)|g" $(root-web)/index.html 1.66 + sed -i -e "s|/support/|support/|g" $(root-web)/index.html 1.67 1.68 $(web-local)/genindex.py: $(xml-src-files) 1.69 cd $(web-local) && $(python) genindex.py 1.70 1.71 valid: .validated-00book.xml 1.72 1.73 -.validated-00book.xml: $(xml-src-files) #examples/.run 1.74 +.validated-00book.xml: $(xml-src-files) 1.75 xmllint $(xmllint-opts) $< 1.76 touch $@ 1.77 1.78 clean: 1.79 rm -f $(web-local)/index-read.html.in 1.80 - rm -rf $(obj-web) 1.81 + rm -f .validated-00book.xml 1.82 + rm -rf $(root-web) 1.83 1.84 image-folder := figs 1.85 # graphs, figures, screenshots 1.86 @@ -69,24 +71,22 @@ 1.87 # screenshots 1.88 image-png := $(filter %.png, $(image-files)) 1.89 1.90 -# this must already exists 1.91 -figs-folder := examples/figs 1.92 figs-web := \ 1.93 - $(image-dot:$(image-folder)/%.dot=$(figs-folder)/%.png) \ 1.94 - $(image-svg:$(image-folder)/%.svg=$(figs-folder)/%.png) \ 1.95 - $(image-png:$(image-folder)/%.png=$(figs-folder)/%.png) 1.96 + $(image-dot:$(image-folder)/%.dot=$(figs-web-folder)/%.png) \ 1.97 + $(image-svg:$(image-folder)/%.svg=$(figs-web-folder)/%.png) \ 1.98 + $(image-png:$(image-folder)/%.png=$(figs-web-folder)/%.png) 1.99 1.100 figs: $(figs-web) 1.101 1.102 -$(figs-folder)/%.png: $(image-folder)/%.svg 1.103 +$(figs-web-folder)/%.png: $(image-folder)/%.svg 1.104 inkscape -D -d 120 -e $@ $< 1.105 1.106 -$(figs-folder)/%.png: $(figs-folder)/%.svg 1.107 +$(figs-web-folder)/%.png: $(figs-web-folder)/%.svg 1.108 inkscape -D -e $@ $< 1.109 rm $< 1.110 1.111 -$(figs-folder)/%.png: $(image-folder)/%.png 1.112 +$(figs-web-folder)/%.png: $(image-folder)/%.png 1.113 cp $< $@ 1.114 1.115 -$(figs-folder)/%.svg: $(image-folder)/%.dot 1.116 +$(figs-web-folder)/%.svg: $(image-folder)/%.dot 1.117 dot -Tsvg -o $@ $<
2.1 --- a/it/web/index-template.html Sun Aug 23 00:37:30 2009 +0200 2.2 +++ b/it/web/index-template.html Sun Aug 23 00:51:45 2009 +0200 2.3 @@ -3,12 +3,12 @@ 2.4 <head> 2.5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 2.6 <title>Mercurial: la guida definitiva</title> 2.7 - <link rel="stylesheet" href="styles.css" type="text/css"/> 2.8 + <link rel="stylesheet" href="/support/styles.css" type="text/css"/> 2.9 <!-- 2.10 <link rel="alternate" type="application/atom+xml" title="Comments" 2.11 href="/feeds/comments/"/> 2.12 --> 2.13 - <link rel="shortcut icon" type="image/png" href="figs/favicon.png"/> 2.14 + <link rel="shortcut icon" type="image/png" href="/support/favicon.png"/> 2.15 <!-- No comment system for italian translation 2.16 <script type="text/javascript" src="/support/jquery.js"></script> 2.17 <script type="text/javascript" src="/support/form.js"></script> 2.18 @@ -19,7 +19,7 @@ 2.19 <body> 2.20 {% block bodycontent %}{% endblock %} 2.21 2.22 - <div class="hgbookfooter"> <p><img src="figs/rss.png"> Volete rimanere aggiornati? Abbonatevi al feed del <a class="feed" href="http://bitbucket.org/gpiancastelli/hgbook-it/atom">libro italiano</a>.</p> <p>Copyright 2006, 2007, 2008, 2009 Bryan O’Sullivan. Icone realizzate da <a href="mailto:mattahan@gmail.com">Paul Davey</a> alias <a href="http://mattahan.deviantart.com/">Mattahan</a>.</p> <p>Copyright 2009 <a href="mailto:giulio.piancastelli@gmail.com">Giulio Piancastelli</a> per la traduzione italiana.</p> 2.23 + <div class="hgbookfooter"> <p><img src="/support/rss.png"> Volete rimanere aggiornati? Abbonatevi al feed del <a class="feed" href="http://bitbucket.org/gpiancastelli/hgbook-it/atom">libro italiano</a>.</p> <p>Copyright 2006, 2007, 2008, 2009 Bryan O’Sullivan. Icone realizzate da <a href="mailto:mattahan@gmail.com">Paul Davey</a> alias <a href="http://mattahan.deviantart.com/">Mattahan</a>.</p> <p>Copyright 2009 <a href="mailto:giulio.piancastelli@gmail.com">Giulio Piancastelli</a> per la traduzione italiana.</p> 2.24 </div> 2.25 2.26 <!-- Also, no need for Google Analytics on the italian translation
3.1 --- a/stylesheets/it/web.xsl Sun Aug 23 00:37:30 2009 +0200 3.2 +++ b/stylesheets/it/web.xsl Sun Aug 23 00:51:45 2009 +0200 3.3 @@ -4,15 +4,14 @@ 3.4 <xsl:import href="../chunk-stylesheet.xsl"/> 3.5 3.6 <xsl:param name="l10n.gentext.language" select="'it'"/> 3.7 - 3.8 - <xsl:param name="html.stylesheet">styles.css</xsl:param> 3.9 + <xsl:param name="admon.graphics.path">/support/</xsl:param> 3.10 3.11 <xsl:template name="user.head.content"> 3.12 <!-- 3.13 <link rel="alternate" type="application/atom+xml" title="Comments" 3.14 href="/feeds/comments/"/> 3.15 --> 3.16 - <link rel="shortcut icon" type="image/png" href="figs/favicon.png"/> 3.17 + <link rel="shortcut icon" type="image/png" href="/support/favicon.png"/> 3.18 <script type="text/javascript" src="javascript/jquery-min.js"></script> 3.19 <script type="text/javascript" src="javascript/hgbook.js"></script> 3.20 </xsl:template> 3.21 @@ -25,7 +24,7 @@ 3.22 3.23 <xsl:template name="user.footer.content"> 3.24 <div class="hgfooter"> 3.25 - <p><img src="figs/rss.png"/> Volete rimanere aggiornati? Abbonatevi al feed delle modifiche per il <a class="feed" href="http://bitbucket.org/gpiancastelli/hgbook-it/atom">libro italiano</a>.</p> 3.26 + <p><img src="/support/rss.png"/> Volete rimanere aggiornati? Abbonatevi al feed delle modifiche per il <a class="feed" href="http://bitbucket.org/gpiancastelli/hgbook-it/atom">libro italiano</a>.</p> 3.27 <p>Copyright 2006, 2007, 2008, 2009 Bryan O’Sullivan. 3.28 Icone realizzate da <a href="mailto:mattahan@gmail.com">Paul Davey</a> alias <a href="http://mattahan.deviantart.com/">Mattahan</a>.</p> 3.29 <p>Copyright 2009 <a href="mailto:giulio.piancastelli@gmail.com">Giulio Piancastelli</a> per la traduzione italiana.</p>