Have the same README both in Markdown and reStructuredText

后端 未结 8 1276
旧时难觅i
旧时难觅i 2020-12-22 16:29

I have a project hosted on GitHub. For this I have written my README using the Markdown syntax in order to have it nicely formatted on GitHub.

As my project is in Py

8条回答
  •  遥遥无期
    2020-12-22 16:41

    2019 Update

    The PyPI Warehouse now supports rendering Markdown as well! You just need to update your package configuration and add the long_description_content_type='text/markdown' to it. e.g.:

    setup(
        name='an_example_package',
        # other arguments omitted
        long_description=long_description,
        long_description_content_type='text/markdown'
    )
    

    Therefore, there is no need to keep the README in two formats any longer.

    You can find more information about it in the documentation.

    Old answer:

    The Markup library used by GitHub supports reStructuredText. This means you can write a README.rst file.

    They even support syntax specific color highlighting using the code and code-block directives (Example)

提交回复
热议问题