Git Product home page Git Product logo

Comments (2)

Zoramite avatar Zoramite commented on June 13, 2024

Hi @lgiordani !

Unfortunately with grow we didn't add in any way of extending out the main document formats, as you can see in the code that you linked to.

One thing you can do is make an extension that handles the parsing. (see https://grow.dev/extensions/create/). You could make a hook in your extension using the PreRenderHook to take the raw input, process it with your mau language, and then return the new value from the hook. This will update content of the page before it gets rendered to the build files. This would affect all the documents content though, so it may be more than you want.

Another option is to be able to selectively use the language by creating a jinja2 filter that you could pass content to for rendering. ex: {{doc.content|mau}}.

from grow.

lgiordani avatar lgiordani commented on June 13, 2024

Thanks @Zoramite for the quick answer, and for giving me some options.

I think a quick and dirty solution for might is to leverage Mau's CLI and to preprocess files into HTML, and to feed those to Grow. Not the best solution but not a terrible one either.

Speaking of which, I see Grow supports preprocessors, but I understand there is nothing that can run arbitrary bash scripts, am I right? Do you think that would be easier for me to implement?

from grow.

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.