-
-
Notifications
You must be signed in to change notification settings - Fork 200
How can I create a title page for a project with multiple modules? #410
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
Comments
Hi there! I think you can relatively easily accomplish what you are looking for by overriding the
{% extends "default/index.html.jinja2" %}
{% block content %}
<main class="pdoc">
Hello World!
</main>
{% endblock %}
Hope that helps! Here's a more complex example: {% extends "default/index.html.jinja2" %}
{% block title %}Hello World{% endblock %}
{% block nav %}
<img src="https://pdoc.dev/logo.svg" class="logo" alt="project logo"/>
<input type="search" placeholder="Search..." role="searchbox" aria-label="search"
pattern=".+" required>
{{ super() }}
{% endblock %}
{% block content %}
<main class="pdoc">
{% filter to_html %}
# Hello World!
This is a test page with Markdown contents.
{% endfilter %}
<strong>You can also write plain HTML here!</strong>
</main>
{% include "search.html.jinja2" %}
{% endblock %} |
Cool, thanks for the explanation! Do you think it could be worthwhile updating the documentation for it to make it more clear? |
Actually that's a fair point. :) |
Hi, I have a similar requirement for my project. I have created a custom-template dir with index.html.jinja2 file to override pdoc -t .\demo_poc\custom-template\ .\demo_poc\ Unfortunately nothing changes. Can you kindly help me with this. |
Reasons: - pdoc is more mainstream - pdoc *seems* a little better - deployment without pushing to separate branch (gh-pages), thereby lighter GitHub actions workflow. How to do stuff: - mitmproxy/pdoc#410 - https://pdoc.dev/docs/pdoc.html#edit-pdocs-html-template - https://github.com/mitmproxy/pdoc/blob/main/examples/custom-template/module.html.jinja2
Reasons: - pdoc is more mainstream - pdoc *seems* a little better - deployment without pushing to separate branch (gh-pages), thereby lighter GitHub actions workflow. How to do stuff: - mitmproxy/pdoc#410 - https://pdoc.dev/docs/pdoc.html#edit-pdocs-html-template - https://github.com/mitmproxy/pdoc/blob/main/examples/custom-template/module.html.jinja2
Reasons: - pdoc is more mainstream - pdoc *seems* a little better - deployment without pushing to separate branch (gh-pages), thereby lighter GitHub actions workflow. How to do stuff: - mitmproxy/pdoc#410 - https://pdoc.dev/docs/pdoc.html#edit-pdocs-html-template - https://github.com/mitmproxy/pdoc/blob/main/examples/custom-template/module.html.jinja2
Hi, the steps that you suggested in the documentation didn't work |
Problem Description
One of my projects consists of multiple modules, which due to design constraints cannot be merged under one umbrella. PDoc handles this very well, with a clear list of modules being shown in the left-hand panel on the landing page. However, since there is no main
__init__.py
file that I can include some markdown within (refer to the "include markdown files" section of the docs), it doesn't seem like I can take any action to customise the site's landing page.Proposal
If there is a way to do this without employing any hacks or workarounds which would mess up my project's hierarchy, then add some more clear documentation to help users find info on it.
Otherwise, add support for a command line flag that lets you specify a markdown file to be included on the landing page for documentation of projects that use many modules.
Alternatives
I can't think of any
Additional context
Lots of empty space, which could benefit from adding a nice readme file.

The text was updated successfully, but these errors were encountered: