mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-02-03 05:53:15 +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,
|
newnode, playsound, printnodes, printobjects, pushcall, quit, rowwidget,
|
||||||
safecolor, screenmessage, scrollwidget, set_analytics_screen, charstr,
|
safecolor, screenmessage, scrollwidget, set_analytics_screen, charstr,
|
||||||
textwidget, time, timer, open_url, widget, clipboard_is_supported,
|
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._activity import Activity
|
||||||
from ba._plugin import PotentialPlugin, Plugin, PluginSubsystem
|
from ba._plugin import PotentialPlugin, Plugin, PluginSubsystem
|
||||||
from ba._actor import Actor
|
from ba._actor import Actor
|
||||||
|
|||||||
@ -9,19 +9,29 @@
|
|||||||
</a>
|
</a>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% if search %}
|
{% 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 %}
|
{% endif %}
|
||||||
</header>
|
</header>
|
||||||
<main class="pdoc">
|
<main class="pdoc">
|
||||||
<h1>header woo-hoo</h1>
|
<h1>Welcome to Ballistica Documentations!</h1>
|
||||||
Welcome to blah blah blah, some <b>bold</b> text, create an
|
<i>Last updated for Ballistica {{ ba_version }}
|
||||||
<a href="https://github.com/efroemling/ballistica/issues/">issue</a>
|
(build {{ ba_build }})</i>
|
||||||
if something in this docs feels incorrect or can be improved blah blah
|
<hr/>
|
||||||
<code>
|
<p>
|
||||||
some code hooray
|
Here you can find information about Python classes/functions
|
||||||
</code>
|
used by Ballistica.
|
||||||
<br/>
|
Fell free to create an
|
||||||
TODO: add some normal text here.
|
<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>
|
</main>
|
||||||
{% if search %}
|
{% if search %}
|
||||||
{% include "search.html.jinja2" %}
|
{% include "search.html.jinja2" %}
|
||||||
|
|||||||
@ -75,6 +75,7 @@ def parse_docs_attrs(attrs: list[AttributeInfo], docs: str) -> str:
|
|||||||
|
|
||||||
def generate(projroot: str) -> None:
|
def generate(projroot: str) -> None:
|
||||||
"""Main entry point."""
|
"""Main entry point."""
|
||||||
|
from batools.version import get_current_version
|
||||||
import pdoc
|
import pdoc
|
||||||
|
|
||||||
# Make sure we're running from the dir above this script.
|
# 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()
|
outdirname = (Path(projroot) / 'build' / 'docs_html').absolute()
|
||||||
sys.path.append(str(pythondir))
|
sys.path.append(str(pythondir))
|
||||||
|
|
||||||
|
version, build_number = get_current_version()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
pdoc.render.env.globals['ba_version'] = version
|
||||||
|
pdoc.render.env.globals['ba_build'] = build_number
|
||||||
pdoc.render.configure(search=True,
|
pdoc.render.configure(search=True,
|
||||||
show_source=True,
|
show_source=True,
|
||||||
template_directory=templatesdir)
|
template_directory=templatesdir)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user