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

create shortcode for markdown tabs #872

Closed
wants to merge 1 commit into from

Conversation

titusfortner
Copy link
Member

I'm tempted to put this in draft because it's not the best way to do this, even though it works.

Current docsy theme forces tabs to have highlighting (google/docsy#550)
Would be nice if we could toggle that off on a per-tab basis.

Since I still can't wrap my head around go/hugo enough to do it the right way, I just copied this from the previous docsy implementation when they didn't have automatic highlighting.

I also added padding and a border, but that's about the extent of my design skills.

@titusfortner titusfortner requested a review from diemol December 11, 2021 04:09
@netlify
Copy link

netlify bot commented Dec 11, 2021

✔️ Deploy Preview for jovial-austin-42fe02 ready!

🔨 Explore the source changes: 5a43877

🔍 Inspect the deploy log: https://app.netlify.com/sites/jovial-austin-42fe02/deploys/61b42495ede5ce0008cecd1d

😎 Browse the preview: https://deploy-preview-872--jovial-austin-42fe02.netlify.app

@titusfortner
Copy link
Member Author

One of the big advantages of using something like this, imo, is that IntelliJ recognizes Ruby comments (#) as comments when it's inside 3 ticks, but thinks it is an h1 when it is just inside the tab, so it's much harder to work with the document.

Copy link
Member

@diemol diemol left a comment

Choose a reason for hiding this comment

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

This looks nice
image

Is it possible to remove the black border for the tab?

We can merge this, but also, could you please open a PR to docsy? It'd be nice to have this working upstream and then we just use it without having this custom code.

@titusfortner titusfortner marked this pull request as draft December 23, 2021 00:00
@titusfortner
Copy link
Member Author

I'm converting this to a draft, because I really want us to find a way to create a toggle for this behavior and make a PR to docsy. I don't like having to specify all the tabs in the tabpane with this PR, it just feels clunky.

I added the border because without the highlight background, it's really hard to see where the tab content ends. We could do an


instead. I set it to be an outset border, which makes it more pronounced at the bottom than the top because that's where it is needed.

@titusfortner
Copy link
Member Author

Closed in favor of #915

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