-
Notifications
You must be signed in to change notification settings - Fork 67
Fix documentation generation #416
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
| --github_url https://github.com/mongodb/mongo-swift-driver | ||
| --theme fullwidth | ||
| --documentation "Guides/*.md" | ||
| --github-file-prefix https://github.com/mongodb/mongo-swift-driver/tree/v${version} |
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.
this makes it so, if someone clicks one of the "view on github" links in the docs, it will take them to the place the code was at the time of the tag, rather than on master.
docs/index.html
Outdated
| </body> | ||
| </div> | ||
| </html> | ||
| <html><head><meta http-equiv="refresh" content="0; url=mongoswift/index.html" /></head></html> |
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.
copied from NIO. this makes it so if you go to the main documentation URL it forwards you to the MongoSwift docs main page (which has the README listing the modules).
patrickfreed
left a comment
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.
I only have a Linux machine with me right now, so I can't verify what everything looks like. That said, it all seems good to me besides one small typo in the development guide.
Guides/Development.md
Outdated
| Our documentation site is automatically generated from the source code using [Jazzy](https://github.com/realm/jazzy#installation). We regenerate it via our release script each time we release a new version of the driver. | ||
|
|
||
| If you'd like to preview how new documentation you've written will look when published, you can regenerate it by running `make documentation` and then inspecting the generated HTML files in `/docs`. | ||
| If you'd like to preview how new documentation you've written will look when published, you can regenerate it by running `.etc/generate-docs.sh` and then inspecting the generated HTML files in `/docs`. |
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.
typo: should be ./etc/generate-docs.sh
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.
good catch, fixed
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.
I think you forgot to push the commit
kmahar
left a comment
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.
oh duh, I even saw you pack that laptop lol. trying to upload a zip file of the docs here and failing so I'll slack to you...
Guides/Development.md
Outdated
| Our documentation site is automatically generated from the source code using [Jazzy](https://github.com/realm/jazzy#installation). We regenerate it via our release script each time we release a new version of the driver. | ||
|
|
||
| If you'd like to preview how new documentation you've written will look when published, you can regenerate it by running `make documentation` and then inspecting the generated HTML files in `/docs`. | ||
| If you'd like to preview how new documentation you've written will look when published, you can regenerate it by running `.etc/generate-docs.sh` and then inspecting the generated HTML files in `/docs`. |
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.
good catch, fixed
patrickfreed
left a comment
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.
the rendered documentation looked good, but since Linux filesystems are case-sensitive, I needed to change the mongoswift/index.html to MongoSwift/index.html to get it to work.
Guides/Development.md
Outdated
| Our documentation site is automatically generated from the source code using [Jazzy](https://github.com/realm/jazzy#installation). We regenerate it via our release script each time we release a new version of the driver. | ||
|
|
||
| If you'd like to preview how new documentation you've written will look when published, you can regenerate it by running `make documentation` and then inspecting the generated HTML files in `/docs`. | ||
| If you'd like to preview how new documentation you've written will look when published, you can regenerate it by running `.etc/generate-docs.sh` and then inspecting the generated HTML files in `/docs`. |
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.
I think you forgot to push the commit
|
pushed the commit from before, and also updated the path in |
docs/README.md
Outdated
|
|
||
| The MongoDB Swift driver contains two modules: | ||
|
|
||
| - [MongoSwift](../mongoswift/index.html), containing an asynchronous API and a BSON library |
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.
Oh I just realized these may need to be updated too. Otherwise lgtm
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.
fixed
This adds a new script which handles generating documentation for both of our modules along with a pretty bare bones index page containing links to both.
It is very likely that this script does not work on Linux. A lot of the extra stuff in the SwiftNIO script is for that. But I don't want to hold up the release on getting the script to work there so I've left it out for now.
FYI: A follow up commit will be needed that cleans up everything in the
docs/directory besides the newREADME.mdand the editedindex.html, but I figured I would just merge that in directly after this, rather than cluttering up the PR.If you want to check out how all this looks locally I would suggest doing that deletion manually and then running the script.