html: Render headline priority
This commit is contained in:
parent
a861437185
commit
0e64f9df7f
4 changed files with 11 additions and 1 deletions
|
@ -8,7 +8,6 @@ Take a look at [[https://niklasfasching.github.io/go-org/][github pages]] for so
|
|||
[[/images/org-mode-unicorn-logo.png]]
|
||||
- more keywords: https://orgmode.org/manual/In_002dbuffer-settings.html
|
||||
- headlines
|
||||
- export priority as default
|
||||
- unique ids
|
||||
- CUSTOM_ID drawer property
|
||||
- see [[https://github.com/kaushalmodi/ox-hugo/blob/8472cf2d8667754c9da3728255634e8001a1da6d/ox-hugo.el#L1785-L1850][ox-hugo]] for auto generation
|
||||
|
|
|
@ -113,3 +113,8 @@ figcaption {
|
|||
dl { font-family: monospace, monospace; }
|
||||
dl > dt { font-weight: bold; }
|
||||
dl > dd { margin: -1em 0 1em 1em; }
|
||||
|
||||
.todo, .priority, .tags {
|
||||
font-size: 0.8em;
|
||||
color: lightgrey;
|
||||
}
|
||||
|
|
|
@ -197,6 +197,10 @@ func (w *HTMLWriter) writeHeadline(h Headline) {
|
|||
if h.Status != "" {
|
||||
w.WriteString(fmt.Sprintf(`<span class="todo">%s</span>`, h.Status) + "\n")
|
||||
}
|
||||
if h.Priority != "" {
|
||||
w.WriteString(fmt.Sprintf(`<span class="priority">%s</span>`, h.Priority) + "\n")
|
||||
}
|
||||
|
||||
w.WriteString(title)
|
||||
if len(h.Tags) != 0 {
|
||||
tags := make([]string, len(h.Tags))
|
||||
|
|
2
org/testdata/headlines.html
vendored
2
org/testdata/headlines.html
vendored
|
@ -3,6 +3,7 @@ Simple Headline
|
|||
</h1>
|
||||
<h1>
|
||||
<span class="todo">TODO</span>
|
||||
<span class="priority">B</span>
|
||||
Headline with todo status & priority
|
||||
</h1>
|
||||
<h1>
|
||||
|
@ -13,6 +14,7 @@ Headline with TODO status
|
|||
the <strong>content</strong>
|
||||
</p>
|
||||
<h1>
|
||||
<span class="priority">A</span>
|
||||
Headline with tags & priority   <span class="tags"><span>foo</span> <span>bar</span></span>
|
||||
</h1>
|
||||
<p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue