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

[Feature Request] Compile to static HTML #25

Open
louis1001 opened this issue Feb 6, 2023 · 7 comments
Open

[Feature Request] Compile to static HTML #25

louis1001 opened this issue Feb 6, 2023 · 7 comments
Labels
help wanted Extra attention is needed

Comments

@louis1001
Copy link

This is probably too broad for a feature request, but I would like to use this without needing JavaScript enabled on my browser.

I'm planning on adding it to a page that uses Nuxt, so I imagine this being a library with a function or a Vue component you can import and place on your view, and when generating the static site it builds the HTML like it would on a browser.

But I can see that might mean making a entirely different repo, and then maybe using that as a dependency of the emgithub page.

@louis1001
Copy link
Author

So it would be an npm library and a CDN that provides the js for sites like yours that do the embedding in the browser.

@yusanshi yusanshi added the help wanted Extra attention is needed label Feb 7, 2023
@yusanshi
Copy link
Owner

yusanshi commented Feb 7, 2023

I'm not a front-end developer so I don't write much Vue/React code. For me, the need of code embedding only happens when I am writing static blogs. That's why emgithub is designed to be used by embedding a script tag.

The idea of making emgithub a Vue/React component sounds interesting and helpful. But I may not be able to implement this, since I haven't written Vue/React code for years. Anyway, I'll mark this as help-wanted in case someone could do this.

@louis1001
Copy link
Author

On my fork I'll try to decouple the html code generation from the browser writing. I'll comment here if it seems it can be included without breaking changes.

@NomarCub
Copy link

It'd be really useful, if the script tag wasn't needed, because now emgithub can't be used in places like a GitHub readme, where regular iframe embeds still work. Should I open a separate issue for that, or are they related?

@yusanshi
Copy link
Owner

It'd be really useful, if the script tag wasn't needed, because now emgithub can't be used in places like a GitHub readme, where regular iframe embeds still work. Should I open a separate issue for that, or are they related?

I believe they mean the different things: compiling with a static site generator, vs embedding with a iframe.

However, it seems like GitHub doesnot support rendering iframe tag 🤔 https://stackoverflow.com/questions/48402823/embed-openstreetmap-iframe-in-github-markdown

Personally, I think iframe may be too heavy?!

@whitfin
Copy link

whitfin commented Mar 7, 2024

@louis1001 did you have any work started for this? I'm facing the same case where I'm generating a static site and would like to generate my embeds at build time - rather than at load time (e.g. what if GitHub is down?).

As you said decoupling the HTML generation would be perfect!

@louis1001
Copy link
Author

louis1001 commented Mar 8, 2024

@whitfin I think I might have lost my local changes, it was a while ago. I do have a fork for a lib version of this tool, but no progress uploaded. If you'd like to contribute we can work there, or just let me know of a your own repo if you make one.

either way, yeah I'll try to get it working again.
Here's my fork: https://github.com/louis1001/libemgithub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants