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

Support multi-file gists which have one markdown file #75

Open
Daenyth opened this issue Jun 3, 2019 · 5 comments
Open

Support multi-file gists which have one markdown file #75

Daenyth opened this issue Jun 3, 2019 · 5 comments

Comments

@Daenyth
Copy link

Daenyth commented Jun 3, 2019

It seems like this should "just work" vs having one markdown file in isolation.

@Potherca
Copy link

Potherca commented Jun 4, 2019

As far as I can tell, the first file is chosen (which might not be a markdown file).

This is because the used URL is https://gist.githubusercontent.com/${user}/${id}/raw rather than an API call. So as a work-around, making sure the desired markdown file is listed first resolves your issue.

The trick I use is naming the first file README.md and keeping all other filenames lowercase. That way the markdown file is always first.

Besides just markdown, other textual formats are also supported (like HTML and Restructured Text).

This would lead to addition logic being needed if this were to be implemented. For instance, if there are more than one format present in one gist, how would the logic know which one to pick?

Other issues aside, making an API call would allow implementing #43

@Daenyth
Copy link
Author

Daenyth commented Jun 4, 2019

Weird; when I load this I get a blank page, but the first file in it is markdown.

@Daenyth
Copy link
Author

Daenyth commented Jun 4, 2019

Aha, <noscript>You need to enable JavaScript to run this app.</noscript>

@Daenyth
Copy link
Author

Daenyth commented Jun 4, 2019

Actually that doesn't explain it, ublock says it blocked 0 requests on that page, and I don't have any blanket javascript blockers.

@Potherca
Copy link

Potherca commented Jun 5, 2019

Looks like you missed the @ character in your link:

https://gist.io/Daenyth/28243952f1fcfac6e8ef838040e8638e
➡️ https://gist.io/@Daenyth/28243952f1fcfac6e8ef838040e8638e

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

No branches or pull requests

2 participants