.Kind (page): .Type (posts) / .Layout ()
Bundle: n/a (regular page)
[ categories | tags | search ]
ox-hugo Test Site

This is the test site for the ox-hugo package for Emacs/Org-mode.

It is updated automatically after each commit to the ox-hugo repo. It was last updated on Jul 22, 2020 19:41 UTC.


This page was created/modified in commit ad1b513 "Lower case all Org keywords" on 2018-02-02.
Markdown source of this page

Source blocks with line number annotation

tags: src-block highlight shortcode


Description/Summary

Org reference Hugo highlight shortcode with line numbers Cases Default new line number start Org source #+begin_src emacs-lisp-n ;; this will export with line number 1 (default) (message "This is line 2") #+end_src Output 1 2 ;; this will export with line number 1 (default) (message "This is line 2") Specify new line number start Org source #+begin_src emacs-lisp-n 20 ;; this will export with line number 20 (message "This is line 21") #+end_src Output 20 21 ;; this will export with line number 20 (message "This is line 21") Default continued line numbers Org source #+begin_src emacs-lisp+n ;; This will be listed as line 22 (message "This is line 23") #+end_src Output 22 23 ;; This will be listed as line 22 (message "This is line 23") Specify continued line numbers jump Org source #+begin_src emacs-lisp+n 10 ;; This will be listed as line 33 (message "This is line 34") #+end_src Output 33 34 ;; This will be listed as line 33 (message "This is line 34")


Content

Cases

Default new line number start

Org source

#+begin_src emacs-lisp -n
;; this will export with line number 1 (default)
(message "This is line 2")
#+end_src

Output

1
2
;; this will export with line number 1 (default)
(message "This is line 2")

Specify new line number start

Org source

#+begin_src emacs-lisp -n 20
;; this will export with line number 20
(message "This is line 21")
#+end_src

Output

20
21
;; this will export with line number 20
(message "This is line 21")

Default continued line numbers

Org source

#+begin_src emacs-lisp +n
;; This will be listed as line 22
(message "This is line 23")
#+end_src

Output

22
23
;; This will be listed as line 22
(message "This is line 23")

Specify continued line numbers jump

Org source

#+begin_src emacs-lisp +n 10
;; This will be listed as line 33
(message "This is line 34")
#+end_src

Output

33
34
;; This will be listed as line 33
(message "This is line 34")

Page (Debug)

Page VariableValue
Name "Source blocks with line number annotation"
Title "Source blocks with line number annotation"
ResourceType "page"
Kind "page"
Section "posts"
Draft false
Type "posts"
Layout ""
Permalink "https://ox-hugo.scripter.co/test/posts/source-block-with-line-numbers/"
RelPermalink "/posts/source-block-with-line-numbers/"
Data
page.Data{} (type:page.Data)
NextPageSource blocks with highlighting
PrevPageSpaces in categories
NextInSectionSource blocks with highlighting
PrevInSectionSpaces in categories

Page Params (Debug)

KeyTypeValue
draftbool false
iscjklanguagebool false
lastmodtime.Time 2018-02-02 12:15:32 -0500 -0500
tags[]string "src-block" "highlight" "shortcode"
titlestring "Source blocks with line number annotation"

File Object (Debug)

FileInfo VariableValue
UniqueID "7b78d4912277fad301b39ac0006807b4"
BaseFileName "source-block-with-line-numbers"
TranslationBaseName "source-block-with-line-numbers"
Lang "en"
Section "posts"
LogicalName "source-block-with-line-numbers.md"
Dir "posts/"
Ext "md"
Path "posts/source-block-with-line-numbers.md"

This site is generated using the ox-hugo package for Emacs/Org-mode + hugo-bare-min-theme + Hugo 0.68.3 (commit 157669a0) .
[Test Site home | ox-hugo home]