Embed a PDF in github/gitlab wiki

14,467

Solution 1

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)

Solution 2

It is possible that such action type is not allowed only in cloud gitlab version, cause gitlab-gollum lib documentation describes it so:

[[Gollum|gollum.pdf]]

Share:
14,467

Related videos on Youtube

user3817250
Author by

user3817250

Updated on June 04, 2022

Comments

  • user3817250
    user3817250 almost 2 years

    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?

  • user3817250
    user3817250 almost 9 years
    Thanks for the info. I've just about abandoned the Github/Gitlab wiki due to the effort you need to put in to translating existing documentation.
  • Olivia Stork
    Olivia Stork over 7 years
    How do you add a pdf to the wiki folder like a normal page? Do you mean we should add the pdf to the git repo then link to it?