-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
fix(docs): handle fields
examples with md_in_html
#12465
Merged
terrytangyuan
merged 1 commit into
argoproj:main
from
agilgur5:fix-docs-fields-examples-markdown
Jan 5, 2024
Merged
fix(docs): handle fields
examples with md_in_html
#12465
terrytangyuan
merged 1 commit into
argoproj:main
from
agilgur5:fix-docs-fields-examples-markdown
Jan 5, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- previously this used a hacky script, `hack/parse_examples.go` to make markdown work inside of the HTML `details` element - this hack is not run on RTD's build system, and so that meant the markdown ended up rendered as raw text - instead of using hacky workarounds, use the `md_in_html` extension for `mkdocs`, which will render the markdown inside of the `details` elements correctly - just need to add a `markdown` attribute to the `details` element per https://squidfunk.github.io/mkdocs-material/setup/extensions/python-markdown/#markdown-in-html - this should also work on RTD seamlessly, as it's not a Go script exclusive to our `Makefile` - also remove new line that added too much space and is no longer necessary - might've been necessary with the hack as I don't remember it creating extra space before - also make sure extensions are alphabetized - `pymdownx.details` should be before `pymdownx.superfences` Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
agilgur5
added
area/docs
Incorrect, missing, or mistakes in docs
area/build
Build or GithubAction/CI issues
labels
Jan 4, 2024
jmeridth
approved these changes
Jan 4, 2024
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.
LGTM
terrytangyuan
approved these changes
Jan 5, 2024
jmeridth
added a commit
to jmeridth/argo-workflows
that referenced
this pull request
Jan 5, 2024
Includes fixes from argoproj#12464, argoproj#12466, argoproj#12465 - all authored by @agilgur5 Includes files list from argoproj#12414 description Signed-off-by: jmeridth <jmeridth@gmail.com> Co-authored-by: Anton Gilgur <agilgur5@gmail.com>
jmeridth
added a commit
to jmeridth/argo-workflows
that referenced
this pull request
Jan 5, 2024
Includes fixes from argoproj#12464, argoproj#12466, argoproj#12465 - all authored by @agilgur5 Includes files list from argoproj#12414 description Signed-off-by: jmeridth <jmeridth@gmail.com> Co-authored-by: Anton Gilgur <agilgur5@gmail.com>
jmeridth
added a commit
to jmeridth/argo-workflows
that referenced
this pull request
Jan 5, 2024
Includes fixes from argoproj#12464, argoproj#12466, argoproj#12465 - all authored by @agilgur5 Includes files list from argoproj#12414 description Signed-off-by: jmeridth <jmeridth@gmail.com> Co-authored-by: Anton Gilgur <agilgur5@gmail.com>
7 tasks
isubasinghe
pushed a commit
to isubasinghe/argo-workflows
that referenced
this pull request
Feb 27, 2024
Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
isubasinghe
pushed a commit
to isubasinghe/argo-workflows
that referenced
this pull request
Feb 27, 2024
Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
isubasinghe
pushed a commit
to isubasinghe/argo-workflows
that referenced
this pull request
Feb 27, 2024
Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
isubasinghe
pushed a commit
to isubasinghe/argo-workflows
that referenced
this pull request
Feb 28, 2024
Signed-off-by: Anton Gilgur <agilgur5@gmail.com> Signed-off-by: Isitha Subasinghe <isubasinghe@student.unimelb.edu.au>
isubasinghe
pushed a commit
to isubasinghe/argo-workflows
that referenced
this pull request
May 6, 2024
Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/build
Build or GithubAction/CI issues
area/docs
Incorrect, missing, or mistakes in docs
prioritized-review
For members of the Sustainability Effort
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #12453
Motivation
previously this used a hacky script,
hack/parse_examples.go
to make markdown work inside of the HTMLdetails
elementinstead of using hacky workarounds, use the
md_in_html
extension formkdocs
, which will render the markdown inside of thedetails
elements correctlyMakefile
Modifications
add a
markdown
attribute to thedetails
element inhack/docgen.go
per https://squidfunk.github.io/mkdocs-material/setup/extensions/python-markdown/#markdown-in-htmlremove
hack/parse_examples.go
and all references to itplus make sure extensions are alphabetized
pymdownx.details
should be beforepymdownx.superfences
Verification
make codegen
(make docs/fields.md
more specifically) to get the changes todocs/fields.md
that are here in this diffmkdocs build --strict
to replicate the RTD build (i.e. notmake docs
)open site/fields/index.html
and verified the examples worked correctly as in below screenshot:Before:
After:
Still works properly inside of GH Markdown as well -- see rendered MD on this PR