Embed a PDF in github/gitlab wiki

user3817250 picture user3817250 · Aug 15, 2014 · Viewed 13.3k times · Source

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?

Answer

spygi picture spygi · Mar 30, 2015

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)