You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
151 lines
4.2 KiB
151 lines
4.2 KiB
#+HUGO_BASE_DIR: ../ |
|
#+OPTIONS: loffset:1 |
|
#+SEQ_TODO: TODO DRAFT DONE |
|
|
|
* Preparation |
|
:PROPERTIES: |
|
:EXPORT_FILE_NAME: prep |
|
:END: |
|
1. Be the root directory for this Hugo site (the directory containing =config.toml=). |
|
2. Run |
|
#+BEGIN_EXAMPLE |
|
hugo server --port 1111 |
|
#+END_EXAMPLE |
|
3. See the site served on "http://localhost:1111/" |
|
* Post 1 |
|
:PROPERTIES: |
|
:EXPORT_FILE_NAME: post-1 |
|
:END: |
|
Export this *first* post only by moving point here and doing =C-c C-e |
|
H H=. |
|
* Post 2 |
|
:PROPERTIES: |
|
:EXPORT_FILE_NAME: post-2 |
|
:END: |
|
Export this *second* post only by moving point here and doing =C-c C-e |
|
H H=. |
|
* Image |
|
:PROPERTIES: |
|
:EXPORT_FILE_NAME: image |
|
:EXPORT_TAGS: 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 (works!) |
|
[[/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_EXAMPLE |
|
# Unclickable image |
|
#+END_EXAMPLE |
|
instead of |
|
#+BEGIN_EXAMPLE |
|
## Unclickable image |
|
#+END_EXAMPLE |
|
|
|
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 (works!) |
|
[[/images/org-mode-unicorn-logo.png][Click here to see the unicorn]] |
|
** Clickable image that opens the image (works!) |
|
Click below image to jump to the unicorn image. |
|
[[file:/images/org-mode-unicorn-logo.png][file:/images/org-mode-unicorn-logo.png]] |
|
|
|
- NOTE :: =file:= has to be used in both Link and Description components |
|
of the Org link. |
|
** Image with =ATTR_HTML= [[https://github.com/kaushalmodi/ox-hugo/issues/17][Issue # 17]] |
|
#+ATTR_HTML: :class inset |
|
[[/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 heading anchors |
|
:PROPERTIES: |
|
:EXPORT_FILE_NAME: setting-heading-anchors |
|
:END: |
|
** Heading 1 of the post |
|
:PROPERTIES: |
|
:CUSTOM_ID: cool-ref-1 |
|
:END: |
|
Something |
|
*** Heading 1.1 of the post |
|
:PROPERTIES: |
|
:CUSTOM_ID: cool-ref-1.1 |
|
:END: |
|
Something else |
|
** Heading 2 of the post |
|
:PROPERTIES: |
|
:CUSTOM_ID: cool-ref-2 |
|
:END: |
|
Something 2 |
|
*** Heading 2.1 of the post |
|
:PROPERTIES: |
|
:CUSTOM_ID: cool-ref-2.1 |
|
:END: |
|
Something 2.1 |
|
* Post heading with crazy characters |
|
:PROPERTIES: |
|
:EXPORT_FILE_NAME: post-heading-slugs |
|
:END: |
|
** Releasing version 1.1 |
|
** Foo ( Bar ) Baz |
|
** (Foo)Bar.Baz&Zoo |
|
** Hey! I have a link [[https://example.org][here]] (Awesome!) |
|
* Excluded post :noexport: |
|
:PROPERTIES: |
|
:EXPORT_FILE_NAME: excluded-post |
|
:END: |
|
This post must not be exported as it is tagged =noexport=. |
|
* COMMENT Commented post |
|
:PROPERTIES: |
|
:EXPORT_FILE_NAME: commented-post |
|
:END: |
|
This post must not be exported as it is commented. |
|
* Test tags :abc:def: |
|
:PROPERTIES: |
|
:EXPORT_FILE_NAME: test-tags |
|
:END: |
|
* TODO Draft state |
|
:PROPERTIES: |
|
:EXPORT_FILE_NAME: draft-state-todo |
|
:END: |
|
If a post has the =TODO= keyword, the =draft= front matter variable |
|
should be set to =true=. |
|
|
|
Idea to to mark a post or blog idea as =TODO= that you yet have to |
|
start writing. |
|
* DRAFT Draft state |
|
:PROPERTIES: |
|
:EXPORT_FILE_NAME: draft-state-draft |
|
:END: |
|
If a post has the =DRAFT= keyword too, the =draft= front matter variable |
|
should be set to =true=. |
|
|
|
Idea is to mark a post as =DRAFT= that you have already started |
|
writing, or are in the process at the moment, but it is not yet ready |
|
to be published |
|
|
|
|