🐛 fix doc plugin build fail

This commit is contained in:
yanyongyu 2022-01-08 19:36:19 +08:00
parent 304118c98e
commit 95415659ce
3 changed files with 4 additions and 3 deletions

View File

@ -7,7 +7,7 @@
"scripts": { "scripts": {
"archive": "yarn workspace nonebot docusaurus docs:version", "archive": "yarn workspace nonebot docusaurus docs:version",
"build": "yarn workspace nonebot build", "build": "yarn workspace nonebot build",
"build:plugin": "cross-env BASE_URL='/docs/' yarn workspace nonebot build", "build:plugin": "cross-env BASE_URL='/website/' yarn workspace nonebot build",
"start": "yarn workspace nonebot start", "start": "yarn workspace nonebot start",
"serve": "yarn workspace nonebot serve", "serve": "yarn workspace nonebot serve",
"clear": "yarn workspace nonebot clear", "clear": "yarn workspace nonebot clear",

View File

@ -20,7 +20,8 @@ def init():
if host in ["0.0.0.0", "127.0.0.1"]: if host in ["0.0.0.0", "127.0.0.1"]:
host = "localhost" host = "localhost"
logger.opt(colors=True).info( logger.opt(colors=True).info(
f"Nonebot docs will be running at: " f"<b><u>http://{host}:{port}/docs/</u></b>" f"Nonebot docs will be running at: "
f"<b><u>http://{host}:{port}/website/</u></b>"
) )

View File

@ -9,4 +9,4 @@ def register_route(driver: Driver):
static_path = str((Path(__file__).parent / ".." / "dist").resolve()) static_path = str((Path(__file__).parent / ".." / "dist").resolve())
app.mount("/docs", StaticFiles(directory=static_path, html=True), name="docs") app.mount("/website", StaticFiles(directory=static_path, html=True), name="docs")