Git Product home page Git Product logo

Comments (6)

matt-west avatar matt-west commented on August 12, 2024

Hi @jondkinney,

For the initial release of Astrum we've focussed on just supporting HTML for component templates.

You can add ERD, HAML, or SLIM into the markup.html file and it will get displayed in the code example, however the preview will not work as Astrum does not currently support these templating languages.

We've previously discussed adding support for a preview.html file that would allow you to specify different markup for the code example and the component preview. This would allow you to use a tempting language in the code example, and then provide plain old HTML for the component preview.

Do you think that this approach would solve your issue?

from astrum.

jondkinney avatar jondkinney commented on August 12, 2024

@matt-west thanks for getting back to me and for all your work on Astrum! The situation you describe is a step in the right direction, I think, but my goal would be to have the component source code available to copy/paste in the templating language it's written in so that we wouldn't have to reverse engineer the HTML to SLIM, for example.

from astrum.

matt-west avatar matt-west commented on August 12, 2024

@jondkinney Apologies my explanation was not as clear as it could be. Adding a preview.html file would allow you to display the template language version in the code example to copy and paste, and have the component preview with pure HTML. The example component structure would be.

  • description.md - The component description.
  • preview.html - Pure HTML version of the component used for the component preview.
  • markup.html - The code snippet for the component.

The preview.html file could be optional, with Astrum falling back to using the markup.html file if it's not present.

from astrum.

jondkinney avatar jondkinney commented on August 12, 2024

Aaah, gotcha. That's definitely a workable solution! I guess the main downside would be needing to specify the source code in both the templating language and pure HTML, so if something changes you'd have to update it in both places. But yea, definitely that would allow us to start using it now!

from astrum.

matt-west avatar matt-west commented on August 12, 2024

Cool. I've added this to the roadmap. https://github.com/NoDivide/astrum/wiki/Project-Roadmap

from astrum.

RyanHavoc avatar RyanHavoc commented on August 12, 2024

Ref #84

from astrum.

Related Issues (20)

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.