Skip to content

Commit

Permalink
move editing to homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
nyxical420 committed Nov 28, 2023
1 parent 990a410 commit 3f0db20
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 85 deletions.
2 changes: 1 addition & 1 deletion assets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ body::-webkit-scrollbar-track {

@font-face {
font-family: 'Starbound';
src: url('https://raw.githubusercontent.com/Bus-Simulator/wiki/main/assets/fonts/Starbound.ttf');
src: url('https://frostbitten-wiki.github.io/bussim/assets/fonts/Starbound.ttf');
}


Expand Down
65 changes: 0 additions & 65 deletions editing/learn-the-basics.html

This file was deleted.

15 changes: 0 additions & 15 deletions jinjadata/editing.json

This file was deleted.

6 changes: 2 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@
from uvicorn import run

app = FastAPI(
title="Bus Simulator Community Wiki Editor",
description="FastAPI server for creating edits to the wiki.",
docs_url=None,
redoc_url=None
)

@app.get("/bussim/{wikipath:path}")
@app.get("/{any}/{wikipath:path}")
async def wiki(request: Request, wikipath: str = ""):
if wikipath == "": wikipath = "home"
html = open(f"./{wikipath}.html", "r")
Expand All @@ -36,7 +34,7 @@ async def wiki(request: Request, wikipath: str = ""):

return HTMLResponse(content=rendered_html)

@app.get("/bussim-assets/{filepath:path}") # simulate asset proxy form wiki.wolfdo.gg/bussim-assets/
@app.get("/{any}-assets/{filepath:path}") # simulate asset proxy form wiki.wolfdo.gg/<repo>-assets/
async def assets(filepath: str):
return FileResponse(f"./assets/{filepath}")

Expand Down

0 comments on commit 3f0db20

Please sign in to comment.