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

Handle docs/ignore shortcode, removing need for the include directive. #49

Merged
merged 4 commits into from
Jul 3, 2024

Conversation

jdbaldry
Copy link
Member

@jdbaldry jdbaldry commented Jul 2, 2024

Remove the shortcode markers from the parent block and keep the raw Markdown within.

The implementation turned out to be more complicated than expected because the raw Killercoda Markdown within breaks the CommonMark parser (fenced code blocks must end without an action).
You can see this also when GitHub tries to render Killercoda Markdown.

This also removes the include directive so we'll need to remove that from the source anywhere it's used.

The linked documentation is being added in grafana/writers-toolkit#770.

Signed-off-by: Jack Baldry jack.baldry@grafana.com

jdbaldry added 3 commits July 2, 2024 09:26
Remove the shortcode markers from the parent block.
The implementation turned out to be more complicated than expected because the raw Killercoda Markdown within breaks the CommonMark parser (fenced code blocks must end without an action).
You can see this also when GitHub tries to render the Killercoda Markdown.

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
@jdbaldry jdbaldry marked this pull request as ready for review July 2, 2024 12:27
@jdbaldry jdbaldry requested a review from Jayclifford345 as a code owner July 2, 2024 12:27
@Jayclifford345
Copy link
Collaborator

Just had a though:
If we wanted to keep the new docs syntax but remove the syntax that is breaking pretty

{{exec}}

Could we just make it a requirement to keep using the:

<!-- INTERACTIVE exec START --> 

So then the new syntax would look like this

  {{< docs/ignore >}}
  ### Back to Docs
  Head back to wear you started from to continue with the Loki documentation: [Loki documentation](https://grafana.com/docs/loki/latest/send-data/alloy)
  <!-- INTERACTIVE exec START --> 
     ```bash 
     docker-compose -f loki-fundamentals/docker-compose.yml up -d 
     ```
  <!-- INTERACTIVE exec END --> 
  {{< /docs/ignore >}}

that way we are still compliant with pretty but also remove the comment syntax for each row?

@Jayclifford345
Copy link
Collaborator

Notes from David:

  • Should we name the shortcode name: {{< interactive/only >}}
  • could we make all bash blocks executable by default (Smart defaults with overridable behaviours)
  • North star can we generate 90% conversion through just adding start, page and finish tags

Copy link
Collaborator

@Jayclifford345 Jayclifford345 left a comment

Choose a reason for hiding this comment

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

LGTM

@Jayclifford345 Jayclifford345 merged commit f96bf73 into staging Jul 3, 2024
2 checks passed
@jdbaldry jdbaldry deleted the jdb/2024-07-ignore-shortcode branch August 30, 2024 10:10
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.

2 participants