richardbarran / django-photologue

A customizable plug-in photo gallery management application for the Django web framework.
BSD 3-Clause "New" or "Revised" License
674 stars 239 forks source link

include ../README.rst in index.rst to address #188 #189

Closed NickleDave closed 6 years ago

NickleDave commented 6 years ago

Hi @richardbarran I think this takes care of #188

You were right, there is a way to to get the text from README.rst into index.rst--you can just a Sphinx include directive. Notice that I used the start-line and end-line options to skip the lines with a link to the docs (since the reader will already be at the docs page). That's kind of fragile if README.rst gets edited but I don't know of a better way to do it--there doesn't seem to be an "include sections" option. Also note I added ============= under Contents: because otherwise it looked kind of like the contents was just part of the previous section from the README.

Using include looked like it worked when I ran make.bat with Sphinx locally and then viewed the html with http.server, not sure if there's a better way to test.

Let me know what you think!

richardbarran commented 6 years ago

Hi, Thanks for the PR - I've merged it. I agree that relying on line numbers in the README is a bit fragile. On the other hand, the README changes very very rarely, so I'm using your code 'as is' - if it causes issues in the future I can always amend it. Thanks again! Richard

NickleDave commented 6 years ago

Yay! Thank you for the chance to contribute, glad I could help

NickleDave commented 6 years ago

Just a heads up, the changes only show in the latest version of the docs but not the stable version. Not sure if there's an easy way around that before the next version bump?

richardbarran commented 6 years ago

You're correct - the changes will appear in the next release. Which will happen in a few weeks, once I've checked compatibility of Photologue with the latest release of Django.