-
Notifications
You must be signed in to change notification settings - Fork 1.2k
WebHost: render setup guides and game info pages to html on server #4074
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ry" style function
|
I would honestly prefer to not merge/deploy this for 0.5.1 because this change might "break" apworlds and that would possibly either delay 0.5.1 further or leave apworld devs in a bad spot. |
…_remaining_markdown # Conflicts: # WebHostLib/misc.py # WebHostLib/static/assets/gameInfo.js # WebHostLib/static/assets/tutorial.js # WebHostLib/templates/gameInfo.html # WebHostLib/templates/tutorial.html
…et_file_safe_name
…es instead of spaces appearing in the titles
|
Huh, the unittests pass just fine for me locally. |
|
tests are still failing due to what looks like a similar initialization issue which from some local testing (read: deleting /WebHostLib/static/generated) the entire |
|
|
…_remaining_markdown # Conflicts: # WebHostLib/static/assets/gameInfo.js # WebHostLib/static/assets/tutorial.js
| "A guide for setting up A Hat in Time to be played in Archipelago.", | ||
| "English", | ||
| "ahit_en.md", | ||
| "setup_en.md", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did the old js... just ignore this? 👏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It did
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't test but code itself looks fine. I'd definitely prefer we added more docstrings and return typings but not necessarily in scope here.
should be fixed now |
Co-authored-by: Aaron Wagener <mmmcheese158@gmail.com>
…he change in md parsing in ArchipelagoMW#4074
|
with my commented bugfix and the (now linked) whitespace fixes to the hk docs I'm fine from a non-code review and from a world maintainer perspective with this change, One big gripe i have though is this removes the possibility to click on headers to get anchored links, |
Co-authored-by: qwint <qwint.42@gmail.com>
|
new problem, the anchor links to the relevant setup guides that the Supported Games create are not aligned with the ids the tutorial page gives them, similarly with spaces |
|
Fixed the anchors, it was as simple as telling markdown to load the extension we tried to configure. I feel like trying to set options for an extension that isn't loaded should at least raise a KeyError, but it is what is -.- |
|
Here is my mistune version: 829dac5 so it doesn't get lost in Discord. As far as I can see there is only 1 issue remaining: A noteworthy change to both the current PR and the current JS code is that the way the fragments/IDs are generated in the mistune hook would be compatible to GitHub, so if you look at a "relative link" (e.g. TOC) on GitHub it should behave the same once deployed. Why mistune? It seems to ship with sane features that mostly match GitHub, can be extended and is being maintained. The plugins I selected are the default, but I had to explicitly list them because we need raw HTML in some documents, which is disabled by default. Feel free to merge or copy-paste the changes or ask for a PR against this branch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did not look at black sliver's mistune option but updates have resolved all my previous issues with the PR
I still think not crashing the entire page if there is an apworld installed with a default webworld would be helpful but I don't mind getting outvoted on that because those worlds do fail unit tests



What is this fixing or adding?
Removes remaining CDN use, which means people with default uMatrix config can use the sites now, and in fact JS in general is not needed, allowing noscript users to also view the pages. As a result, I consider this a bugfix.
How was this tested?
locally
If this makes graphical changes, please attach screenshots.
Hopefully not, I didn't notice anything at least.