Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link to class not created without the --external-links option #27

Open
mikecharles opened this issue Feb 13, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@mikecharles
Copy link

commented Feb 13, 2015

I'm generating documentation for my data_utils package. Under data_utils.gridded.grid I have a class defined:

class Grid:
    """
    ...
    """
    def __init__(...)

But when I generate documentation with this command:

pdoc data_utils --overwrite --html --html-dir docs/api

Any references in modules' docstrings (ex. data_utils.gridded.plotting) to data_utils.gridded.grid.Grid do not become links. However, when I include the --external-links arg:

pdoc data_utils --overwrite --external-links --html --html-dir docs/api

data_utils.gridded.grid.Grid does become a link. So why is this considered "external"?

@BurntSushi

This comment has been minimized.

Copy link
Contributor

commented Feb 21, 2015

Unfortunately, links don't work that well in statically generated docs. I think they should work just fine for linking within the same module, but linking to things in other modules or sub-modules just doesn't work right now.

The "external" links stuff only applies when documentation is served over HTTP. In that case, it employs a hack where links to items in other modules are specially written. When you follow them, the HTTP server tries to resolve them dynamically by search all modules in sys.path.

In essence, the current (automatic) linking is very simplistic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.