-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Building documentation for add ons
-
In your project:
mkdir doc
cd doc
mkdir widgets
cd widgets
mkdir images
mkdir icons
-
Add .rst documentation files to doc/widgets.
Add .png icons to doc/widgets/icons.
Add .png images to doc/widgets/images. -
In doc/ run:
sphinx-quickstart
Follow instructions. This will create a makefile, make.bat, conf.py and index.rst. -
In conf.py uncomment line 46 and set
source_encoding = 'utf-8'
-
In orangecontrib/name_of_addon/widgets/__init__.py add (with the final URL fixed):
# Location of widget help files.
WIDGET_HELP_PATH = (
# Used for development.
# You still need to build help pages using
# make htmlhelp
# inside doc folder
("{DEVELOP_ROOT}/doc/_build/htmlhelp/index.html", None),
# Online documentation url, used when the local documentation is available.
# Url should point to a page with a section Widgets. This section should
# includes links to documentation pages of each widget. Matching is
# performed by comparing link caption to widget name.
("http://orange3-name_of_project.readthedocs.io/en/latest/", "")
-
In setup.py add as the final entry point to ENTRY_POINTS (with the final URL fixed):
# Register widget help
"orange.canvas.help": (
'html-index = orangecontrib.name_of_project.widgets:WIDGET_HELP_PATH',),
-
python setup.py develop
-
cd doc
make htmlhelp
-
Test whether F1 works on your local build and if it does, push to Github.
Widget matches documentation file comparing widget name (not file name) and documentation title (not file name). Widget name and title must be the same.
!Note!
html help
will only work with recommonmark==0.4.0 and CommonMark==0.5.4. Does not work well with CommonMark==0.7.3.