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

Added Github card #335

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Fabrizz
Copy link
Contributor

@Fabrizz Fabrizz commented Dec 9, 2024

What kind of changes does this PR include?

Description

  • Added the remark plugin to handle leaf directives for the Github card. (Using the refractored remark-admonitions.ts as a template, no new deps)
  • Added the css to handle the card + inlined the icons
  • The card loads with a pulsating skeleton, when the content is fetched it gets populated. If it cant reach the Github API (connection, rete-limit, etc) only the title/link is shown.
  • Automatically converts a link or just the username/repo.
image

Copy link

netlify bot commented Dec 9, 2024

👷 Deploy request for astro-theme-cactus pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit e73b276

@Fabrizz
Copy link
Contributor Author

Fabrizz commented Dec 9, 2024

It seems that for some reason the remark-admonitions.ts transformUnhandledDirective function breaks the leaf directives. Putting it before the remarkAdmonitions plugin makes the plugin work.

@chrismwilliams
Copy link
Owner

Hi @Fabrizz, thanks for doing this. I'll circle back round to look at this properly once I've updated the theme to tailwind v4. I'm hoping to remove tailwind.config.ts and convert it to css.

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