My Sphinx Extensions
Clone or download
fabpot feature #40 Generate HTTPS links for php.net (stof)
This PR was merged into the 1.0-dev branch.

Discussion
----------

Generate HTTPS links for php.net

Commits
-------

d059f86 Generate HTTPS links for php.net
Latest commit 578573f Apr 20, 2018
Permalink
Failed to load latest commit information.
sensio Generate HTTPS links for php.net Apr 20, 2018
.gitignore Fixed for @stof feedback. Jun 8, 2014
LICENSE updated LICENSE year Jan 2, 2017
README.md Create README.md Jun 14, 2017
composer.json added a branch alias Dec 19, 2013
setup.py Added setup.py Jul 22, 2013

README.md

Sphinx Extensions for PHP and Symfony

You can install the extension by:

  • running sudo pip install git+https://github.com/fabpot/sphinx-php.git;

  • cloning the project and add sensio to your path (with something like sys.path.insert(0, os.path.abspath('./path/to/sensio'))).

  • Arch Linux users can use the AUR package

You can use the following extensions in your conf.py file:

  • sensio.sphinx.refinclude
  • sensio.sphinx.configurationblock
  • sensio.sphinx.phpcode
  • sensio.sphinx.bestpractice

To enable highlighting for PHP code not between <?php ... ?> by default:

# loading PhpLexer
from sphinx.highlighting import lexers
from pygments.lexers.web import PhpLexer

# enable highlighting for PHP code not between ``<?php ... ?>`` by default
lexers['php'] = PhpLexer(startinline=True)
lexers['php-annotations'] = PhpLexer(startinline=True)

And here is how to use PHP as the primary domain:

primary_domain = 'php'

Configure the api_url for links to the API:

api_url = 'http://api.symfony.com/master/%s'