docs: def add_target_and_index(self, name, sig, signode):
          """Add a target and index for this thing."""
          targetname = '%s-%s' % (self.objtype, name)
  
          if targetname not in self.state.document.ids:
              signode['names'].append(targetname)
              signode['ids'].append(targetname)
              signode['first'] = (not self.names)
              self.state.document.note_explicit_target(signode)
  
              objects = self.env.domaindata['everett']['objects']
              key = (self.objtype, name)
              if key in objects:
                  self.state_machine.reporter.warning(
                      'duplicate description of %s %s, ' % (self.objtype, name) +
                      'other instance in ' + self.env.doc2path(objects[key]),
                      line=self.lineno
                  )
              objects[key] = self.env.docname
  
          indextext = _('%s (component)') % name
          self.indexnode['entries'].append(('single', indextext, targetname, '', None))