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

Generate newsletter HTML from the data #1

Open
mrchrisadams opened this issue Jun 13, 2021 · 0 comments
Open

Generate newsletter HTML from the data #1

mrchrisadams opened this issue Jun 13, 2021 · 0 comments
Labels
CAT signal Shining the CAT signal to summon help from other CATs

Comments

@mrchrisadams
Copy link
Contributor

When people submit a job add, we currently support the markdown that slack supports.

This allows folks to add links, and some basic formatting.

It would be nice to have this same kind of support in newsletter, but we have a few problems:

  1. Slack's flavour of markdown is a dialect called mrkdwn, which is not the same.
  2. Unsurprisingly, there is no MrkdwnService exposed in Google Appscript. So we'd need to find something like an implementation of this, that we can upload into scope, and then make sure we can use it from Code.js.

A way we might do this

From what I can see, Appscript needs the final objects to exist as Global objects in order to make them available, which is pretty much the opposite of how most bundlers want to work.

It looks like a way we would have to do this would be to use something like Rollup as suggested in the clasp docs, and then use that to require some library that can speak mrkdwn, to render it as html that could go into an HTML email.

However, this is stretching my knowledge of the Javascript ecosystem. I'm parking this here to see if any kind souls might know a better way to do this - I have seen some code examples using webpack to build bundles for use, but I've been trying to avoid relying on it, as everytime I touch webpack I end being overwhelmed by the complexity :(

@mrchrisadams mrchrisadams added the CAT signal Shining the CAT signal to summon help from other CATs label Jun 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CAT signal Shining the CAT signal to summon help from other CATs
Projects
None yet
Development

No branches or pull requests

1 participant