Inline code blocks
Description/Summary
Test exporting inline code blocksContent
Only results (default) #
src_emacs-lisp{(message "Hello 1")}
Hello 1
Above is the same as:
src_emacs-lisp[:exports results]{(message "Hello 1")}
Hello 1
Only code #
src_emacs-lisp[:exports code]{(message "Hello 2")}
(message "Hello 2")
Both code and results #
src_emacs-lisp[:exports both]{(message "Hello 3")}
(message "Hello 3") Hello 3
None! #
src_emacs-lisp[:exports none]{(message "Hello 4")}
Escape Hugo shortcodes #
- md
{{< some_shortcode "foo" >}}- org
{{% some_shortcode "foo" %}}- go-html-template
{{< some_shortcode "foo" >}}
Using custom CSS for inline src blocks #
ox-hugo Issue #638
CSS used here:
<style>
.inline-src.language-nim code::before {
color: initial;
content: "「";
}
.inline-src.language-nim code::after {
color: initial;
content: "」";
}
</style>
ox-hugo Issue #640 – Test that straight quotes in inline src
blocks don’t get rendered as curved quotes by Hugo/Goldmark’s
Typographer.
In Nim, echo "hello" will print
hello.
Page (Debug)
| Page Variable | Value | |
|---|---|---|
| Name | "Inline code blocks" | |
| Title | "Inline code blocks" | |
| ResourceType | "page" | |
| Kind | "page" | |
| Section | "posts" | |
| Draft | false | |
| Type | "posts" | |
| Layout | "" | |
| Permalink | "https://ox-hugo.scripter.co/test/posts/inline-code-blocks/" | |
| RelPermalink | "/posts/inline-code-blocks/" | |
| Data |
| |
| NextPage | Inheriting tags | |
| PrevPage | Inline hyperlinked and non-hyperlinked images | |
| NextInSection | Inheriting tags | |
| PrevInSection | Inline hyperlinked and non-hyperlinked images |
Page Params (Debug)
| Key | Type | Value |
|---|---|---|
| description | string | "Test exporting inline code blocks" |
| draft | bool | false |
| iscjklanguage | bool | false |
| lastmod | time.Time | 2022-05-22 15:58:40 -0400 -0400 |
| tags | []string | "inline" "code" |
| title | string | "Inline code blocks" |
File Object (Debug)
| FileInfo Variable | Value |
|---|---|
| UniqueID | "74219591782a60ebde7bfaf42195ba83" |
| BaseFileName | "inline-code-blocks" |
| TranslationBaseName | "inline-code-blocks" |
| Lang | "en" |
| Section | "posts" |
| LogicalName | "inline-code-blocks.md" |
| Dir | "posts/" |
| Ext | "md" |
| Path | "posts/inline-code-blocks.md" |