Compare commits

...

6 Commits

Author SHA1 Message Date
samsepi0l 416eeb81cb
Merge df6d059a85 into 5e61be5903 2023-12-31 22:40:18 +01:00
Wonderfall 5e61be5903
Update README.md 2023-12-31 20:57:00 +01:00
Wonderfall 71871d277c enforce xml escaping for content 2023-12-31 20:29:46 +01:00
Wonderfall 73484a80d7 refactor rss template 2023-12-31 20:09:48 +01:00
Wonderfall 4b45709402 add back XML content namespace to RSS 2023-12-31 18:23:55 +01:00
samsepi0l df6d059a85
Improve favicons
- Add mask_icon color
- Add manifest
- Make icon type, apple-touch-icon type, and svg (mask_icon) type explicit
2023-12-16 12:18:23 +01:00
3 changed files with 45 additions and 46 deletions

View File

@ -13,13 +13,14 @@ When implementing new features, I try to do as much as I can with pure CSS code
### Main changes
Current "main" changes are as follows:
- Remove inline JavaScript ([2528906](https://github.com/Wonderfall/hugo-WonderMod/commit/2528906a38a1ca8a50b3e3a74ffcf9a01a0483a7))
- Improved YouTube shortcode ([4dc3bee](https://github.com/Wonderfall/hugo-WonderMod/commit/4dc3bee5477b6d22ce830faa13375f4c2e6a216b))
- Built-in Chroma instead of client-side syntax highlighting with HLJS ([841141](https://github.com/Wonderfall/hugo-WonderMod/commit/8411411a671785d098ffff9323b064acc0c16cb4))
- Responsive Table of Contents with side display support ([2303605](https://github.com/Wonderfall/hugo-WonderMod/commit/230360552b44a8e45496da76ae539a63ad0a3f5a))
- Responsive "hamburger" menu for mobile ([723ac4f](https://github.com/Wonderfall/hugo-WonderMod/commit/723ac4f5c68180b816ebf1dce26839fd3db02ab3))
- Simple reading progress bar ([13876be](https://github.com/Wonderfall/hugo-WonderMod/commit/13876beb0afd9d535890e82af459e639064650f1))
- Bunch of CSS and other changes (see [commit history](https://github.com/Wonderfall/hugo-WonderMod/commits/master))
- Remove inline JavaScript
- Improved YouTube shortcode
- Built-in Chroma instead of client-side syntax highlighting with HLJS
- Responsive Table of Contents with side display support
- Responsive "hamburger" menu for mobile
- Simple reading progress bar
- Refactored RSS template (proper Atom feed)
- Bunch of CSS and other changes
### Credits
Additional credits:

View File

@ -42,42 +42,39 @@
{{- 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>{{ if eq .Title site.Title }}{{ site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ site.Title }}{{ end }}</title>
<link>{{ .Permalink }}</link>
<description>Recent content {{ if ne .Title site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ site.Title }}</description>
{{- with site.Params.images }}
<image>
<title>{{ site.Title }}</title>
<url>{{ index . 0 | absURL }}</url>
<link>{{ index . 0 | absURL }}</link>
</image>
{{- end }}
<generator>Hugo -- gohugo.io</generator>
<language>{{ site.Language.LanguageCode }}</language>{{ with $authorEmail }}
<managingEditor>{{.}}{{ with $authorName }} ({{ . }}){{ end }}</managingEditor>{{ end }}{{ with $authorEmail }}
<webMaster>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</webMaster>{{ end }}{{ with site.Copyright }}
<copyright>{{ . }}</copyright>{{ end }}{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{- with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{- end }}
{{- range $pages }}
<feed xmlns="http://www.w3.org/2005/Atom">
<title>{{ if eq .Title site.Title }}{{ site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ site.Title }}{{ end }}</title>
<link rel="alternate" href="{{ (.OutputFormats.Get "HTML").Permalink }}" />
<link rel="self" href="{{ (.OutputFormats.Get "RSS").Permalink }}" />
<subtitle>Recent content {{ if ne .Title site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ site.Title }}</subtitle>
<id>{{ .Permalink }}</id>
<generator uri="http://gohugo.io" version="{{ hugo.Version }}">Hugo</generator>
<language>{{ site.Language.LanguageCode }}</language>
<updated>{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}</updated>
<author>
{{ with $authorName }}<name>{{ . }}</name>{{ end }}
{{ with $authorEmail }}<name>{{ . }}</name>{{ end }}
</author>
{{ with site.Copyright }}<rights>{{ . }}</rights>{{ end }}
{{- range $pages }}
{{- if and (ne .Layout `search`) (ne .Layout `archives`) }}
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{- with $authorEmail }}<author>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</author>{{ end }}
<guid>{{ .Permalink }}</guid>
<description>{{ with .Description | html }}{{ . }}{{ else }}{{ .Summary | html }}{{ end -}}</description>
{{- if site.Params.ShowFullTextinRSS }}
<content:encoded>{{ (printf "<![CDATA[%s]]>" .Content) | safeHTML }}</content:encoded>
{{- end }}
</item>
<entry>
<title>{{ .Title }}</title>
<link rel="alternate" href="{{ .Permalink }}" />
<id>{{ .Permalink }}</id>
<published>{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}</published>
<updated>{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}</updated>
<summary type="html">{{ with .Description | html }}{{ . }}{{ else }}{{ .Summary | html }}{{ end -}}</summary>
{{- if site.Params.ShowFullTextinRSS }}
<content type="html">{{ (printf "<![CDATA[%s]]>" .Content) | safeHTML }}</content>
{{- end }}
</entry>
{{- end }}
{{- end }}
</channel>
</rss>
{{- end }}
</feed>

View File

@ -83,11 +83,12 @@
</noscript>
{{- /* Favicons */}}
<link rel="icon" href="{{ site.Params.assets.favicon | default "favicon.ico" | absURL }}">
<link rel="icon" type="image/x-icon" href="{{ site.Params.assets.favicon | default "favicon.ico" | absURL }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ site.Params.assets.favicon16x16 | default "favicon-16x16.png" | absURL }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ site.Params.assets.favicon32x32 | default "favicon-32x32.png" | absURL }}">
<link rel="apple-touch-icon" href="{{ site.Params.assets.apple_touch_icon | default "apple-touch-icon.png" | absURL }}">
<link rel="mask-icon" href="{{ site.Params.assets.safari_pinned_tab | default "safari-pinned-tab.svg" | absURL }}">
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="{{ site.Params.assets.apple_touch_icon | default "apple-touch-icon.png" | absURL }}">
<link rel="mask-icon" type="image/svg+xml" href="{{ site.Params.assets.safari_pinned_tab | default "safari-pinned-tab.svg" | absURL }}" color="{{ site.Params.assets.mask_icon | default "#2e2e33" }}">
<link rel="manifest" href="{{ site.Params.assets.site_webmanifest | default "site.webmanifest" | absURL }}">
<meta name="theme-color" content="{{ site.Params.assets.theme_color | default "#2e2e33" }}">
<meta name="msapplication-TileColor" content="{{ site.Params.assets.msapplication_TileColor | default "#2e2e33" }}">