Vertical sections not displaying


I have this as my sample Hugo page:

title = "Rob's first Hugo reveal site"
outputs = ["Reveal"]
theme = "night"
margin = 0.2
weight = 1

# Slide one

Text for slide one.


# Slide two

Text for slide two.


{{% section %}}

# Slide three - vertical slide one

Text for slide three - vertical slide one


# Slide three - vertical slide two

Text for slide three - vertical slide two

{{% /section %}}

But this is what I see… can anyone tell me what I am doing wrong?

1 Like

To debug your site we have to see the code (not just the contents of one content file). Please read #support issues for examples, and follow the advice at Requesting Help.


Thanks for the hint @maiki, I have uploaded a copy of my sample here:


Is there any possibility that the issue is to do with line-endings?



I think this may have to do with the recent changes in 0.55 around shortcodes:

The easiest way to resolve is probably to let the theme author know so they can fix it in the theme directly. You may have to wait for them to get around to doing it, and then update your copy of the theme to the latest version after.

The fastest is to do it yourself: overwrite the section shortcode by creating a shortcode at yoursite/layouts/shortcodes/section.html. Copy the contents of the theme’s theme/layout/shortcodes/section.html, and add

{{ $_hugo_config := `{ "version": 1 }` }}

to the beginning, as discussed in the relnotes I linked to above.


For future reference, this is what I did to fix this (until the reveal creators update the theme).

$ cp ./themes/reveal-hugo/layouts/shortcodes/section.html ./layouts/shortcodes

$ tree layouts/
`-- shortcodes
    `-- section.html

1 directory, 1 file

Edit that section.html to give it the following contents:

$ cat layouts/shortcodes/section.html
{{ $_hugo_config := `{ "version": 1 }` }}
<section data-shortcode-section>
{{ .Inner }}

And now the section code works as I expected it from following previous (now out of date) tutorial matter.