-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an example showing how to wrap Org headings in HTML tags
Ref: #160
- Loading branch information
1 parent
5accde7
commit 58a4aef
Showing
2 changed files
with
110 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
test/site/content/posts/wrapping-org-headings-in-html-tags.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
+++ | ||
title = "Wrapping Org headings in HTML tags" | ||
description = """ | ||
Test the workaround for wrapping Org headings in HTML tags like | ||
`section` and `div`. | ||
""" | ||
tags = ["body", "wrapping", "headings", "section", "tags", "HTML"] | ||
draft = false | ||
+++ | ||
|
||
`ox-hugo` Issue #[160](https://github.com/kaushalmodi/ox-hugo/issues/160) | ||
|
||
|
||
## Org Source {#org-source} | ||
|
||
```org | ||
#+html: <style>.left { float: left; width: 45%;} .right { float: right; width: 45%;}</style> | ||
#+html: <section class="left"> | ||
# Hack to get around Blackfriday limitation: https://github.com/kaushalmodi/ox-hugo/issues/93 | ||
#+html: <section></section> | ||
**** This section will show up on the left side | ||
Content in the left side section | ||
#+html: </section> | ||
#+html: <section class="right"> | ||
#+html: <section></section> | ||
**** This section will show up on the right side | ||
Content in the right side section | ||
#+html: </section> | ||
# Clear the floats | ||
#+html: <div style="clear: both;"></div> | ||
``` | ||
|
||
|
||
## Output {#output} | ||
|
||
<style>.left { float: left; width: 45%;} .right { float: right; width: 45%;}</style> | ||
|
||
<section class="left"> | ||
|
||
<section></section> | ||
|
||
|
||
### This section will show up on the left side {#this-section-will-show-up-on-the-left-side} | ||
|
||
Content in the left side section | ||
|
||
</section> | ||
|
||
<section class="right"> | ||
|
||
<section></section> | ||
|
||
|
||
### This section will show up on the right side {#this-section-will-show-up-on-the-right-side} | ||
|
||
Content in the right side section | ||
|
||
</section> | ||
|
||
<div style="clear: both;"></div> |