Fix tutorials route to pass correct template variables
This commit is contained in:
parent
d072d7ccad
commit
427dfcb669
|
|
@ -528,13 +528,14 @@ def tutorials():
|
||||||
|
|
||||||
@web_bp.route("/tutorials/<path:path>", endpoint="tutorials_path")
|
@web_bp.route("/tutorials/<path:path>", endpoint="tutorials_path")
|
||||||
def tutorials_path(path: str):
|
def tutorials_path(path: str):
|
||||||
from .docs_content import get_doc
|
from .docs_content import get_doc, get_toc
|
||||||
doc = get_doc(path)
|
doc = get_doc(path)
|
||||||
if doc:
|
if doc:
|
||||||
return render_template(
|
return render_template(
|
||||||
"pages/docs.html",
|
"pages/docs.html",
|
||||||
doc=doc,
|
page=doc,
|
||||||
toc=None, # No sidebar for tutorial pages
|
toc=get_toc(),
|
||||||
|
current_path=path,
|
||||||
)
|
)
|
||||||
return render_template(
|
return render_template(
|
||||||
"pages/content.html",
|
"pages/content.html",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue