astro-theme-cactus
astro-theme-cactus copied to clipboard
Added Github card
What kind of changes does this PR include?
- Added a Github Card (
::github{repo="chrismwilliams/astro-theme-cactus"leaf directive) https://talk.commonmark.org/t/generic-directives-plugins-syntax/444#:~:text=2.%20Leaf%20Block%20Directives
Description
- Added the remark plugin to handle leaf directives for the Github card. (Using the refractored
remark-admonitions.tsas 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.
Deploy Preview for astro-theme-cactus ready!
| Name | Link |
|---|---|
| Latest commit | 745451c294f5f8ecf648505f486e6ed1d9067bb2 |
| Latest deploy log | https://app.netlify.com/projects/astro-theme-cactus/deploys/6867cb01d1c9720008242e4f |
| Deploy Preview | https://deploy-preview-335--astro-theme-cactus.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify project configuration.
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.
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.
This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Tailwind has been updated. Maybe this PR can be merged soon.
Think this is ready now. Took a lot more time than I anticipated