-
-
-
-
-
- Learn the Basics of Editing - Bus Simulator Community Wiki
-
-
-
-
-
-
-
-
-
-
-
-
-
- Editing: Learn the Basics
- Welcome, future contributor! This is the Part 1 of the Editing Guide. This part introduces some basic understanding on how to edit a Wiki Page with HTML, including how to properly create sections, and other stuff.
-
-
-
- Before we start...
- An Github Account is required in order to create edits via the online editor, vscode.dev and to keep your unsaved work.
- Forking the entire Bus Simulator Wiki Repository (click here to fork) is required in order to create your own Wiki Sandbox, and for you to create Pull Requests to the. A Pull Request is a way for us to see your edits on the Wiki and if we approve your changes or not.
-
-
-
- Basic Editing
- To start editing, you must fork the entire wiki to your Github Account. Click here to fork the Wiki Repository to your Github Account.
- Alright, now that you have forked the entire Wiki Repository, you can now start editing via the Online Editor: https://vscode.dev/github/[your_username]/bussim
- Now that you have the editor open, we will start by editing one .html file, remember that it can be any .html file you want to edit!
-
-
-
-
diff --git a/jinjadata/editing.json b/jinjadata/editing.json
deleted file mode 100644
index 1c429843..00000000
--- a/jinjadata/editing.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "rules": [
- ["No Misinformative or Unrelated Content", "You many not create edits that could be misinformative and/or not related to the wiki content. Always keep the wiki content informative and related."],
- ["No off-site Redirects", "You many not link a Reference to an off-site website not inside the wiki.wolfdo.gg domain."],
- ["No Vandalism", "You may not vandalize the wiki content. Even on the source of the wiki content. (like HTML comments)"],
- ["Always add Attributions/Sources", "If you ever add new or copied Information to a Wiki, always add Attributions/Sources at the very bottom of the Wiki Page."],
- ["Placeholder", "Placeholder"]
- ],
-
- "guideLinks": [
- ["learn-the-basics", "Part 1: Learn The Basics", "Learn how to Edit a Wiki Page!"],
- ["jinja2-templating", "Part 2: Learn Jinja2 Templating", "Learn how to use Jinja2 Templating on a Wiki Page!"],
- ["saving-edits", "Part 3: Saving Wiki Changes", "Learn how to Save your Changes on a Wiki Page!"]
- ]
-}
\ No newline at end of file
diff --git a/main.py b/main.py
index e120e00e..ff10464e 100644
--- a/main.py
+++ b/main.py
@@ -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")
@@ -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/-assets/
async def assets(filepath: str):
return FileResponse(f"./assets/{filepath}")