Can I link to a file for downloading (other than PDF) in a GitHub wiki? - github

When you link to a PDF file using:
[download this](file.pdf)
it downloads the pdf file. I have an excel workbook that I'd like to allow someone to download using:
[download this](file.xlsx)
When I click it, it takes me to create a new page in the wiki. Is there any markdown syntax I can add that identifies the link as something to download?
If I have to, I can save the excel workbook as a PDF, but it's not going to be pretty.
Thank you!

First, try making a files subdirectory in your wiki, and putting your files in there.
I tried using an html anchor tag
download this
instead of the markdown link syntax
[download this](files/file.csv)
but it seems that GitHub wiki strips out the download attribute from the anchor tag.
In the end, I zipped my spreadsheet in a zip file and had the markdown link point to the zip file.
[download this](files/file.csv.zip)

Related

How to make a download link in GitHub README.md file?

I uploaded a .epub file to the GitHub repository. I want to create a download link to this file inside the README.md file.
By clicking this link user will be able to download the file directly, without going to another page and clicking the download button on that page.
Is it possible to achieve this with the default README.md (markdown) file?
In text comes e.g. "click me" and at link just your downloadlink
You can do it with this:
[text](link)
as an example:
[click me to download](https://github.com/Schecher1/Minecraft-Server-Creator/blob/master/README.md)
I was able to achieve the download link by putting my .epub file inside a release assets.
After creating a release I right-clicked on the artifact and copied the link address.
The markdown snippet looks like this
[epub](https://github.com/name/project/releases/download/v1.0.0/book.epub)
It immediately starts loading the file upon clicking the epub word.

Referencing Files In A Github Markdown File

I am trying to create a readme on github like the following https://github.com/fleejy/ckme136-capstone
I guess my question is how did this content creator create the links under the Documentation And Repository Organization heading in the Readme.md file as I would like to emulate this.
I did some searching for relative references examples but was not able to figure it out.
Any advice would be very much appreciated.
Thanks
It's very Simple, you have to make a URL in markdown referring to your folder/file.
For making a URL in markdown files you use a syntax like this [Text](exampleURL) here your Text is the text which will appear in the markdown file and the exampleURL is the URL you want to go to.
A Working Example Will Be Like this [Google](https://google.com).
If you want to refer to a particular file/folder inside your repository you don't need https:// all you need is to provide the path of the folder/file
for example in my repository i have a file named example.pdf inside a folder named PDFs so my markdown code will look like this [Example PDF](PDFs/example.pdf)
Markdown is pretty easy and you can learn markdown syntax with this CheatSheet.

How can I create relative links from my MarkDown to GitHub raw files?

GitHub MD supports relative links, for example from my README.md I can link to code in the Code directory:
To download these scripts, [click here](Code/myscript.sh), then right-click the **Raw** button and download it
How can I directly link to the raw content, using a relative link like Code/myscript.sh (not an absolute link like https://raw.githubusercontent.com/myrepo/toplevel/subdir/subsubdir/myscript.sh)?
append raw=1 to your URL
To download these scripts, [click here](Code/myscript.sh?raw=1).
I did not find this documented anywhere and discovered it by experimentation, so sharing it here.

Download link in GitHub markdown [duplicate]

When you link to a PDF file using:
[download this](file.pdf)
it downloads the pdf file. I have an excel workbook that I'd like to allow someone to download using:
[download this](file.xlsx)
When I click it, it takes me to create a new page in the wiki. Is there any markdown syntax I can add that identifies the link as something to download?
If I have to, I can save the excel workbook as a PDF, but it's not going to be pretty.
Thank you!
First, try making a files subdirectory in your wiki, and putting your files in there.
I tried using an html anchor tag
download this
instead of the markdown link syntax
[download this](files/file.csv)
but it seems that GitHub wiki strips out the download attribute from the anchor tag.
In the end, I zipped my spreadsheet in a zip file and had the markdown link point to the zip file.
[download this](files/file.csv.zip)

Get documentation from GitHub project as a single pdf

I'm looking for a single pdf of the ErpNext and Frappe user manuals.
Documentation seems to be provided in html and the source is in markdown. I did find tools to convert markdown to html/pdf, but no reliable solution to generate a SINGLE pdf file keeping the structure as shown here:
Put more abstractly: How to transform GitHub markdown documentation (organized in subdirectories) into a single pdf file?
Could anyone help me out?
Any way of achieving this is welcome, thanks in advance!
You can convert markdown to PDF with Pandoc or similar tools.
You can fsearch the internet about how to concatenate files on your OS.
There are several (online) tools to merge multiple PDFs into one.
To create a single file you can either
concatenate the markdown files into one big file, then convert to PDF, or
convert all markdown files to PDF, then merge all PDF files into one big PDF.