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
Improve developer experience for previewing docs in development #843
Conversation
There is no documentation on how to preview the docs in development. It turns out that it requires installing an npm package globally, navigating to a directory, and running a command. The `@next` version of that npm package, gitdocs, is currently broken, so even if someone knew all the steps to preview the docs, it's likely they would hit an error. This change does a few things to help make previewing docs in development a less painful experience: 1. It adds `gitdocs` as a dev dependency so that we can control the version so we can ensure it works and is compatible with our configs. 2. It adds a Yarn script so that serving the docs is a one liner for developers and easily configurable if we need to change the implementation in the future. 3. It adds documentation about how to preview the docs. vectordotdev/gitdocs#156 (comment) #819 (comment)
@jessleenyc @maestromac can you give this a review? |
@nholden I can't figure out why but for some reason, having gitdoc as a dependency is failing our deployment. I ran this build twice and both time fail with the same error. The subsequent build with gitdoc removed passed 🤷♂️. |
@maestromac Do we have a way of checking what the |
@nholden Thank you for pointing that out! We have assumed that Rails would automatically set |
@maestromac No problem, and thanks for following up! I'm not sure what dev.to's deployment to Heroku looks like, but I believe if you include the |
Hey @nholden sorry to ping you again. I've tried to add Gitdoc back but the CI keep failing. Want to give you a heads up that I might not have it as a dependency and revert the package.json changes. |
No worries! That's a bummer that CI isn't working. It looks like Travis is still installing Yarn If we exhaust all options for including Gitdoc as a dependency, maybe we could consider writing a script outside of Yarn that installs Gitdoc, navigates to the right directory, and runs |
What type of PR is this?
Description
There is no documentation on how to preview the docs in development. It turns out that it requires installing an npm package globally, navigating to a directory, and running a command. The
@next
version of that npm package,gitdocs
, is currently broken, so even if someone knew all the steps to preview the docs, it's likely they would hit an error.This change does a few things to help make previewing docs in development a less painful experience:
gitdocs
as a dev dependency so that we can control the version and ensure it works with our configs.Desktop Screenshot
Added to documentation?
What gif best describes this PR or how it makes you feel?