zendframework/zf2-documentation — pull request #1106 by webdevel (2013-10-15 00:40:52+00:00)
Title: Fix duplicate parsing of included files

This fixes over 600 warnings generated by ```make html``` where most warnings are:

>WARNING: duplicate label

This fixes the root cause of the warnings. For each file that is parsed by the ```include::``` directive, should be excluded from indexing by the ```sphinx-build``` ```sourcedir```.

In other words, each file is processed twice. Once by the include directive and again by simply existing in the source directory.

I think the simplest approach to solving this issue is to place included files into a ```include``` directory. Then, make further use of the ```exclude_patterns``` list as defined in ```conf.py```:

```python
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build', '**/include']
```