emgithub icon indicating copy to clipboard operation
emgithub copied to clipboard

[Request] full view render

Open dimaslanjaka opened this issue 2 years ago • 5 comments

i need render single markdown file full page, can this tool do that ?

dimaslanjaka avatar Jul 27 '23 14:07 dimaslanjaka

What do you mean by "full page"

yusanshi avatar Jul 27 '23 15:07 yusanshi

What do you mean by "full page"

Yessss that is... So i can bring the full page shortlink to my friend or other people to read some rendered markdown, instead giving the github or gist link >.<

dimaslanjaka avatar Jul 27 '23 16:07 dimaslanjaka

I think emgithub is not meant to do that, since emgithub gives you a html <script> tag that must be used inside a html page. The <script> tag itself can not be directly viewed.

I believe GitHub Pages may suit you. Say you have a Markdown file https://github.com/username/repo/blob/main/file.md. With GitHub Pages, the Markdown file can be rendered at username.github.io/repo/file.html.

yusanshi avatar Jul 28 '23 02:07 yusanshi

image

just need the preview only without any forms. might can get the source url from URL parameter then render it into preview element. might you can get some idea to create it.

dimaslanjaka avatar Aug 04 '23 14:08 dimaslanjaka

If you visit https://emgithub.com/yusanshi/emgithub/blob/master/README.md, you'll see the preview page you want.

image

So one possible way it to just hide all other elements, leaving alone the preview in this case. This can be done by hacking 404.html. Since this feature is quite off-topic, you may need to fork the project and hack as you need. See https://github.com/yusanshi/emgithub#create-your-own-emgithub.

yusanshi avatar Aug 04 '23 14:08 yusanshi