Display PDF in GitHub Markdown - html

This is quite similar to what is being asked in this post, but the post does not seem to work for GitHub's parsed Markdown.
Simply put, let us say I have a PDF in a GitHub repository. Is there any way to render/embed that in a markdown file that is in the repository (e.g. the README.md file)?
I would also be open to having the PDF in a location other than GitHub and linking to it from the markdown file if that is what is required to make this work.

Currently there is no way to preview a pdf in github markdown, however you can embed an image of the pdf.
Edit
From here:
The best you can do is a greasemonkey extension which would allow you to call a pdf viewer, like the recent pdf.js (a Portable Document Format (PDF) viewer that is built with HTML5.), allowing you to view a pdf entirely online, without any pdf plugin installed.

As far as I know, this is not possible on GitHub.
However, you can upload it as a file in the same repository and then add a link to it with a relative path.
[Some title here](FILE_NAME.pdf)

Related

In Github when creating github.io profile what the difference of .md .html .rmd files?

I'm trying to create a github.io profile.
May I know the difference between of .md .html .rmd files?
For example, I see the same file name with different filetypes like
Readme.md vs Readme.html XXX.rmd vs XXX.html
github.io (aka Github pages) can create a website from either
html with optional css
Markdown files (.md and .rmd)
A combination of the above
It uses a set of tools called Jekyll and kramdown to translate markdown files into html to be displayed as part of the website.
Markdown files are a file format generally used for producing documentation in github on similar websites, and has a mopre streamlined syntax for that purpose than html. You can try it out at https://stackedit.io
The use of markdown for Github Pages is however completely optional and you may use only html if you wish. You can follow the guide at https://jmcglone.com/guides/github-pages show you how to make a github pages site with html. Stop when you get to the section Using Jekyll with GitHub Pages if you don't wish to incorporate any markdown.

How to change file for Github pages?

i need a little help...
Actually i have made a GitHub page but i want to change the file which is being displayed to the website made by me ...
Actually it's a .md file and i made a html file...
Now i want to change the file which is being displayed in the site.
I want to switch from .md to html file which is already in my repo for GitHub pages.
If anyone knows how to deal with it, please help
I'm also adding my github repo link : https://github.com/S2Sofficial/swaroop2sky
And here is the github page link:
https://s2sofficial.github.io/swaroop2sky/
Create index.html file, and it will work as your home page.
OR
simply, change the file name of Welcome to Swaroop2sky _ swaroop2sky.html to index.html.
You can not show your website on GitHub page.
You can include html tags in README to format text.
GitHub does not support html format for README. See answer on StackOverflow about README formats.
GitHub does not support iframe either. See answer on SO about iframe.

Read the Docs PDF doesn't include images

I have begun a documentation project on Read the Docs, building from a GitHub repo. I set it up as a Sphinx project, and am using Markdown in the content. The main reason for this is take advantage of GitHub's Markdown preview which is great.
I have jpg images in the docs that are pulled in with the urls from where they reside on GitHub. I just tested out the PDF download, and noticed that none of the images were include in the download. Is it possible to have that happen? Do I need to set things up differently?
I have read the read the docs docs (fun phrase) and looked in the github issues, but didn't see anything that addressed this directly...
Turned out that the problem was using an http reference to the images where they where uploaded to github. When I did that, the RTD PDF did not include the images.
![hey dubuque library](https://github.com/legiongis/clitoolbox/raw/master/docs/img/dubuque_library.jpg "Hello Dubuque!!")
However, changing this to a relative path from the markdown file solved the problem.
![hey dubuque library](img/dubuque_library.jpg "Hello Dubuque!!")

Markdown to html automatically on a site

I know i can convert an MD file to HTML with a bunch of scripts.
I become part of a site which is hosted on github, and it has a place_holder.md file. I can view its content if i isit to place_holder domain. If i change anything in the md file, and i push it to the repo it get updated immediately. If i visit the place_holder.html i can see its content, even that the file is not in the github repo
So my question is:
Does github hoster stuff has an auto md converter which i cannot see? In this case where can i get something like this?
Do webbrowsers understand markdown by default? Then why dont i see place_holder.md in the url?
Thanks
If i visit the place_holder.html i can see its content, even that the file is not in the github repo
Of course you can look at the place_holder.html file it is an html file on your computer that your browser can render so you can view it.
Does github hoster stuff has an auto md converter which i cannot see?
I do not believe github has an "auto md converter".
In this case where can i get something like this?
You can use jekyll to convert your plain text and markdown to static html pages which you can host on the web. You also can get text editors to preview your markdown before you convert it into html which can be helpful. Here is one online text editor.
I'm not sure how you're asking to implement this, but take a look at marked. It's super easy to use and very flexible.

How can I add a downloadable file to my Github.io page?

I have set up my professional website/homepage using Github Pages. I know if this was just HTML being served up from somewhere, my downloadable file would need to be in the directory of my .html file, and then I could reference it in the .html file and link it up. However, since this is served by Github through repository, I am unsure on how to do this.
Do I put my downloadable file in my repo under version control like the rest of the project?
If so, what path do I use in the .html file?
Also, I am aware that the Automatic Page Generator makes it possible to hardly touch the HTML, but it seems pretty restrictive as far as customizing where links and other content appears on your page...
You could just link it normally in your html. Commit it to your repository and have users right click to save.
I just tried this on one of my repositories where I put a link to my CSS file.
style.css
I was able to right click the link and download the file.
If you wanted to create a download from the root you would do:
Download File
I'm pushing my repositories manually instead of using the Automatic Page Generator. The steps are pretty straight forward Creating Project Pages Manually - GitHub Help
Since it is done in GitHub pages. It can also be done like this (in markdown fashion): [download]({{ site.baseurl }}{% link file.txt %}). It has the advantage to work locally without pushing the file to the repo.