Skip to content
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

Add '-web-documentation' to start a simple web server with documentation #922

Merged
1 commit merged into from
May 18, 2022

Conversation

2bllw8
Copy link
Contributor

@2bllw8 2bllw8 commented May 15, 2022

Add a web documentation handler to provide documentation for easy consultation.

  • /documentation: home page with all links
  • /documentation/handbook: html version of the gm handbook
  • /documentation/gacha: json document with the gacha mappings

More pages can be easily added

Description

Issues fixed by this PR

Type of changes

  • Bug fix
  • New feature
  • Enhancement
  • Documentation

Checklist:

  • My code follows the style guidelines of this project
  • My pull request is unique and no other pull requests have been opened for these changes
  • I have read the Contributing note and Code of conduct
  • I am responsible for any copyright issues with my code if it occurs in the future

@memetrollsXD
Copy link
Member

Why would there be a need for a built in documentation webserver if there's already the Grasscutter wiki and other resources?

@4Benj
Copy link
Member

4Benj commented May 15, 2022

Why would there be a need for a built in documentation webserver if there's already the Grasscutter wiki and other resources?

^^^
and why create a new server when you can use the Http/Dispatch server

@2bllw8
Copy link
Contributor Author

2bllw8 commented May 15, 2022

Why would there be a need for a built in documentation webserver if there's already the Grasscutter wiki and other resources?

A web documentation unlike the wiki can give the exact information for the running version (maybe the version being used is old and the wiki has newer information that do not work on older version or vice versa).

Moreover for example if the available commands change (for example some are disabled in a specific server instance) a live version of the documentation can reflect the changes immediately

@ghost ghost requested a review from KingRainbow44 May 15, 2022 21:20
@mcxiaoke
Copy link

mcxiaoke commented May 16, 2022

attach the DocumentationServerHandler to current http server , you can serve online docs when server running at / or /docs/, no extra command needed.

httpServer.addRouter(DocumentationServerHandler.class); // just add one line in Grasscutter.java

@2bllw8
Copy link
Contributor Author

2bllw8 commented May 16, 2022

attach the DocumentationServerHandler to current http server , you can serve online docs when server running at / or /docs/, no extra command needed.

httpServer.addRouter(DocumentationServerHandler.class); // just add one line in Grasscutter.java

Ok will update to do this, thanks 👍

Copy link
Member

@KingRainbow44 KingRainbow44 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolve Benj's request first

- '/documentation': home page with all links
- '/documentation/handbook': html version of the gm handbook
- '/documentation/gachamapping': json document with the gacha mappings
@ghost ghost merged commit a2d5b93 into Grasscutters:development May 18, 2022
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants