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

[WIP] Include static files in config and to sidebar, #115 #394

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pdoc/templates/config.mako
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,9 @@
# Note: in Python docstrings, either all backslashes need to be escaped (\\)
# or you need to use raw r-strings.
latex_math = False

# If 'static_content' is not empty, each Mardown document will be included
# by its key value.
# static_content = {'tutorial': 'docs/tutorial.md', 'gallery': 'docs/gallery.md'}
static_content = {}
%>
7 changes: 7 additions & 0 deletions pdoc/templates/html.mako
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,13 @@

<h1>Index</h1>
${extract_toc(module.docstring) if extract_module_toc_into_sidebar else ''}
% if len(static_content):
<ul id="static">
% for name, filename in static_content.items():
<li><h3><a href="${filename}">${name}</a></h3>
% endfor
</ul>
% endif
<ul id="index">
% if supermodule:
<li><h3>Super-module</h3>
Expand Down