Skip to content

Commit

Permalink
test: Uncomment an unrelated test
Browse files Browse the repository at this point in the history
  • Loading branch information
kaushalmodi committed Mar 17, 2022
1 parent 66edee9 commit d29f3d8
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 20 deletions.
38 changes: 19 additions & 19 deletions test/site/content-org/all-posts.org
Original file line number Diff line number Diff line change
Expand Up @@ -241,24 +241,6 @@ Some more text, after image.
[[/images/org-mode-unicorn-logo.png]]

[[https://github.com/kaushalmodi/ox-hugo/issues/17#issuecomment-313627728][Discussion]]
**** COMMENT Below will not work!
You cannot wrap markdown code inside HTML.

As /rdwatters/ says [[https://discourse.gohugo.io/t/is-it-possible-to-insert-html-code-in-markdown-content/4867/4?u=kaushalmodi][here]],
#+begin_quote
HTML can be part of markdown because HTML-inside-markdown is part of
the spec. That said, remember that the spec disallows markdown nested
inside of HTML. So if you create a div, just make sure everything
inside that div is valid HTML.
#+end_quote

#+begin_export md
<div class="inset">
#+end_export
[[/images/org-mode-unicorn-logo.png]]
#+begin_export md
</div>
#+end_export
*** Setting =alt= parameter
[[https://www.reddit.com/r/emacs/comments/71wy6n/orgmode_as_a_markup_language_does_make_sense_even/dnhqudn/][Reference]]
#+attr_html: :alt Org-mode Unicorn Logo
Expand Down Expand Up @@ -363,10 +345,28 @@ Rendered this:

So using =#+html: <style>.foo img ... </style>= and =#+attr_html: :class
foo= as shown in the workaround above.
*** Other
**** Other
Similarly, =:link=, =:attr=, =:attrlink= parameters in =#+attr_html=
are also supported to set the corresponding parameter in the Hugo
=figure= shortcode.
*** Pathogenic case (manual HTML tag wrappers in Org source)
It works.. but *don't do it!!*
#+begin_src org
,#+begin_export html
<div class="inset">
,#+end_export
[[/images/org-mode-unicorn-logo.png]]
,#+begin_export html
</div>
,#+end_export
#+end_src
#+begin_export html
<div class="inset">
#+end_export
[[/images/org-mode-unicorn-logo.png]]
#+begin_export html
</div>
#+end_export
** Inlined SVG :svg:inline:
:PROPERTIES:
:EXPORT_FILE_NAME: inlined-svg
Expand Down
23 changes: 22 additions & 1 deletion test/site/content/posts/figure-shortcode-and-attr-html.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,29 @@ So using `#+html: <style>.foo img ... </style>` and `#+attr_html: :class
foo` as shown in the workaround above.


## Other {#other}
### Other {#other}

Similarly, `:link`, `:attr`, `:attrlink` parameters in `#+attr_html`
are also supported to set the corresponding parameter in the Hugo
`figure` shortcode.


## Pathogenic case (manual HTML tag wrappers in Org source) {#pathogenic-case--manual-html-tag-wrappers-in-org-source}

It works.. but **don't do it!!**

```org
#+begin_export html
<div class="inset">
#+end_export
[[/images/org-mode-unicorn-logo.png]]
#+begin_export html
</div>
#+end_export
```

<div class="inset">

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

</div>

0 comments on commit d29f3d8

Please sign in to comment.