Baseof
Updated on
Last site update: 8 May 2024
Code for this site’s <head>
section.
Interesting is line 14, the RSS section using printf
.
1<!DOCTYPE html>
2<html lang="{{ .Site.LanguageCode | default "en-us" }}">
3<head>
4 {{ hugo.Generator }}
5 <meta charset="UTF-8">
6 <meta name="viewport" content="width=device-width, initial-scale=1">
7 <meta http-equiv="X-UA-Compatible" content="IE=edge">
8 <title>{{ .Title }} | {{ .Site.Title }}</title>
9 {{ with .Site.Params.description }}<meta name="description" content="{{ . }}">{{ end }}
10 {{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
11 <link href="https://fonts.googleapis.com/css2?family=Epilogue:ital,wght@0,300;0,600;1,300&family=Roboto+Mono:wght@400;500&display=swap" rel="stylesheet">
12 <link rel="stylesheet" href="{{ "css/style.css" | relURL }}">
13 {{ with .OutputFormats.Get "RSS" -}}
14 {{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
15 {{- end }}
16</head>
17<body>
18 {{ partial "header" . }}
19 {{ block "main" . }}{{ end }}
20 {{ partial "test-panel" . }}
21 {{ partial "footer" . }}
22</body>
23</html>