Skip to content

Commit

Permalink
Add example for images
Browse files Browse the repository at this point in the history
  • Loading branch information
kaushalmodi committed Jul 6, 2017
1 parent bd20274 commit f2e57cc
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 0 deletions.
2 changes: 2 additions & 0 deletions example-site/config.toml
Expand Up @@ -2,3 +2,5 @@ baseURL = "http://example.org/"
languageCode = "en-us"
title = "My Org-exported Hugo Site"
theme = "bare_min"

canonifyURLs = true
37 changes: 37 additions & 0 deletions example-site/content-org/all-posts.org
Expand Up @@ -23,3 +23,40 @@ H H=.
:END:
Export this *second* post only by moving point here and doing =C-c C-e
H H=.
* Image
:PROPERTIES:
:EXPORT_FILE_NAME: image
:END:
*To be fixed*: At the moment, you need to place the point here and do
=C-c C-e H H=. If the point is under any of the nested sub-trees in
here where you do that, only that subtree gets exported.

/Need to add smarts that determines which subtree contains the whole
post.. like look for =EXPORT_FILE_NAME=?/
** Unclickable image
[[./images/org-mode-unicorn-logo.png]]

*To be fixed*: The sub-headings in a post get exported as /Heading 1/
instead of /Heading 2/.

For example, this sub-section's heading is exported as:
#+BEGIN_SRC markdown
# Unclickable image
#+END_SRC
instead of
#+BEGIN_SRC markdown
## Unclickable image
#+END_SRC

So the sub-heading title and the post title both get the /Heading 1/
tag and look the same size.
** Clickable link that opens the image
[[./images/org-mode-unicorn-logo.png][Click here to see the unicorn]]
** Clickable image that opens the image
Click below image to jump to the unicorn image.

[[file:images/org-mode-unicorn-logo.png][file:./images/org-mode-unicorn-logo.png]]
- NOTE 1 :: =file:= has to be used in both Link and Description components
of the Org link.
- NOTE 2 :: As the path is relative, we need to use =./images/..=
instead of =/images/..=.
45 changes: 45 additions & 0 deletions example-site/content/posts/image.md
@@ -0,0 +1,45 @@
+++
title = "Image"
date = 2017-07-06T16:21:36-04:00
tags = []
+++

**To be fixed**: At the moment, you need to place the point here and do `C-c C-e H H`. If the point is under any of the nested sub-trees in here where you do that, only that subtree gets exported.

*Need to add smarts that determines which subtree contains the whole post.. like look for `EXPORT_FILE_NAME`?*


# Unclickable image

![img](./images/org-mode-unicorn-logo.png)

**To be fixed**: The sub-headings in a post get exported as *Heading 1* instead of *Heading 2*.

For example, this sub-section’s heading is exported as:

{{< highlight markdown >}}
# Unclickable image
{{< /highlight >}}

instead of

{{< highlight markdown >}}
## Unclickable image
{{< /highlight >}}

So the sub-heading title and the post title both get the *Heading 1* tag and look the same size.


# Clickable link that opens the image

[Click here to see the unicorn](./images/org-mode-unicorn-logo.png)


# Clickable image that opens the image

Click below image to jump to the unicorn image.

[![img](./images/org-mode-unicorn-logo.png)](images/org-mode-unicorn-logo.png)

- **NOTE 1:** `file:` has to be used in both Link and Description components of the Org link.
- **NOTE 2:** As the path is relative, we need to use `./images/..` instead of `/images/..`.
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 f2e57cc

Please sign in to comment.