Skip to content

Feat/multitab blocks #239

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

Merged
merged 6 commits into from
Feb 1, 2023
Merged

Conversation

karthik2804
Copy link
Contributor

@karthik2804 karthik2804 commented Dec 19, 2022

This PR also includes the refactoring of the javascript into multiple files for easier maintenance.

Shortcodes need to be enabled in the frontmatter to use multitab.

enable_shortcodes = true

The markup to create tabs in markdown is as follows

{{ tabs "Os" }}

{{ startTab "Windows"}}

To list files on windows use `dir`

<!-- @selectiveCpy -->

\`\`\`bash
$ dir hello_fermyon
\`\`\`
and script in windows have the extension `.bat`

<!-- @nocpy -->

\`\`\`bash
hello.bat
test.bat
\`\`\`

{{ blockEnd }}

{{ startTab "Linux"}}

To list files on linux use `ls`

<!-- @selectiveCpy -->

\`\`\`bash
$ ls
\`\`\`

and script in windows have the extension `.sh`

<!-- @nocpy -->

\`\`\`bash
hello.sh
test.sh
\`\`\`

{{ blockEnd }}
{{ blockEnd }}

image
image

@flynnduism
Copy link
Contributor

@karthik2804 this is a great addition!

I added a separate issue #240 to raise the question of how best we could document how the formatting you outlined here (thanks for the example!) can be published for the developer who is writing & editing pages, it's not a blocker for this PR.

Copy link
Member

@mikkelhegn mikkelhegn left a comment

Choose a reason for hiding this comment

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

Only approving the description and example. I have not tested the code, nor read it. Consider adding a reviewer to review the JS code.

@flynnduism
Copy link
Contributor

@karthik2804 I've reviewed the JS changes and it LGTM!

In package.json the task that bundles the scripts is using parcel watch > this should be parcel build to avoid those console errors on pageload. Once that's in place I think this is all good to merge.

@flynnduism flynnduism self-requested a review January 9, 2023 15:45
karthik2804 and others added 5 commits February 1, 2023 13:04
Signed-off-by: karthik Ganeshram <karthik.ganeshram@fermyon.com>
Signed-off-by: flynnduism <ronan@fermyon.com>
Signed-off-by: karthik Ganeshram <karthik.ganeshram@fermyon.com>
Signed-off-by: flynnduism <ronan@fermyon.com>
Signed-off-by: karthik Ganeshram <karthik.ganeshram@fermyon.com>
Signed-off-by: flynnduism <ronan@fermyon.com>
Signed-off-by: karthik Ganeshram <karthik.ganeshram@fermyon.com>
Signed-off-by: karthik Ganeshram <karthik.ganeshram@fermyon.com>
Signed-off-by: karthik Ganeshram <karthik.ganeshram@fermyon.com>
@tpmccallum tpmccallum merged commit 69cf2f8 into fermyon:main Feb 1, 2023
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.

4 participants