Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Embed a PDF in github/gitlab wiki

I'm using gitlab to manage my repositories which has been quite pleasant so far. However the wiki could use a fair amount of improvement IMO.

It's really annoying when you already have documentation that you simply want to add to the wiki. Translating a table or pdf to gitlab flavored markdown can be time consuming and non-trivial.

My question is two-fold.

  1. Has anyone had luck embedding files (specifically pdf's) into their github/gitlab wiki? This should definitely be possible on gitlab but is their an easy way to do it? I have a documentation repo set up, it would be awesome to embed files linked from the documentation repo.

  2. If not embedding files into the pages. How do you efficiently translate a document to gitlab flavored markdown?

like image 424
user3817250 Avatar asked Aug 15 '14 14:08

user3817250


People also ask

Can you put PDF in GitHub?

We're now happy to add PDF documents to the list! Simply browse to a PDF document and we'll render it in your browser like any other file.

How do I embed a PDF document?

To attach a file, go to Insert > Attach File in PDF. To embed a file, go to Insert > Embed File in PDF. Browse to and select the file that you want to insert, and click Select on the Select File dialog.

Can markdown embed PDF?

Markdown itself doesn't have a mechanism for embedding a PDF. However, Markdown accepts raw HTML in its input and passes it through unaltered.


1 Answers

Had the same issue and landed here, maybe this helps somebody.

I didn't find a way to embed the .pdf into a page but what I did was to add the .pdf to the wiki folder (like a normal page). Initially this didn't show up in the sidebar nor was it searchable from Github.

It is possible however to link it directly from other pages or a custom sidebar (see for example osquery's wiki for a nice sidebar). Clicking on the link allows you to download the .pdf (didn't find a way to preview it in the browser)

like image 112
spygi Avatar answered Sep 20 '22 14:09

spygi