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 documentation command #63

Merged
merged 4 commits into from
Mar 23, 2021
Merged

Add documentation command #63

merged 4 commits into from
Mar 23, 2021

Conversation

Crevil
Copy link
Member

@Crevil Crevil commented Mar 22, 2021

This change set contains a new documentation command.

$ shuttle docs --project examples/moon-base
Documentation available at: https://github.com/lunarway/shuttle

It will open up documentation for the used shuttle plan. If a plan specifies a
top level "documentation" field, that is used. If not available the plan
reference is parsed and a URL is inferred.

The command will open the found URL respecting the BROWSER environment variable
and falling back to OS specific ways of "opening" URLs.

Closes #49 as the issue was minded on easy access to the plan's documentation.
Also closes #7 as we cannot rely on docs only being available in a plans
README.md. As an example, in Lunar we document plans with MkDocs and publish
them to Backstage.io.

This change set contains a new documentation command.

    $ shuttle docs --project examples/moon-base
    Documentation available at: https://github.com/lunarway/shuttle

It will open up documentation for the used shuttle plan. If a plan specifices a
top level "documentation" field, that is used. If not available the plan
reference is parsed and a URL is inferred.

The command will open the found URL respecting the BROWSER environment variable
and falling back to OS specific ways of "opening" URLs.
@Crevil Crevil requested a review from a team March 22, 2021 20:13
@Crevil Crevil marked this pull request as ready for review March 22, 2021 20:13
Copy link
Member

@mahlunar mahlunar left a comment

Choose a reason for hiding this comment

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

Awesome. Only a few smal findings.

pkg/config/documentation.go Outdated Show resolved Hide resolved
pkg/config/documentation_test.go Outdated Show resolved Hide resolved
@Crevil Crevil enabled auto-merge (squash) March 23, 2021 07:32
@Crevil Crevil disabled auto-merge March 23, 2021 07:32
@Crevil Crevil enabled auto-merge (squash) March 23, 2021 07:32
@Crevil Crevil merged commit ebbd3d2 into master Mar 23, 2021
@Crevil Crevil deleted the feature/docs-command branch March 23, 2021 07:32
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.

Command to open plan repository Support rich plan readme's in terminal using markdown
2 participants