My rst README is not formatted on pypi.python.org

前端 未结 5 874
面向向阳花
面向向阳花 2020-12-23 16:08

When I submit my package to the Python Package Index (https://pypi.python.org/pypi) my README file, which is written with valid reStructuredText and saved as README.rst, is

5条回答
  •  太阳男子
    2020-12-23 16:59

    The first thing that pops out at me (after a quick scan) is that in your Advanced Filters section you use two underscores after a link, e.g.,

    `Link text `__
    

    Where it should be

    `Link text `_
    

    It's odd that the reStructuredText checkers didn't catch that. If you have docutils installed as well, you can run rst2html.py README.rst and it should print out the HTML. If there are errors it will fail and tell you where the errors were.

    Also, fair warning, lists should have no leading spaces, i.e., you have

     - foo
     - bar
    

    Instead of

    - foo
    - bar
    

    (To make it more visually clear)

    - foo # correct
     - one too many for a regular list, it will show up as a quoted list
    

    Also, relative linking doesn't work like so Text to link <#link>_. If you want to link to a separate section you have to do the following:

    Here's my `link `_ to the other section.
    
    .. Other stuff here ...
    
    .. _section_name:
    
    Min/Max Investment Opportunities and Other Foo Biz Baz
    ------------------------------------------------------
    

提交回复
热议问题