If I look at the generated html files for my site, I find (for example):
<!DOCTYPE html>
<html lang="en">
<head>
<title>HP 8640B Part 2: Mains input and rectifier board replacement</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link rel="stylesheet" href="/application.329a340bbaf43ee282aa1d1e756d60440b8483a27c895d03dec3cb4d8c51e73d.css" integrity="sha256-Mpo0C7r0PuKCqh0edW1gRAuEg6J8iV0D3sPLTYxR5z0=" />
<link rel="icon" type="image/png" href="/images/logo_hu03100fbc35296c522ace3dd4201c056d_25145_42x0_resize_box_3.png" />
<meta property="og:title" content="HP 8640B Part 2: Mains input and rectifier board replacement" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://boxfish.be/posts/20240206-hp-8640b-2-mains-input-and-rectifier-board-replacement/" /><meta property="article:section" content="posts" />
<meta property="article:published_time" content="2024-02-06T21:12:29+01:00" />
<meta property="article:modified_time" content="2024-02-06T21:12:29+01:00" />
<meta name="twitter:card" content="summary"/><meta name="twitter:title" content="HP 8640B Part 2: Mains input and rectifier board replacement"/>
<meta name="twitter:description" content="Introduction 6 years ago I acquired an HP 8640B that needed work (see HP 8640B Part 1: initial state).>
<meta name="description" content="HP 8640B Part 2: Mains input and rectifier board replacement" />
This is just part of the <head> section. Notice the large amount of whitelines.
A bit further down that same html file, I found 63 consecutive whitelines, none of which came from the content/MarkDown files.
I looked at /layout/partials/head.html as a start. As a test, I replaced many of the {{ xxxxxx }} tags (is this correct terminology?) with {{- xxxxxxxxx -}} to strip whitespace and removed all empty lines.
Building my site with these changes greatly reduced the amount of empty lines in the relevant section of my html file.
So I have a couple of questions:
Is there a reason to worry about the empty lines besides that it just looks "wrong" and makes it harder to read. While not much, it also provides additional overhead.
Is there a reason why this is done this way? Is there a reason to keep it? Or is it mostly a matter of "no one noticed"?
I would gladly over the .html files in /layout/partials, replace all the {{ xxx }} with {{- xxxxx -}} and then create a PR, but I'm not sure that's ok to do. I have not enough knowledge yet to understand all possible implications and neither do I just want to blindly make a lot of changes and then try to get that merged...
If I look at the generated html files for my site, I find (for example):
This is just part of the
<head>
section. Notice the large amount of whitelines. A bit further down that same html file, I found 63 consecutive whitelines, none of which came from the content/MarkDown files.I looked at
/layout/partials/head.html
as a start. As a test, I replaced many of the{{ xxxxxx }}
tags (is this correct terminology?) with{{- xxxxxxxxx -}}
to strip whitespace and removed all empty lines.Building my site with these changes greatly reduced the amount of empty lines in the relevant section of my html file.
So I have a couple of questions:
.html
files in/layout/partials
, replace all the{{ xxx }}
with{{- xxxxx -}}
and then create a PR, but I'm not sure that's ok to do. I have not enough knowledge yet to understand all possible implications and neither do I just want to blindly make a lot of changes and then try to get that merged...Thanks!