I’ve recently published my site to codeberg pages using forgejo actions and I’ve been having an issue with it removing a bunch of whitespaces in my page that do not show up in the local builds using the hugo server
command. Below I’ve attached an image to give you an idea of what this issue looks like.
The way the site is being build is by using forgejo actions using the yaml file provided in the Host on Codeberg from the Hugo’s documentation, but it does not output the same as using the hugo server
command and I have no idea how to troubleshoot and actually fix this issue, I’d like some ideas on what might be causing this issue as well as any possible way to make the hugo server
command align with what’s being deployed as I really have no idea why the whitespace does not show up in the deployed site as opposed to the local build process.
Below here is the code for these following elements as shown in the image in case it might help:
Hover on note text
In Post:
> {{<icon icon="bulb" class="icon-default" class2="icon-gap">}}Hover on "{{<tooltip text="Like that.">}}Note{{</tooltip>}}" or other {{<tooltip text="Like this.">}}dotted underlined text{{</tooltip>}} for more info.
Shortcode:
<span class="tooltip">
{{ .Inner | markdownify -}}
<span class="tooltiptext">
{{- .Get "text" | markdownify -}}
</span>
</span>
{{- /* This comment removes trailing newlines. */ -}}
Font settings menu
HTML
<li id="font-settings">
<div class="font-toggle" tabindex="1">
<i class="font-closer" tabindex="1"></i>
<a>
{{ partial "helper/icon" "typeface" }}
<span class="font-menu">{{- T "fontMenu" -}}</span>
</a>
<div class="tooltiptext">
<div>
<label class="radio" data-font="sans-serif">
<input type="radio" name="font" value="sans-serif" checked>
<span title="Adwaita Sans">Sans Serif</span>
</label>
<label class="radio" data-font="serif">
<input type="radio" name="font" value="serif">
<span title="Literata">Serif</span>
</label>
<label class=radio data-font="accessibility">
<input type="radio" name="font" value="accessibility">
<span title="Atkinson Hyperlegible Next">Accessibility</span>
</label>
</div>
</div>
</li>
SCSS
@media (max-width: 600px) {
&[data-font="sans-serif"]::after {
content: "(Adwaita Sans)";
color: var(--unhighlighted-text-color);
font-weight: 300;
}
&[data-font="serif"]::after {
content: "(Literata)";
color: var(--unhighlighted-text-color);
font-weight: 300;
}
&[data-font="accessibility"]::after {
content: "(Atkinson Hyperlegible Next)";
color: var(--unhighlighted-text-color);
font-weight: 300;
}
}
Any additional code can be found on Codeberg and in case it’s helpful you can see the build process on the repos actions tab as well.