Hi, Sphinx.add_object_type() uses `sphinx.domains.std.GenericObject` for an implementation of the directives. It does not make entries unique. As a quick look, you should use your own directive class.
Thanks, 2017-04-06 2:03 GMT+09:00 <[email protected]>: > I am using Sphinx's add_object_type to create a custom object confval for > configuration file values: > > add_object_type('confval', 'confval', objname='configuration value', > indextemplate='pair: %s; configuration value') > > However I have multiple configuration files and they could have the same > value. > > Consider: > > ..confval: filepath > > Description filepath in configuration file foo.cfg > > And > > ..confval: filepath > > Description filepath in configuration file bar.cfg > > I now have two filepath values. I could make them unique by changing their > names to foo-filename and bar-filename but that changes the text that is > presented to the user. > > How can I generate unique index names for the values while maintaining the > text that the user sees? > > My current idea is to add an index option: > > ..confval: filepath > :index: foo-filepath > > Description filepath in configuration file foo.cfg > > But that would require creating a directive class. Can I do something with > add_object_type? > > -- > You received this message because you are subscribed to the Google Groups > "sphinx-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/sphinx-users. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "sphinx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sphinx-users. For more options, visit https://groups.google.com/d/optout.
