Giter VIP home page Giter VIP logo

astro-d2's Introduction

astro-d2 ✏️

Astro integration and remark plugin to transform D2 Markdown code blocks into diagrams.

Getting Started

Want to get started immediately? Check out the getting started guide.

Features

An Astro integration and remark plugin to transform D2 Markdown code blocks into diagrams.

Check out the examples for previews of some diagrams you can create with D2.

License

Licensed under the MIT License, Copyright © HiDeoo.

See LICENSE for more information.

astro-d2's People

Contributors

hideoo avatar martrapp avatar michaeltoohig avatar pantonante avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

astro-d2's Issues

astro-d2 does not find d2

Describe the bug

Even so I had d2 installed, astro dev crashes for me on start
image

To Reproduce

  1. install d2
  2. install integration
  3. add example on page
```d2
direction: right
installation -> configuration
```
  1. start astro

Expected behavior

Show nice diagrams, don't crash ;-)
on my machine, d2 --version outputs v0.6.3. astro-d2 should be prepared to accept version strings that start with 'v'.

How often does this bug happen?

Every time

System Info

WSL2/Ubuntu

Additional Context

No response

Centering SVG

Is your feature request related to a problem?

I didn't see any configuration for centering SVG.

1714444596058

Describe the solution you'd like

Should we add a configuration option?

Describe alternatives you've considered

No response

Additional Context

No response

Including `pad` and `sketch` in global config

Is your feature request related to a problem?

I want all of my d2 diagrams on my astro website to be sketches without typing it on all of the diagrams manually.

Describe the solution you'd like

I would like more of the attributes to be available in the global config so all of my d2 diagrams automatically are sharing the same pad value or they are by default sketch style. I imagine then we would need to add a noSketch or similar attribute so sketch could then be turned off for particular diagrams.

Describe alternatives you've considered

No response

Additional Context

Is there a reason you could not include them in the global config and would you accept a PR on this?

Light/Dark theme control

Is your feature request related to a problem?

I would like the color theme to follow my websites light/dark theme setting and not system theme setting.

Describe the solution you'd like

Some sort of manual override to set the theme to dark/light based on a custom css selector. I see the svg outputs its own css and has a @media screen and (prefers-color-scheme:dark) selector so that could be changed perhaps.

Describe alternatives you've considered

No response

Additional Context

I use tailwind at the moment so for my shiki css I included a html.dark selector to override the shiki theme based on my site's color theme.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.