Skip to content
Browse files

[documentation] improve Sphinx

  • Loading branch information...
1 parent 7f69630 commit 845e6276157d625be374f7c52b267fcfe71b02c0 @rande rande committed
View
4 .travis.yml
@@ -15,9 +15,9 @@ env:
before_script:
- composer require symfony/symfony:${SYMFONY_VERSION} --prefer-source
- composer install --dev --prefer-source
- - sudo pip install Sphinx
+ - sudo pip install -r Resources/doc/requirements.txt
-script: phpunit && cd Resources/doc && make html
+script: phpunit && cd Resources/doc && sphinx-build -W -b html -d _build/doctrees . _build/html
notifications:
webhooks: http://sonata-project.org/bundles/block/master/travis
View
9 Resources/doc/conf.py
@@ -25,7 +25,7 @@
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = []
+extensions = ['sensio.sphinx.refinclude', 'sensio.sphinx.configurationblock', 'sensio.sphinx.phpcode']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
@@ -40,7 +40,7 @@
master_doc = 'index'
# General information about the project.
-project = u'Sonata ~ AdminBundle'
+project = u'Sonata ~ BlockBundle'
copyright = u'2010-2014, Thomas Rabaix'
# The version info for the project you're documenting, acts as replacement for
@@ -88,10 +88,11 @@
# -- Options for HTML output ---------------------------------------------------
+import sphinx_rtd_theme
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
-html_theme = 'default'
+html_theme = 'sphinx_rtd_theme'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
@@ -99,7 +100,7 @@
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
-#html_theme_path = []
+html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
View
1 Resources/doc/index.rst
@@ -16,3 +16,4 @@ Reference Guide
reference/exceptions
reference/advanced_usage
reference/cache
+ reference/events
View
7 Resources/doc/reference/advanced_usage.rst
@@ -8,9 +8,10 @@ This happens when a block is rendered:
if found
- each block model also has a block service, the execute method of it is
called:
- - you can put here logic like in a controller
- - it calls a template
- - the result is a Response object
+
+ - you can put here logic like in a controller
+ - it calls a template
+ - the result is a Response object
Cache
-----
View
2 Resources/doc/reference/your_first_block.rst
@@ -1,5 +1,5 @@
Your first block
-===============
+================
This quick tutorial explains how to create a RSS reader block.

0 comments on commit 845e627

Please sign in to comment.
Something went wrong with that request. Please try again.