Conversation
|
Looks great generally. |
1cad7c9 to
1258142
Compare
eb723f9 to
815d03a
Compare
|
My overal suggestion would be to see if we can:
How this would workI think we can have documentation for the CLI or think about webpage for RHOAS services. |
|
@wtrocki Thanks, I think this should work for the downstream. Would it be possible to tweak the file names and directories? Right now, it looks like all of the downstream command files and the readme are located in Could we also use the same directory structure and naming conventions that we currently use in modular-docs? That would mean:
|
|
What I have done in this PR is to enable us to use released version of rhoas cli to generate docs (with some of the work done before by @craicoverflow) So to answer your questions: all is possible by using cli command. I see next step to remove adoc documentation completely from main branch and replace it by markdown one. How donwstream job works? Does it clone our repository? Does it call some make targets etc? |
|
@bhardesty Please view https://github.com/redhat-developer/app-services-cli/tree/downstream-docs that is the new branch that contains freshly generated content based on this PR. |
| name: Modular docs publish | ||
| name: Downstream docs publish | ||
|
|
||
| # on: |
There was a problem hiding this comment.
This will be enabled once approved. We use other trigger for testing
| generate-docs: ## Generate command-line reference documentation | ||
| rm -rf ./docs/commands/* | ||
| go run ./cmd/rhoas docs --dir ./docs/commands --file-format adoc | ||
| go run ./cmd/rhoas docs --dir ./docs/commands --file-format md |
There was a problem hiding this comment.
Markdown by default - same rules as with adoc (already replaced in the PR).
Downstream gets adoc files that are pushed to separate branch that no one will see.
There was a problem hiding this comment.
tip: md is already the default value, so you could omit it, if you wanted to.
| @@ -0,0 +1,47 @@ | |||
| ## rhoas completion | |||
There was a problem hiding this comment.
Actually I will remove markdown files and generate them in separate PR
There was a problem hiding this comment.
This will obviously fail the build so I will generate docs as last step before merge :D
|
Also let me know if we need more categories for subcomands etc. - That will be trivial to add on the same levels. Nested levels in the index are separeate feature request :P |
|
Found small bug in links on github, but that part will go away anyway. |
| generate-docs: ## Generate command-line reference documentation | ||
| rm -rf ./docs/commands/* | ||
| go run ./cmd/rhoas docs --dir ./docs/commands --file-format adoc | ||
| go run ./cmd/rhoas docs --dir ./docs/commands --file-format md |
There was a problem hiding this comment.
tip: md is already the default value, so you could omit it, if you wanted to.
| rm -rf ./docs/commands/* | ||
| go run ./cmd/rhoas docs --dir ./dist --file-format adoc |
There was a problem hiding this comment.
Why is this removing ./docs/commands, but then generating the documentation into a completely different directory?
There was a problem hiding this comment.
Very good question. I think I need to provide documentation for that in the contributing to make it clear.
So the new workflow will split upstream and downstream:
-
We will have markdown ./docs/commands/ (./docs/commands/rhoas-cluster.md).
I did not push that markdown here due to number of files created that will obfuscate already large PR
Phase 2 for this would be to use that markdown with docusaurus website and create couple other placeholders like CLI guidelines etc. -
We will have adoc/downstream pushed to different branch (only on releases) - for that we use ./dist/ folder that is gitignored so we can use it to push entire content to the new branch using github action.
|
Done end to end:
|
|
@wtrocki This looks awesome! I just have one small modification: for each included file, can you change the leveloffset from 1 to 2? For example: |


Resolves #1225 #1226
Motivation
I have removed generate-modular docs and will have content generation.
I still have docs in the repository present
How to support downstream
I think we can have dedicated branch that can be updated on the release of the CLI that will have generated content that is very specific to downstream. Our upstream content then will not be used by downstream if needed.
Tasks