Permalink
Browse files

Merge pull request #1129 from kmasaryk/master

Updates to epub build
  • Loading branch information...
markstory committed Mar 5, 2014
2 parents 049235d + 6b3379f commit 20f590b9b13354e2b711c02086f0cc932833925f
View
@@ -248,19 +248,22 @@
epub_theme = 'cakephp-epub'
+# The cover page information.
+epub_cover = ('_static/epub-logo.png', 'epub-cover.html')
+
# The language of the text. It defaults to the language option
# or en if the language is not set.
#epub_language = ''
# The scheme of the identifier. Typical schemes are ISBN or URL.
-#epub_scheme = ''
+epub_scheme = 'URL'
# The unique identifier of the text. This can be a ISBN number
# or the project homepage.
-#epub_identifier = ''
+epub_identifier = 'http://cakephp.org'
# A unique identification for the text.
-#epub_uid = ''
+epub_uid = 'cakephpcookbook1393624653'
# HTML files that should be inserted before the pages created by sphinx.
# The format is a list of tuples containing the path and title.
@@ -275,6 +278,7 @@
'index.html',
'pdf-contents.html',
'search.html',
+ 'contents.html'
]
# The depth of the table of contents in toc.ncx.
@@ -283,6 +287,9 @@
# Allow duplicate toc entries.
epub_tocdup = False
+# If true, add an index to the epub document.
+epub_use_index = False
+
# Languages available.
languages = ['en', 'pt', 'es', 'ja', 'ru', 'fr']
View
@@ -88,7 +88,7 @@ devhelp:
@echo "# devhelp"
epub:
- $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub/$(LANG)
+ $(SPHINXBUILD) -b epub -D master_doc='epub-contents' $(ALLSPHINXOPTS) $(BUILDDIR)/epub/$(LANG)
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub/$(LANG)."
@@ -376,6 +376,8 @@ model, you don't need to use 'contain' again for related models
all models used in containment, you may consider attaching it to
your AppModel.
+.. _containablebehavior-options:
+
ContainableBehavior options
~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -428,7 +430,7 @@ Here's an example of how to contain associations when paginating::
.. note::
If you contained the associations through the model instead,
- it will not honor Containable's :ref:`recursive option <containableBehavior-options>`.
+ it will not honor Containable's :ref:`recursive option <containablebehavior-options>`.
So if you set recursive to -1 for example for the model, it won't work::
$this->User->recursive = -1;
@@ -126,7 +126,7 @@ such as debugging and translating content.
If ``$showHTML`` is true or left as null, the data is rendered to be
browser-friendly.
If $showFrom is not set to false, the debug output will start with the line from
- which it was called
+ which it was called.
Also see :doc:`/development/debugging`
.. php:function:: env(string $key)
@@ -950,7 +950,7 @@ Datetime options
Form Element-Specific Methods
=============================
- All elements are created under a form for the ``User`` model as in the examples above.
+All elements are created under a form for the ``User`` model as in the examples above.
For this reason, the HTML code generated will contain attributes that reference to the User model.
Ex: name=data[User][username], id=UserUsername
@@ -1057,6 +1057,7 @@ Ex: name=data[User][username], id=UserUsername
generated. Example:
.. code-block:: html
+
<textarea name="data[User][notes]" id="UserNotes">
This text is to be edited.
</textarea>
View
@@ -0,0 +1,26 @@
+Contents
+########
+
+.. toctree::
+ :maxdepth: 3
+
+ installation
+ getting-started
+ cakephp-overview
+ controllers
+ views
+ models
+ core-libraries
+ plugins
+ console-and-shells
+ development
+ deployment
+ tutorials-and-examples
+ contributing
+ appendices
+
+.. todolist::
+
+.. meta::
+ :title lang=en: Contents
+ :keywords lang=en: core libraries,ref search,shells,deployment,appendices,glossary,models
@@ -311,9 +311,9 @@ So if the Sqlserver Datasource errors out with::
Error: Database connection "Sqlserver" is missing, or could not be created.
First check if the SQL Server PHP extension pdo_sqlsrv and the SQL Server Native
-Client.
+Client are installed properly.
.. meta::
:title lang=en: DataSources
:keywords lang=en: array values,model fields,connection configuration,implementation details,relational databases,best bet,mysql postgresql,sqlite,external sources,ldap server,database connection,rdbms,sqlserver,postgres,relational database,mssql,aggregates,apis,repository,signatures
-Client are installed properly.
+
View
@@ -88,7 +88,7 @@ devhelp:
@echo "# devhelp"
epub:
- $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub/$(LANG)
+ $(SPHINXBUILD) -b epub -D master_doc='epub-contents' $(ALLSPHINXOPTS) $(BUILDDIR)/epub/$(LANG)
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub/$(LANG)."
View
@@ -0,0 +1,13 @@
+Contents
+########
+
+.. toctree::
+ :maxdepth: 3
+
+ installation
+ getting-started
+ cakephp-overview
+ tutorials-and-examples
+
+.. todolist::
+
View
@@ -88,7 +88,7 @@ devhelp:
@echo "# devhelp"
epub:
- $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub/$(LANG)
+ $(SPHINXBUILD) -b epub -D master_doc='epub-contents' $(ALLSPHINXOPTS) $(BUILDDIR)/epub/$(LANG)
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub/$(LANG)."
View
@@ -0,0 +1,26 @@
+Contenu
+#######
+
+.. toctree::
+ :maxdepth: 3
+
+ installation
+ getting-started
+ cakephp-overview
+ controllers
+ views
+ models
+ core-libraries
+ plugins
+ console-and-shells
+ development
+ deployment
+ tutorials-and-examples
+ contributing
+ appendices
+
+.. todolist::
+
+.. meta::
+ :title lang=fr: Contents
+ :keywords lang=fr: librairies du coeur,ref search,shells,déploiement,appendices,glossary,models
View
@@ -88,7 +88,7 @@ devhelp:
@echo "# devhelp"
epub:
- $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub/$(LANG)
+ $(SPHINXBUILD) -b epub -D master_doc='epub-contents' $(ALLSPHINXOPTS) $(BUILDDIR)/epub/$(LANG)
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub/$(LANG)."
View
@@ -0,0 +1,23 @@
+コンテンツ
+##########
+
+.. toctree::
+ :maxdepth: 3
+
+ installation
+ getting-started
+ cakephp-overview
+ controllers
+ views
+ models
+ core-libraries
+ plugins
+ console-and-shells
+ development
+ deployment
+ tutorials-and-examples
+ contributing
+ appendices
+
+.. todolist::
+
View
@@ -88,7 +88,7 @@ devhelp:
@echo "# devhelp"
epub:
- $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub/$(LANG)
+ $(SPHINXBUILD) -b epub -D master_doc='epub-contents' $(ALLSPHINXOPTS) $(BUILDDIR)/epub/$(LANG)
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub/$(LANG)."
View
@@ -0,0 +1,23 @@
+Contents
+########
+
+.. toctree::
+ :maxdepth: 3
+
+ installation
+ getting-started
+ cakephp-overview
+ controllers
+ views
+ models
+ core-libraries
+ plugins
+ console-and-shells
+ development
+ deployment
+ tutorials-and-examples
+ contributing
+ appendices
+
+.. todolist::
+
View
@@ -88,7 +88,7 @@ devhelp:
@echo "# devhelp"
epub:
- $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub/$(LANG)
+ $(SPHINXBUILD) -b epub -D master_doc='epub-contents' $(ALLSPHINXOPTS) $(BUILDDIR)/epub/$(LANG)
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub/$(LANG)."
View
@@ -0,0 +1,9 @@
+Cuprins
+#######
+
+.. toctree::
+ :maxdepth: 3
+
+ index
+
+.. todolist::
View
@@ -88,7 +88,7 @@ devhelp:
@echo "# devhelp"
epub:
- $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub/$(LANG)
+ $(SPHINXBUILD) -b epub -D master_doc='epub-contents' $(ALLSPHINXOPTS) $(BUILDDIR)/epub/$(LANG)
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub/$(LANG)."
View
@@ -0,0 +1,23 @@
+Содержание
+##########
+
+.. toctree::
+ :maxdepth: 3
+
+ installation
+ getting-started
+ cakephp-overview
+ controllers
+ views
+ models
+ core-libraries
+ plugins
+ console-and-shells
+ development
+ deployment
+ tutorials-and-examples
+ contributing
+ appendices
+
+.. todolist::
+
View
@@ -88,7 +88,7 @@ devhelp:
@echo "# devhelp"
epub:
- $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub/$(LANG)
+ $(SPHINXBUILD) -b epub -D master_doc='epub-contents' $(ALLSPHINXOPTS) $(BUILDDIR)/epub/$(LANG)
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub/$(LANG)."
View
@@ -0,0 +1,9 @@
+Contents
+########
+
+.. toctree::
+ :maxdepth: 3
+
+ index
+
+.. todolist::
@@ -0,0 +1,33 @@
+{#
+ epub/epub-cover.html
+ ~~~~~~~~~~~~~~~~~~~~
+
+ Sample template for the html cover page.
+
+ :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+#}
+{% extends "layout.html" %}
+{%- block rootrellink %}{% endblock %}
+{%- block relbaritems %}{% endblock %}
+{%- block sidebarlogo %}{% endblock %}
+{%- block linktags %}{% endblock %}
+{%- block relbar1 %}{% endblock %}
+{%- block sidebar1 %}{% endblock %}
+{%- block sidebar2 %}{% endblock %}
+{%- block footer %}{% endblock %}
+
+{% block content %}
+ {#
+ Ultimately, this should probably just be an image of a nice
+ cover like a real book instead of building it like a web page
+ with a bunch of text elements.
+ #}
+ <div class="epub-cover">
+ <img src="{{ image }}" alt="Cover image" />
+ <p><h1 style="text-align:right">{{ title }}</h1></p>
+ <p style="text-align:right; font-style:italic; font-weight:bold">Release {{ release }}</p>
+ <p style="text-align:right; font-weight:bold">Cake Software Foundation</p>
+ </div>
+{% endblock %}
+
Binary file not shown.

0 comments on commit 20f590b

Please sign in to comment.