I'm using Octopress for my blog and need to create a link to download a text file.
There is a built in plugin called include_code that renders a link but also shows the file. I just want the link. Does anyone know how I can do this?
Put your text file under source/downloads/code
Then you can use the markdown syntax for showing links like this :
[link name](url for the txt file)
The url will be {your blog url}/downloads/code/{name of txt file}
This is derived from the include_code plugin which also shows a download link for each code listing.
UPDATE :
To do it from within HTML, you can use
Text File
Related
I am trying to download a file (or several files) from Box into Google Colab using "wget". But, what is downloaded looks like a HTML page not the file itself.
I am using the command:
!wget https://AAA.box.com/s/mh7xq8lou9ukb5i7lssz0frou554dupb -O script.py
Is there a problem with the URL that I am using? I get the URL by opening the file in Box and click "Get shared link".
You are trying to download from sharing link which is a webpage not a direct download link. So It will download the webpage. As a simple trick you can click download in browser and cancel it. Then copy the URL from download and use it with wget.
I am using the asciidoctor-maven-plugin to create a PDF User Guide from asciidoc source files.
I use the following format for cross references within the adoc files:
link:overview/name_of_file.adoc[Link name]
But the link is rendered as follows in the PDF:
file:///<local path>/overview/name_of_file.adoc
That is, the links the don't work. How to generate working links in the PDF (but also retain an .adoc link format that works in the source file for use in bitbucket)?
Output is one PDF
How can I link from a Sphinx document into a CHM file?
It seems that I could link from one chm file into another using a syntax like
<a href="ms-its:path+filename.chm::/pagename.htm">
Is it possible to transfer this into Sphinx commands?
You know, opening a topic compiled into a CHM is possible with Microsoft Internet Explorer only (!) by adding following code in a HTML file:
<p>Sample of CHM link to a topic in a compiled help file that is stored on a local computer</p>
<!-- To link to a topic in a compiled help file that is stored on a local computer, create a link using the following syntax: -->
Link to Garden topic here
I think, the reStructuredText parser cannot transfer these special kind of link from the source (reST).
But you can use the Replacement Text like shown below. Please note, the backslash is used twice:
================
Replacement Text
================
I recommend you try |HTMLHelp|_ and continue compiling help in CHM file format.
.. |HTMLHelp| replace:: CHM, *the* best help format around
.. _HTMLHelp: ms-its:D:\\UserData-Sphinx\\CHM-example.chm::/garden/garden.htm
The "replace" directive is used to indicate replacement text for a substitution reference. It may be used within substitution definitions only.
The resulting HTML file view:
The compiled help CHM:
The topic garden.htm is shown in the Help Viewer's topic pane after the link iswas clicked:
You may download the above used CHM-example.chm file from my HTMLHelp (HH) info site see download section or download CHM.
Please note, to open this CHM file right-click the saved file, click Properties, and then click Unblock.
Jekyll website has given this instruction but it's not complete. I downloaded ghost.db from ghost blog and Installed http://import.jekyllrb.com/docs/ghost/ and jekyll-import gem and it's all dependencies. and ran the given command in above link. It ran but it's giving error
Also I don't have any local installation of jekyll website. It's hosted on github.
I want to move my blog posts of ghost to github hosted jekyll.
My OS is OSX Yosemite.
You have to run your command from the folder where ghost.db is in.
If your not lauching your command from the db folder, you can give an absolute path like
"dbfile" => "/home/user/ghost.db"
Or the database name is not the good one. Maybe ghost-dev.db or ghost-prod.db.
Another option is to export your ghost blog to json and then convert that json file into markdown files for Jekyll GitHub pages.
The json file is pretty self explanatory, so you could write a simple program to parse the file and create markdown files from it.
The process would look like this:
read the json file into memory.
parse the posts from db.data.posts.
for each post:
the markdown content is in the post markdown property.
create your front matter from the other post properties.
write a file with the front matter and original markdown, pre-pending the file name with the date into a _posts folder in your output folder.
note: if the page property is 0, it's a post, if it's 1 it's a page. If it's a page, the file should go in the root of your output folder without the date in the file name.
Each post file should look something like this:
---
layout: post
title: Welcome to Ghost
permalink: /welcome-to-ghost
date: 2017-04-25 20:54:20
published: false
tags:
---
You're live! Nice. We've put together a little post to introduce you to the Ghost editor and get you started. You can manage your content by signing in to the admin area at `<your blog URL>/ghost/`. When you arrive, you can select this post from a list on the left and see a preview of it on the right. Click the little pencil icon at the top of the preview to edit this post and read the next section!
If you're looking for an existing utility, or sample code, try GhostToGitHubPagesConverter. It's a dotnet core console app that will run on windows, mac or linux.
Full disclosure, this is my github project.
I have stored a Markdown file and an image file in a Git repo as follows:
readme.markdown
images/
image.png
I reference the image from readme.markdown like this:
![](./images/image.png)
This renders as expected in ReText, but does not render when I push the repo to GitLab.
How can I reference the image from the Markdown file so that it renders when viewed in GitLab?
![](images/image.png) without the ./ works for me: https://gitlab.com/cirosantilli/test/blob/bffbcc928282ede14dcb42768f10a7ef21a665f1/markdown.md#image
I have opened a request for this to be allowed at: http://feedback.gitlab.com/forums/176466-general/suggestions/6746307-support-markdown-image-path-in-current-directory-s , but it entered into Internet void when GitLab dumped UserVoice.
Similar problem with Gitlab & Images in readme.md
I had the same problem with my Logo inside of a readme.md in my Extension and with Gitlab (running on a Ubuntu-Server).
Ubuntu Version: 16.04.2 LTS
Gitlab Version: 10.3.4 56dc722
My Solution
You can also use a snippet for image-usage in your readme.md by simply following these steps:
In the Overview of Gitlab (Logged in)
Go to the project where your want to use that image
in the topnavigation on the right click the + button
UNDER YOUR PROJECT click new snippet in the dropdown
In the new snippet form
Type a title
On the bottom right corner of the RTE-Field click Attach a file
Select your file and press Open
Click the checkbox Public
name the snippet (under the Checkboxes) [the field beside the 1 not the "header"]
Click Create Snippet
Troubleshooting
If you get the following error you forgot point 5:
The form contains the following error:
Content can't be blank
Now we have a working Imagelink
Now, if you edit the snippet again, you can copy the Image-Code looks like this:
![Alt-Text](/uploads/472fc65e1a1bc11b355cc03d6c339fd5/logo_.svg)
to your readme.md file.
If you like to use a link also, it has to look like that:
[![Alt-Text](/uploads/4013547485b9e88e98f1af3870116a29/logo_mit_claim.svg)](https://your-destination.com)
Hope it helps other ppls
Go to your project
Select issues
Create new issue
In the new issue description, click on attach file
Browse to your file and attach
A link in the form ""
will be generated on the description pane.
Copy the link and paste it in your readme.md file
Do not submit the issue unless you had intended to.
My images where in the .bin/img/ folder.
I had to use below format to get an image:
![alt text](<./bin/img/some_image.png>)
Mind the <>