Skip to content

Commit

Permalink
Add a test showing the copying of image reference in link descr
Browse files Browse the repository at this point in the history
Ref: #276
  • Loading branch information
kaushalmodi committed Jun 17, 2019
1 parent 45cbd5e commit 73fd04f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions test/site/content-org/all-posts.org
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,12 @@ Click below image to jump to the unicorn image.

#+name: fig__clickable_image_that_opens_the_image
#+caption: Click this image -- It's a hyperlink
[[/images/org-mode-unicorn-logo.png][file:/images/org-mode-unicorn-logo.png]]
[[/images/org-mode-unicorn-logo.png][file:../files-to-be-copied-to-static/static/images/unicorn-logo-small.png]]

- NOTE :: =file:= has to be used in the *Description component* of the
Org link.
**** Same link with =#+name= specified
Here's the same link with =#+name= specified.. which should also be
**** Similar link with =#+name= specified
Here's a similar link with =#+name= specified.. which should also be
clickable.

#+name: fig__unicorn
Expand Down
14 changes: 7 additions & 7 deletions test/site/content/posts/image-links.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This is some text before the first heading of this post.
[[/images/org-mode-unicorn-logo.png]]
```

<a id="orga3633e1"></a>
<a id="org786a2ea"></a>

{{< figure src="/images/org-mode-unicorn-logo.png" caption="Figure 1: Don't click this image -- It's not a hyperlink" >}}

Expand Down Expand Up @@ -52,7 +52,7 @@ tag and look the same size.

Do **not** use `file:` prefix in the Description if you want the image
link to show up as-is i.e. not be replaced by the image-at-link like
in [2](#org54fce47):
in [2](#org1e1c7b6):

```org
# Org source
Expand All @@ -73,21 +73,21 @@ Click below image to jump to the unicorn image.
[[/images/org-mode-unicorn-logo.png][file:/images/org-mode-unicorn-logo.png]]
```

<a id="org54fce47"></a>
<a id="org1e1c7b6"></a>

{{< figure src="/images/org-mode-unicorn-logo.png" caption="Figure 2: Click this image -- It's a hyperlink" link="/images/org-mode-unicorn-logo.png" >}}
{{< figure src="/images/unicorn-logo-small.png" caption="Figure 2: Click this image -- It's a hyperlink" link="/images/org-mode-unicorn-logo.png" >}}

NOTE
: `file:` has to be used in the **Description component** of the
Org link.


### Same link with `#+name` specified {#same-link-with-plus-name-specified}
### Similar link with `#+name` specified {#similar-link-with-plus-name-specified}

Here's the same link with `#+name` specified.. which should also be
Here's a similar link with `#+name` specified.. which should also be
clickable.

<a id="orgd697346"></a>
<a id="org7149dda"></a>

{{< figure src="/images/org-mode-unicorn-logo.png" link="/images/org-mode-unicorn-logo.png" >}}

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added test/site/static/images/unicorn-logo-small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 73fd04f

Please sign in to comment.