hgbook

changeset 666:d8c85d831fb4

Merge with http://hg.serpentine.com/mercurial/book
author Dongsheng Song <songdongsheng@live.cn>
date Tue Mar 31 21:17:59 2009 +0800 (2009-03-31)
parents 53f179393f5c 88b611f37646
children 3b33dd6aba87
files README README.BUILD stylesheets/base-html-stylesheet.xsl
line diff
     1.1 --- a/README	Tue Mar 31 14:54:24 2009 +0800
     1.2 +++ b/README	Tue Mar 31 21:17:59 2009 +0800
     1.3 @@ -1,99 +1,16 @@
     1.4 -HOW-TO:  Compiling the Mercurial Book
     1.5 -======================================
     1.6 +Mercurial: The Definitive Guide
     1.7 +-------------------------------
     1.8  
     1.9 -This Mercurial Book is written in DocBook 4.5.
    1.10 +Welcome to the source code for the book.  You can clone the definitive
    1.11 +copy of the source tree using Mercurial as follows:
    1.12  
    1.13 -The goal of this document is to give simple instructions to anyone who
    1.14 -wants to compile this book into a useful format, like HTML or PDF.  It
    1.15 -should state *exactly* which tools to use, and how to invoke them, in
    1.16 -simplest terms.
    1.17 +  hg clone http://hg.serpentine.com/mercurial/book
    1.18  
    1.19 -Table of Contents:
    1.20 +Here's a top-level tour of interesting directories:
    1.21  
    1.22 -  I. PRIMER
    1.23 - II. COMPILING THE DOCS
    1.24 -III. HACKING ON THE DOCS
    1.25 -
    1.26 -I. PRIMER
    1.27 -
    1.28 -  DocBook has a tortured, confusing history.  Before you do anything,
    1.29 -  take a look at Eric Raymond's excellent "DocBook Demystification HOWTO":
    1.30 -
    1.31 -      http://tldp.org/HOWTO/DocBook-Demystification-HOWTO/
    1.32 -
    1.33 -  It's very short and clears up many things.
    1.34 -
    1.35 -
    1.36 -II. COMPILING THE DOCS
    1.37 -
    1.38 -
    1.39 -1. Install XML DTD and XSL stylesheets for DocBook
    1.40 -
    1.41 -      % sudo apt-get install docbook-xml docbook-xsl
    1.42 -
    1.43 -2. Install libxml2-utils
    1.44 -
    1.45 -      % sudo apt-get install libxml2-utils
    1.46 -
    1.47 -3. Install graph drawing tools
    1.48 -
    1.49 -      % sudo apt-get install graphviz inkscape
    1.50 -
    1.51 -4. Install pdf support
    1.52 -
    1.53 -      % sudo apt-get install openjdk-6-jdk docbook-xsl-saxon libsaxon-java fop
    1.54 -
    1.55 -  The Makefile will actually invoke tools/fop/fop.sh, you should do
    1.56 -  some trick, let fop's CLASSPATH include saxon.jar and docbook-xsl-saxon.jar .
    1.57 -
    1.58 -5. Make
    1.59 -  Run 'make' for more details, for example:
    1.60 -
    1.61 -  * make all document(pdf, html and html-single for all languages)
    1.62 -      % make all
    1.63 -
    1.64 -  * make english document(pdf, html and html-single for all languages)
    1.65 -      % make LINGUA=en all
    1.66 -
    1.67 -  * make Chinese document(pdf, html and html-single for all languages)
    1.68 -      % make LINGUA=zh all
    1.69 -
    1.70 -  * make Chinese pdf document
    1.71 -      % make LINGUA=zh pdf
    1.72 -
    1.73 -III. HACKING ON THE DOCS
    1.74 -
    1.75 -In addition to everything in section II:
    1.76 -
    1.77 -
    1.78 -1. Get a nice editing environment for SGML/XML.
    1.79 -
    1.80 -  This isn't strictly required, but it's nice when your editor
    1.81 -  colorizes things, understands the DTD, tells you what tags you can
    1.82 -  insert, etc.
    1.83 -
    1.84 -  If you use emacs, we recommend the PSGML major-mode.  Most free
    1.85 -  operating systems package it, or its home page is here:
    1.86 -
    1.87 -      http://www.lysator.liu.se/projects/about_psgml.html
    1.88 -
    1.89 -  If you use vim, you might check out xmledit, at:
    1.90 -
    1.91 -      http://www.vim.org/scripts/script.php?script_id=301
    1.92 -
    1.93 -
    1.94 -2. Get a validating parser.
    1.95 -
    1.96 -  Actually, if you have what you need to compile the documentation,
    1.97 -  then you almost certainly have an XML validator installed already -
    1.98 -  it is called xmllint, and comes as part of libxml2.
    1.99 -
   1.100 -  The makefile is preconfigured with a suitable invocation of it,
   1.101 -  so simply run:
   1.102 -
   1.103 -      $ make validate
   1.104 -
   1.105 -3. Read about DocBook.
   1.106 -
   1.107 -  You'll want to get real intimate with a DocBook reference, such as
   1.108 -  can be found at:  http://www.docbook.org/tdg/en/html/
   1.109 +en        English-language content
   1.110 +es        Spanish-language content
   1.111 +examples  Miscellaneous example scripts
   1.112 +tools     Old, largely unused conversion scripts
   1.113 +web       Content and comment system for http://hgbook.red-bean.com/
   1.114 +xsl       XSLT scripts for generating HTML
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/README.BUILD	Tue Mar 31 21:17:59 2009 +0800
     2.3 @@ -0,0 +1,99 @@
     2.4 +HOW-TO:  Compiling the Mercurial Book
     2.5 +======================================
     2.6 +
     2.7 +This Mercurial Book is written in DocBook 4.5.
     2.8 +
     2.9 +The goal of this document is to give simple instructions to anyone who
    2.10 +wants to compile this book into a useful format, like HTML or PDF.  It
    2.11 +should state *exactly* which tools to use, and how to invoke them, in
    2.12 +simplest terms.
    2.13 +
    2.14 +Table of Contents:
    2.15 +
    2.16 +  I. PRIMER
    2.17 + II. COMPILING THE DOCS
    2.18 +III. HACKING ON THE DOCS
    2.19 +
    2.20 +I. PRIMER
    2.21 +
    2.22 +  DocBook has a tortured, confusing history.  Before you do anything,
    2.23 +  take a look at Eric Raymond's excellent "DocBook Demystification HOWTO":
    2.24 +
    2.25 +      http://tldp.org/HOWTO/DocBook-Demystification-HOWTO/
    2.26 +
    2.27 +  It's very short and clears up many things.
    2.28 +
    2.29 +
    2.30 +II. COMPILING THE DOCS
    2.31 +
    2.32 +
    2.33 +1. Install XML DTD and XSL stylesheets for DocBook
    2.34 +
    2.35 +      % sudo apt-get install docbook-xml docbook-xsl
    2.36 +
    2.37 +2. Install libxml2-utils
    2.38 +
    2.39 +      % sudo apt-get install libxml2-utils
    2.40 +
    2.41 +3. Install graph drawing tools
    2.42 +
    2.43 +      % sudo apt-get install graphviz inkscape
    2.44 +
    2.45 +4. Install pdf support
    2.46 +
    2.47 +      % sudo apt-get install openjdk-6-jdk docbook-xsl-saxon libsaxon-java fop
    2.48 +
    2.49 +  The Makefile will actually invoke tools/fop/fop.sh, you should do
    2.50 +  some trick, let fop's CLASSPATH include saxon.jar and docbook-xsl-saxon.jar .
    2.51 +
    2.52 +5. Make
    2.53 +  Run 'make' for more details, for example:
    2.54 +
    2.55 +  * make all document(pdf, html and html-single for all languages)
    2.56 +      % make all
    2.57 +
    2.58 +  * make english document(pdf, html and html-single for all languages)
    2.59 +      % make LINGUA=en all
    2.60 +
    2.61 +  * make Chinese document(pdf, html and html-single for all languages)
    2.62 +      % make LINGUA=zh all
    2.63 +
    2.64 +  * make Chinese pdf document
    2.65 +      % make LINGUA=zh pdf
    2.66 +
    2.67 +III. HACKING ON THE DOCS
    2.68 +
    2.69 +In addition to everything in section II:
    2.70 +
    2.71 +
    2.72 +1. Get a nice editing environment for SGML/XML.
    2.73 +
    2.74 +  This isn't strictly required, but it's nice when your editor
    2.75 +  colorizes things, understands the DTD, tells you what tags you can
    2.76 +  insert, etc.
    2.77 +
    2.78 +  If you use emacs, we recommend the PSGML major-mode.  Most free
    2.79 +  operating systems package it, or its home page is here:
    2.80 +
    2.81 +      http://www.lysator.liu.se/projects/about_psgml.html
    2.82 +
    2.83 +  If you use vim, you might check out xmledit, at:
    2.84 +
    2.85 +      http://www.vim.org/scripts/script.php?script_id=301
    2.86 +
    2.87 +
    2.88 +2. Get a validating parser.
    2.89 +
    2.90 +  Actually, if you have what you need to compile the documentation,
    2.91 +  then you almost certainly have an XML validator installed already -
    2.92 +  it is called xmllint, and comes as part of libxml2.
    2.93 +
    2.94 +  The makefile is preconfigured with a suitable invocation of it,
    2.95 +  so simply run:
    2.96 +
    2.97 +      $ make validate
    2.98 +
    2.99 +3. Read about DocBook.
   2.100 +
   2.101 +  You'll want to get real intimate with a DocBook reference, such as
   2.102 +  can be found at:  http://www.docbook.org/tdg/en/html/
     3.1 --- a/stylesheets/base-html-stylesheet.xsl	Tue Mar 31 14:54:24 2009 +0800
     3.2 +++ b/stylesheets/base-html-stylesheet.xsl	Tue Mar 31 21:17:59 2009 +0800
     3.3 @@ -114,7 +114,14 @@
     3.4    </xsl:template>
     3.5  
     3.6    <xsl:template name="user.footer.navigation">
     3.7 -    <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
     3.8 -    <script type="text/javascript">_uacct = "UA-1805907-3"; urchinTracker();</script>
     3.9 +    <script type="text/javascript">
    3.10 +    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    3.11 +    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
    3.12 +    </script>
    3.13 +    <script type="text/javascript">
    3.14 +    try {
    3.15 +    var pageTracker = _gat._getTracker("UA-1805907-5");
    3.16 +    pageTracker._trackPageview();
    3.17 +    } catch(err) {}</script>
    3.18    </xsl:template>
    3.19  </xsl:stylesheet>
     4.1 --- a/web/hgbook/comments/feeds.py	Tue Mar 31 14:54:24 2009 +0800
     4.2 +++ b/web/hgbook/comments/feeds.py	Tue Mar 31 21:17:59 2009 +0800
     4.3 @@ -8,9 +8,9 @@
     4.4      
     4.5  class Comments(Feed):
     4.6      feed_type = MyAtomFeed
     4.7 -    title = 'Real World Haskell: recent comments'
     4.8 -    subtitle = ('Recent comments on the text of &#8220;Real World '
     4.9 -                'Haskell&#8221;, from our readers')
    4.10 +    title = 'Mercurial - The Definitive Guide: recent comments'
    4.11 +    subtitle = ('Recent comments on the text of &#8220;Mercurial: The '
    4.12 +                'Definitive Guide&#8221;, from our readers')
    4.13      link = '/feeds/comments/'
    4.14      author_name = 'Our readers'
    4.15  
     5.1 --- a/web/hgbook/templates/boilerplate.html	Tue Mar 31 14:54:24 2009 +0800
     5.2 +++ b/web/hgbook/templates/boilerplate.html	Tue Mar 31 21:17:59 2009 +0800
     5.3 @@ -24,9 +24,14 @@
     5.4  	  href="http://mattahan.deviantart.com/">Mattahan</a>.</p>
     5.5      </div>
     5.6  
     5.7 -    <script src="http://www.google-analytics.com/urchin.js"
     5.8 -      type="text/javascript"></script>
     5.9 -    <script type="text/javascript">_uacct = "UA-1805907-3";
    5.10 -      urchinTracker();</script>
    5.11 +    <script type="text/javascript">
    5.12 +    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    5.13 +    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
    5.14 +    </script>
    5.15 +    <script type="text/javascript">
    5.16 +    try {
    5.17 +    var pageTracker = _gat._getTracker("UA-1805907-5");
    5.18 +    pageTracker._trackPageview();
    5.19 +    } catch(err) {}</script>
    5.20    </body>
    5.21  </html>