mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-01-23 15:33:26 +08:00
update index page
This commit is contained in:
parent
04a7479c59
commit
ff3f8a8c35
@ -18,7 +18,7 @@ from _ba import (
|
||||
newnode, playsound, printnodes, printobjects, pushcall, quit, rowwidget,
|
||||
safecolor, screenmessage, scrollwidget, set_analytics_screen, charstr,
|
||||
textwidget, time, timer, open_url, widget, clipboard_is_supported,
|
||||
clipboard_has_text, clipboard_get_text, clipboard_set_text)
|
||||
clipboard_has_text, clipboard_get_text, clipboard_set_text, getdata)
|
||||
from ba._activity import Activity
|
||||
from ba._plugin import PotentialPlugin, Plugin, PluginSubsystem
|
||||
from ba._actor import Actor
|
||||
|
||||
@ -9,19 +9,29 @@
|
||||
</a>
|
||||
{% endblock %}
|
||||
{% if search %}
|
||||
<input type="search" placeholder="Search Ballistica Python API Documentation..." aria-label="search box">
|
||||
<input type="search"
|
||||
placeholder="Search Python API Documentation..."
|
||||
aria-label="search box">
|
||||
{% endif %}
|
||||
</header>
|
||||
<main class="pdoc">
|
||||
<h1>header woo-hoo</h1>
|
||||
Welcome to blah blah blah, some <b>bold</b> text, create an
|
||||
<a href="https://github.com/efroemling/ballistica/issues/">issue</a>
|
||||
if something in this docs feels incorrect or can be improved blah blah
|
||||
<code>
|
||||
some code hooray
|
||||
</code>
|
||||
<br/>
|
||||
TODO: add some normal text here.
|
||||
<h1>Welcome to Ballistica Documentations!</h1>
|
||||
<i>Last updated for Ballistica {{ ba_version }}
|
||||
(build {{ ba_build }})</i>
|
||||
<hr/>
|
||||
<p>
|
||||
Here you can find information about Python classes/functions
|
||||
used by Ballistica.
|
||||
Fell free to create an
|
||||
<a href="https://github.com/efroemling/ballistica/issues/">
|
||||
issue</a>
|
||||
or send a
|
||||
<a href="https://github.com/efroemling/ballistica/pulls/">PR</a>
|
||||
if something in this docs feels incorrect or can be improved.
|
||||
Note that <code>bastd</code>'s docs may look a little terrible
|
||||
right
|
||||
now, hope that's temporary. :)
|
||||
</p>
|
||||
</main>
|
||||
{% if search %}
|
||||
{% include "search.html.jinja2" %}
|
||||
|
||||
@ -75,6 +75,7 @@ def parse_docs_attrs(attrs: list[AttributeInfo], docs: str) -> str:
|
||||
|
||||
def generate(projroot: str) -> None:
|
||||
"""Main entry point."""
|
||||
from batools.version import get_current_version
|
||||
import pdoc
|
||||
|
||||
# Make sure we're running from the dir above this script.
|
||||
@ -87,7 +88,11 @@ def generate(projroot: str) -> None:
|
||||
outdirname = (Path(projroot) / 'build' / 'docs_html').absolute()
|
||||
sys.path.append(str(pythondir))
|
||||
|
||||
version, build_number = get_current_version()
|
||||
|
||||
try:
|
||||
pdoc.render.env.globals['ba_version'] = version
|
||||
pdoc.render.env.globals['ba_build'] = build_number
|
||||
pdoc.render.configure(search=True,
|
||||
show_source=True,
|
||||
template_directory=templatesdir)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user