Hi, > rst_epilog = """ > .. |yapsy| replace:: `YAPSY <https://yapsy.sourceforge.net/>`_ > """ > >When I build my docs I get sereval repetitions of:
In this case, you can choose other notations. Way1 (anonymous target by double underscore): .. |yapsy| replace:: `YAPSY <https://yapsy.sourceforge.net/>`__ Way2 (explicit target): .. |yapsy| replace:: YAPSY_ .. _YAPSY: https://yapsy.sourceforge.net/ > Is it possible in Sphinx 1.3.1 to get a global substitution that is an abbreviation and a hyperlink? Yes. rst_epilog = """ .. |yapsy| replace:: :abbr:`YAPSY (Yet Another Plugin SYstem)` .. _yapsy: https://yapsy.sourceforge.net/ """ and use it as: |yapsy|_ refs: http://docutils.sourceforge.net/docs/ref/rst/directives.html#directives-for-substitution-definitions 2015年9月6日(日) 8:56 Josh English <[email protected]>: > I am trying to include a link to the YAPSY module in my documentation as a > substitution. > > In my conf.py: > > rst_epilog = """ > .. |yapsy| replace:: `YAPSY <https://yapsy.sourceforge.net/>`_ > """ > > > When I build my docs I get sereval repetitions of: > > C:\Users\Josh\PycharmProjects\todoextensible\doc\controllingoptions.rst:36: > ERROR: Substitution definition contains illegal element: > <target ids="yapsy" names="yapsy" refuri="https://yapsy.sourceforge.net/ > "> > .. |yapsy| replace:: `YAPSY <https://yapsy.sourceforge.net/>`_ > C:\Users\Josh\PycharmProjects\todoextensible\doc\controllingoptions.rst:12: > ERROR: Undefined substitution referenced: "yapsy". > > > for every page in my documentation. The resulting html files have a link > around the text |yapsy| and it isa link back to the same page. > > If I try a basic abbreviation with > > rst_epilog = """ > .. |yapsy| replace:: :abbr:`YAPSY (Yet Another Plugin SYstem)` > """ > > > the files work. > > Is it possible in Sphinx 1.3.1 to get a global substitution that is an > abbreviation and a hyperlink? > > Josh > > -- > 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 http://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 http://groups.google.com/group/sphinx-users. For more options, visit https://groups.google.com/d/optout.
