In the tutorial, it states that links will be created to navigate around when autodoc
is used to document code. I have set up conf.py
and api.md
for that but the only links that I'm getting are the ones in the navigation pane on the generated output.
Paul's web page on this course at says:
It's visually attractive. More than that, though...it's semantically rich: links to navigate around, styling for the structure, and more.
Yes, it's semantically rich, etc., but I see no links to navigate around in the code.
I have set up conf.py
with the prerequisite extensions:
extensions = [
"myst_parser",
"sphinx.ext.autodoc",
"sphinx.ext.napoleon",
"sphinx_autodoc_typehints",
"sphinx.ext.intersphinx",
]
And created api.md
:
# About `MyDemo`
Let's take a look at this Python class.
```{eval-rst}
.. autoclass:: my_demo.MyDemo
:members:
```
# About `MyClass`
```{eval-rst}
.. autoclass:: my_demo.MyClass
:members:
```
The Python file my_demo.py
looks like this:
class MyDemo:
""" A *great* demo """
def __init__(self, name):
self.name = name
def hello(self):
""" Be friendly """
return f"Hello {self.name}"
class MyClass:
""" A *great* demo """
def __init__(self, name):
self.name = name
def hello(self, greeting: str) -> str:
""" The canonical hello world example.
A *longer* description with some **RST**.
Args:
name: The person to say hello to.
Returns:
str: The greeting
"""
return f"{greeting} {self.name}"
The resultant HTML page looks like this but nothing in the code has links:
Is that correct? Or am I missing something?
Thanks
Michael