[mapserver-dev] MapServer docs and index updates

Seth G sethg at geographika.co.uk
Sun May 10 14:58:42 PDT 2020


Hi list,

I have added a pull request at https://github.com/mapserver/docs/pull/324 and would appreciate any feedback or objections to proceeding with adding a `:name:` to all the Mapfile index directives. I've included the text from the pull request below. 

In summary all index directives would be updated from:

```
.. index:: 
    pair: CLASS; BACKGROUNDCOLOR
```

to:

```
.. index:: 
    pair: CLASS; BACKGROUNDCOLOR
    :name: mapfile-class-background   
```

Links in the index will then change from https://mapserver.org/mapfile/class.html#index-1 which can change to a fixed URL - https://mapserver.org/mapfile/class.html#mapfile-class-background

This would form part of the updates to the MapScript API documentation updates - see [here](https://github.com/mapserver/mapserver/pull/5870). Named index options allow an HTML link to be added from the MapScript docs to the relevant Mapfile keyword. 

I've asked a [question on StackOverflow](https://stackoverflow.com/questions/61666809/parse-and-write-rst-using-docutils) to see if it is possible to automate it with docutils, but otherwise it will be a manual/parse/regex approach. 

I added the `:name:` option to Sphinx as part of the version 3.0 release with [this pull request](https://github.com/sphinx-doc/sphinx/pull/7087), mainly for this use case. The docs for the option [are here](https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-option-index-name). 

I've created the pull request against master, but can make it against 7.6 if appropriate, and update the remaining Mapfile index directives. 


Seth

--
web:http://geographika.co.uk
twitter: @geographika


More information about the mapserver-dev mailing list