-
Notifications
You must be signed in to change notification settings - Fork 475
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
Added: MkDocs documentation #856
Conversation
837ddf1
to
24c25b8
Compare
Whoa.. there's a lot here. At a quick glance this is awesome, thank you for taking the time to do this! I'll have to spend some time with this PR to understand it better. In the meantime, I do have a small question. noticed the docs/links are https://goss.rocks/... any suggestions on best way to host this. I sit github pages or something else? |
To me, you have 2 choices:
Support for both is included in this PR, once you have chosen, I'll remove the part not needed. I used both, and I would say that in the current case, the only diff would be that readthedocs allows previewing PRs and then it's only personal taste. Note: for github pages, I talk about the new "deploy with a workflow" way, not the legacy "gh-pages branch" way
Run |
(I used GH pages via workflow and I never got preview working. That was a major downside in that context since it raised the bar for docs contributions) |
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'd like to thank you for your excellent contribution, this is brilliant work and I'm really grateful you've done it!
Some of my comments are absolutely things we/I can collectively follow on after this PR.
I lean to RTD hosting over GH pages.
I'll await @aelsabbahy check-in before approve.
24c25b8
to
8dd4f7f
Compare
PR updated with review suggestions and fixes. For some, I added an explanation on why it is done like that (either directly in the source code, either as answer in the comment, either both). It still has both Github Pages and ReadTheDocs support workflows until a decision is taken. Note that if preview is not yet available in Github Pages, it is planned to and already merged in their codebase (cf. https://github.com/orgs/community/discussions/7730 and actions/deploy-pages#61). Note: I took the liberty to mark suggestions as resolved when there is nothing more to discuss, in order to be able to focus on the remaining discussions. Suggestion: Enable Github actions for contribs or it will be hard to review the docs workflow for this PR and harder for contributors to detect issues on their contribution. I saw in #786 that you started migrating to Github Actions but fear to enable it (while you already have TravisCI running for every PR). I would suggest to enable it and enable maintainers to approve first time contributors workflow run. You can also ask maintainers to approve each workflow run if you want. Just know that (I say that as someone which is contributing to lots of projects daily) not having the CI run will make you lose contributors:
(it is often than I submit a fix, the maintainer approve the CI run weeks later and I already moved to something else, changed project or just don't remember the change and so don't have the motivation to get back to it) Note: I have quite an expertise on Github Actions (this is literally my current daily job and the expertise I sell to companies) and I can help to migrate the Travis CI to it in another PR if you want. |
I appreciate the time you have invested and your explanations; thank you! re: GHA - yes, I'd like to migrate from Travis. I'm pretty familiar with GHA as well; productivity focused day-job. I lament buildkite does not offer build machines for OSS. Totally agree on "CI needs to feed back to contributors" points. I believe GH won't execute a new workflow until the file arrives in main. How I've done that before is to separate the CI addition from the code-to-integrate addition. I could pull the workflow in via a different branch and you could rebase; what're your thoughts? (Obviously the workflow will fail on main until this PR lands) |
+1, many thanks for the time spent on this, this is awesome! Gh pages vs readthedocs.. I don't have a strong preference here as I don't have much experience with either. I'll defer to @petemounce and @ripienaar if they have a preference. Travis vs GHA, I'm definitely in favor of migrating to GHA. I have to email Travis every now and then to get more free OSS credits.. which isn't a fun experience. I worry one day they may stop supporting OSS completely. There's a bit of nuance to the way the Goss tests run (systemd in docker, osx, etc.) If that can all work on GHA great.. if not.. then the heavily black box approach using e2e tests may have to be re-evaluated. |
Please notify me when this PR is ready to go.. or waiting on me. This way I can start looking at all the account, hosting, repo settings needed and make the changes. Again, many thanks for taking on this large effort. |
Hello, hope all is well. Just checking back in to make sure I'm not the blocker. Is this PR waiting on me for anything? |
Hi 👋🏼 |
b97116c
to
729b986
Compare
PR updated:
So it should be ready and will remain:
And that's all I think, you should have a new website after that 🎉 |
Awesome, thanks for the update.. I'll try to get around to this as soon as possible. I just had a newborn so life is a bit hectic, but this PR will be my priority when my time frees up. This is amazing work, thank you so much for taking the time to do this. |
Congratulations!! |
729b986
to
6025537
Compare
Late congratulations !!! Enjoy, your newborn is more important than this PR ! PR has been rebased and conflict solved, just in case you find time to merge. You can activate the readthedocs part later if you want to merge ASAP, so people can't contribute to the split documentation to avoid conflicts. |
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.
StillLGTM!
Yeah, that sounds good. Going to merge this. I'll probably reach out to you in the coming weeks to finalize the readthedocs part of this if I have any questions. Thank you for the hard work on this, this is awesome and has been requested for a while. |
Do you have the previous commit that uses GitHub pages by any chance? If the commit exists somewhere in your repo can you drop a link on here if it's not too much trouble. Mostly asking for my own education/growth. |
After merging, I see the following CI error: https://github.com/goss-org/goss/actions/runs/8087101681 |
Checklist
make test-all
(UNIX) passes. CI will also test thisDescription of change
This PR implements #853:
docs/manual.md
into multiple files and format them.markdownlint.yaml
and.editorconfing
to hint/preconfigure editors supporting it.readthedocs.yaml
settings file to build and publish on readthedocs.ioMakefile
recipes for documentationgoss.rocks
Documentation site comes with built-in search, pretty deep links and a lot of other features (that may be added or adjusted later on demand).
Choices
As this is a first iteration, many choices have been made. Most of them can be changed now or later.
MkDocs + Material
The documentation engine is MkDocs with the Material for MkDocs plugin/theme.
Documentations pages (except READMEs, cf. Existing READMEs) have been crafted with this in mind:
So Mkdocs+Material special syntaxes (ex: admonitions) have been prioritized over raw Markdown ones when they bring readability
ReadTheDocs vs. GitHub Pages
It is possible to publish the documentation on both readthedocs.io or GitHub Pages.
I used both solution and for this project I chose readthedocs because:
While ReadTheDocs supports versioning and internationalization, I chose a single version strategy because:
goss
is a CLI first and not a library (meaning there shouldn't be huge breaking changes)The idea is to create an account, use the
goss
slug for this project and use a use thegoss.rocks
domain as custom domain.I can help if wanted (you can add co-maintainers on any project in the
Admin > Maintainers
section).Python tooling
As it is not a Python project but a Go one, Python tooling has been kept minimal.
No project manager, only a requirement file in
docs/requirements.pip
.Documentation tasks for local dev have been added to the
Makefile
.You can:
make docs/serve
.make docs
.If not virtualenv is detected, one will be created for you in
.venv
Existing READMEs and benchmarks
Existing READMEs have been keep. They are included with the Snippet plugin when required.
For the main
README
, Snippets sections have been used to be able to includes parts and spread them in the documentation.It is most probable that they will evolve later with usage (and feeling),
especially for the main README, where some section may move into the documentation and just be linked in the README.
One reason for moving those content in the documentation: you don't have the same level of tooling and formatting for files shared between GitHub Markdown and MkDocs.
The Benchmarks have not moved into the documentation, as it hasn't been touched since 2016.
I think that having a documentation site should lead to disabling the Wiki. If benchmarks are up-to-date and should be published, I can move them into the documentation site.
Examples
Examples have been left untouched, mostly because I wasn't able to find where they are documented or used.
I see those:
examples
directorydocs/goss.yaml
,docs/vars.yaml
,docs/myapp_gossfile.yaml
anddocs/rendered_goss.yaml
They could be grouped into the
docs/examples
or the rootexamples
directories and used/show-cased into the documentation.Changelog
The
changelog
page has been created and just link to the GitHub releases.GitHub Actions workflow
I took the liberty to add a basic workflow for PR touching the documentation, it will just:
No need to have a "build documentation" workflow as readthedocs should take care of if for you when importing the project and then allows you to fine tune it in a few clicks
Branding
For the moment, colors are very neutral, for both light and dark mode (black header, white or black background depending on the mode). The logo and favicon are the default ones. CSS is minimalist (just used for the platforms support matrix rendering).
It is however possible to customize everything, and in particular the home page if you want to make a landing page like the Material for MkDocs one.
Scripts and schemas
Schema file has been renamed to have a clean URL (should be available on
https://goss.rocks/schema.yaml
).In practice, you can expose any static file on the site, including the installation script.
Containers
While
dgoss
,dcgoss
andkgoss
have a special status, they are part of the project but not officially distributed with it, I chose to include their READMEs as documentation is a "Containers" subsection has I spent a lot of time searching for them and going back and forth between themanual.md
anddgoss
README. I believe this will also be helpful for lots of people.FAQ
I did not yet include a FAQ section has I didn’t have any initial content.
Anyway, adding this section later if required should be easy now.
Editors hinting/settings
The
.editorconfig
will allows editors supporting it to have the proper indentation preconfigured.The
.markdownlint.yaml
will do the same for the formatting and lint rules (most editors will automatically read it and provide either autoformatting, built-in linting/highlighting and preconfigured snippets).Note that markdown files have been formatted to comply with those.
Typos
I tried to fix some of them but given I redacted some content, I apologize d by advance for those I introduced.
Maybe some day it should be worth to add pre-commit with CodeSpell to either automatically fix them or prevent their introduction.
Preview / try
You can preview the documentation site locally (because readthedocs and the preview on pull-request is not yet enabled)
by the checking out this branch and run
make docs/serve
. However, I can provide screenshots or a zipped site if needed.In the meantime, just a screenshot to tease:
Now I am waiting for your feedback and questions @aelsabbahy and @petemounce.
Sure it won't be perfect from the start (documentation is a long run) but I think this should be a huge step forward. WDYT ?