Closed kishvanchee closed 2 years ago
This is almost a duplicate of https://github.com/kaushalmodi/ox-hugo/issues/326.
ox-hugo
doesn't yet support specifying the linenos
value. I personally haven't yet tried enabling line numbers by default. I need to try this out and implement.
@kishvanchee This should now work:
#+begin_src text :linenos false
| col_1 | col_2 | col_3 |
| col_1 | col_2 | col_3 |
| col_1 | col_2 | col_3 |
#+end_src
The difference from your example is that the :linenos
value should be false
and not nil
.
As your "source block" is "text", the Org example block looks better IMO:
#+begin_example :linenos false
| col_1 | col_2 | col_3 |
| col_1 | col_2 | col_3 |
| col_1 | col_2 | col_3 |
#+end_example
Updated doc: https://ox-hugo.scripter.co/doc/source-blocks/#line-number-style--linenos
Updated tests:
@kaushalmodi thank you. Can confirm, it works on my end too.
I would like to enable
linenos
by default and disable them for specific code block exports.Actual Behavior
Line nos don't get disabled when exported.
[markup] [markup.highlight] anchorLineNos = false codeFences = true guessSyntax = false hl_Lines = "" lineAnchors = "" lineNoStart = 1 lineNos = true lineNumbersInTable = true
noClasses = false
** TODO Post removing lines nos :PROPERTIES: :EXPORT_FILE_NAME: post-removing-lines-nos :END:
+begin_src text :linenos nil
| col_1 | col_2 | col_3 | | col_1 | col_2 | col_3 | | col_1 | col_2 | col_3 |
+end_src
+++ title = "Post removing lines nos" lastmod = 2021-12-31T02:24:29+05:30 draft = true +++