Skip to content

Commit

Permalink
Enable use of HTML in docs (#1900)
Browse files Browse the repository at this point in the history
Fix alignment documentation:
- while it renders fine on the web, it's stripped from man pages.
  Inline HTML renders fine in some cases, but tables don't.

There's no unified (remark) plugin that works well with headless
tables pandoc supports as well, so the only way to achieve a similar
effect is to leave header cells empty.

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
  • Loading branch information
Caellian authored May 6, 2024
1 parent a03f0bc commit f5b7106
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 840 deletions.
3 changes: 2 additions & 1 deletion doc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ if(BUILD_DOCS)
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
SOURCES config_settings.yaml variables.yaml lua.yaml man.md.j2
)
set(pandoc_mode markdown-markdown_in_html_blocks+raw_html)
add_custom_target(conky.1
ALL
COMMAND ${APP_PANDOC} --standalone -f markdown+raw_html -t man ${CMAKE_CURRENT_BINARY_DIR}/man.md > ${CMAKE_CURRENT_BINARY_DIR}/conky.1
COMMAND ${APP_PANDOC} --standalone -f ${pandoc_mode} -t man ${CMAKE_CURRENT_BINARY_DIR}/man.md > ${CMAKE_CURRENT_BINARY_DIR}/conky.1
SOURCES config_settings.yaml variables.yaml lua.yaml man.md.j2
)
add_dependencies(conky.1 man.md)
Expand Down
22 changes: 5 additions & 17 deletions doc/config_settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,11 @@ values:
desc: |-
Aligned position on screen, may be `none` or one of:
<table>
<tr>
<td><code>top_left</code> (<em>or</em> <code>tl</code>)</td>
<td><code>top_middle</code> (<em>or</em> <code>tm</code>)</td>
<td><code>top_right</code> (<em>or</em> <code>tr</code>)</td>
</tr>
<tr>
<td><code>middle_left</code> (<em>or</em> <code>ml</code>)</td>
<td><code>middle_middle</code> (<em>or</em> <code>mm</code>)</td>
<td><code>middle_right</code> (<em>or</em> <code>mr</code>)</td>
</tr>
<tr>
<td><code>bottom_left</code> (<em>or</em> <code>bl</code>)</td>
<td><code>bottom_middle</code> (<em>or</em> <code>bm</code>)</td>
<td><code>bottom_right</code> (<em>or</em> <code>br</code>)</td>
</tr>
</table>
| | | |
|:----------------------|:-----------------------:|-----------------------:|
|`top_left` (or `tl`) | `top_middle` (or `tm`) | `top_right` (or `tr`)|
|`middle_left` (or `ml`)|`middle_middle` (or `mm`)|`middle_right` (or `mr`)|
|`bottom_left` (or `bl`)|`bottom_middle` (or `bm`)|`bottom_right` (or `br`)|
In case of `panel` and `dock` windows, it might make more sense to use one
of the following aliases:
Expand Down
Loading

0 comments on commit f5b7106

Please sign in to comment.