Closed zindy closed 7 months ago
Sounds good - but as with https://github.com/qupath/qupath-docs/issues/53 could you post it on image.sc if you've time?
It would be great to have this documented, but I'm not sure if the readthedocs for QuPath is the right place or not. It might be, but I'm hesitant because everything there is a potential maintenance/update task in the future, it's not really connected to using QuPath, and if many people would submit PRs for doc changes then I don't love the thought of having to review them :)
not sure if this issue is still relevant as it has been almost a year, but today i modified the docs locally and previewed the changes. here is how i did it:
cd
into itvenv
from the standard library.
python -m venv venv
source ./venv/bin/activate
python -m pip install -r requirements.txt
docs
directory.make html
from the root directory of this project (same directory that contains the README).python -m http.server --dir _build/html/ &
from the root directory of the project. The ampersand &
at the end runs the process in the background (on linux and macos), so i can use the terminal to run make html
again.make html
(no need to restart the http server)i am not suggesting this should be documented in this repo. however, i saw this issue and figured i would add my 2 cents (5 cents with inflation perhaps).
I'd suggest the README would be the best place to house this info, or a contributing doc
After make html
you should just be able to open _build/html/index.html
- there isn't really a need to run an http server. That's all I use most of the time.
Although if you use sphinx-autobuild
you can get some of those advantages, without needing to run make html
.
Yes, I second the use of sphinx-autobuild
, it automatically reloads the pages when they are changed, it's very good.
I'm not very well versed in building Sphinx and read-the-docs documentation, and struggled a bit with creating a local environment.
I ended up using the make script
make html
andpip install
all the missing modules,then sphinx-serve.Edit: The package sphinx-autobuild suggested by Pete below is much better than the one I suggested and is being actively maintenained. It will automatically reload the page in a browser when changes the source file is saved.
I could start a pull request and describe how I got my environment to work, if you'd like?