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

Grunt #34

Open
stefany-newman opened this issue Jul 29, 2018 · 9 comments
Open

Grunt #34

stefany-newman opened this issue Jul 29, 2018 · 9 comments
Labels

Comments

@stefany-newman
Copy link

Is there a way to implement this to Grunt? Thanks so much.

@nelsonic
Copy link
Member

@stefany93 thanks for your question.
could you please clarify: are you asking if you can use the ampl node module
with the Grunt.js task runner / build tool? https://gruntjs.com ?

@stefany-newman
Copy link
Author

stefany-newman commented Jul 29, 2018

^^ Hi nelsonic, thank you for replaying, and yes that's what I need - I have a stream of markdown I am converting into HTML but I need it to convert to AMP!

@nelsonic
Copy link
Member

@stefany93 if you can share some of your Grunt code (even temporarily) we can help you implement. thanks.

@stefany-newman
Copy link
Author

@nelsonic
Copy link
Member

nelsonic commented Jul 30, 2018

@stefany93 thanks for sharing link to Gist.
could you please add a comment to it, something to the effect of:

// transform Markdown to AMP-compliant HTML here!

So that it's easier for both to understand where the transformation needs to occur?
at present there is no mention of "amp":
no-mention-of-amp-in-grunt-file

@stefany-newman
Copy link
Author

Hi, I am currently converting the markdown to html in a handlebars template, if that helps:

{{#markdown}}{{content.body}}{{/markdown}}

@nelsonic
Copy link
Member

@stefany93 The workflow for using ampl is quite basic:

  • Read Markdown content
  • Convert markdown to AMP-compliant HTML

So instead of using helper-markdown you would use ampl.
I would recommend reading: https://gruntjs.com/creating-plugins

@stefany-newman
Copy link
Author

^^ Thank you nelsonic, I will try that.

@nelsonic
Copy link
Member

nelsonic commented Aug 4, 2018

@stefany93 keep us posted with how you get on.
(if you need any "help", just give us as much info as you can...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants