~reggie/blog

255e1ea4a16de9322eca5cbb3b528851e738797e — Ash a month ago 0cda6af
refactor: remove stuff made unnecessary by enabling minimization
M layouts/404.html => layouts/404.html +1 -1
@@ 1,5 1,5 @@
<!DOCTYPE html>
<html lang="en">
<html lang="{{ site.Language.LanguageCode }}">
    {{ partial "head.html" . }}

    <body>

M layouts/_default/rss.xml => layouts/_default/rss.xml +9 -9
@@ 1,10 1,10 @@
{{- $pctx := .Site -}}
{{- $pages := $pctx.RegularPages -}}
{{- $limit := .Site.Config.Services.RSS.Limit -}}
{{- if ge $limit 1 -}}
{{- $pages = $pages | first $limit -}}
{{- end -}}
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
{{ $pages := .Site.RegularPages }}
{{ $limit := .Site.Config.Services.RSS.Limit }}
{{ if ge $limit 1 }}
    {{ $pages = $pages | first $limit }}
{{ end }}

{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>{{ .Site.Title }}</title>


@@ 17,9 17,9 @@
    <lastBuildDate>{{ now.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>
    <generator>Hugo -- gohugo.io</generator>
    <docs>https://www.rssboard.org/rss-specification</docs>
    {{- with .OutputFormats.Get "RSS" -}}
    {{ with .OutputFormats.Get "RSS" }}
    {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
    {{- end -}}
    {{ end }}
    {{ range where $pages "Type" "blog" }}
    <item>
      <title>{{ .Title }}</title>

M layouts/alias.html => layouts/alias.html +2 -2
@@ 3,9 3,9 @@
    <head>
        <title>{{ .Title }}</title>
        <link rel="canonical" href="{{ .Permalink }}" />
        {{- with .Description }}
        {{ with .Description }}
            <meta name="description" content="{{ . }}" />
        {{- end }}
        {{ end }}
        <meta name="robots" content="noindex" />
        <meta charset="utf-8" />
        <meta http-equiv="refresh" content="0; url={{ .Permalink }}" />

M layouts/index.html => layouts/index.html +4 -6
@@ 1,5 1,5 @@
<!doctype html>
<html lang="en">
<!DOCTYPE html>
<html lang="{{ site.Language.LanguageCode }}">
    {{ partial "head.html" . }}
    <body>
        <h1>{{ .Title }}</h1>


@@ 11,17 11,15 @@
                <a href="/publickey.asc">pgp</a>
                <a href="/index.xml">rss</a>
            </nav>
            {{- with where .Site.RegularPages "Type" "blog" }}
            <ul>
                {{- range . }}
                {{ range (where .Site.RegularPages "Type" "blog" ) }}
                <li>
                    <a href="{{ .RelPermalink }}">{{ .Title }}</a>
                    <span class="date">{{ .Date.Format "2006-01-02" }}</span>
                    {{ with .Description }}<p>{{ . }}</p>{{ end }}
                </li>
                {{- end }}
                {{ end }}
            </ul>
            {{- end }}
        </main>

        {{ partialCached "footer.html" . }}

M layouts/partials/footer.html => layouts/partials/footer.html +0 -1
@@ 7,4 7,3 @@
    <a href="https://spdx.org/licenses/MIT.html">MIT<sup>↗</sup></a
    >.
</footer>
{{- "" -}}

M layouts/partials/head.html => layouts/partials/head.html +11 -11
@@ 3,40 3,40 @@
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="GPTBot" content="noindex" />
    {{- with .Description }}
    {{ with .Description }}
        <meta name="description" content="{{ . }}" />
    {{- end }}
    {{ end }}
    <link
        rel="alternate"
        type="application/rss+xml"
        title="{{ .Site.Title }}"
        href="/index.xml"
    />
    {{- $options := dict "transpiler" "dartsass" }}
    {{ $options := dict "transpiler" "dartsass" }}
    <link
        rel="stylesheet" 
        href="{{ (resources.Get "main.scss" | toCSS $options).RelPermalink }}"
    />
    {{- with resources.Get (printf "%s.scss" .Type) }}
    {{ with resources.Get (printf "%s.scss" .Type) }}
        <link 
            rel="stylesheet"
            href="{{ (. | toCSS $options).RelPermalink }}"
        />
    {{- end }}
    {{- if eq .Params.syntax true }}
    {{ end }}
    {{ if eq .Params.syntax true }}
        <link
            rel="stylesheet"
            href="{{ (
                resources.Get "syntax.scss" | toCSS $options
            ).RelPermalink }}"
        />
    {{- end }}
    {{- with .Params.scripts }}
        {{- range . }}
    {{ end }}
    {{ with .Params.scripts }}
        {{ range . }}
            <script
                src="{{ (resources.Get .).RelPermalink }}"
                defer
            ></script>
        {{- end }}
    {{- end }}
        {{ end }}
    {{ end }}
</head>