mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-19 15:45:33 -04:00
style & homepage tweaks
This commit is contained in:
32
layouts/partials/head.html
Normal file
32
layouts/partials/head.html
Normal file
@@ -0,0 +1,32 @@
|
||||
<meta charset="utf-8">
|
||||
{{ hugo.Generator }}
|
||||
<title>{{ .Title }}{{ if not .IsHome }} – {{ .Site.Title }}{{ else }} 👨‍💻{{ end }}</title>
|
||||
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ .Site.Params.description }}{{ end }}">
|
||||
{{ with .Site.Author.name }}<meta name="author" content="{{ . }}">{{ end }}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
{{ partial "open-graph" . }}
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
||||
<meta name="apple-mobile-web-app-title" content="{{ .Site.Title }}">
|
||||
<meta name="theme-color" content="#0e6dc2">
|
||||
{{ $style := resources.Get "sass/main.scss" | resources.ToCSS (dict "targetPath" "style.css") }}
|
||||
<link rel="stylesheet" href="{{ $style.Permalink }}">
|
||||
<link rel="apple-touch-icon" href="{{ "apple-touch-icon.png" | absURL }}">
|
||||
<link rel="mask-icon" href="{{ "safari-pinned-tab.svg" | absURL }}" color="#009cdf">
|
||||
<link rel="icon" href="{{ "favicon-192.png" | absURL }}" sizes="192x192">
|
||||
<link rel="icon" href="{{ "favicon-48.png" | absURL }}" sizes="48x48">
|
||||
<link rel="icon" href="{{ "favicon-32.png" | absURL }}" sizes="32x32">
|
||||
<link rel="icon" href="{{ "favicon-16.png" | absURL }}" sizes="16x16">
|
||||
<link rel="shortcut icon" href="{{ "favicon.ico" | absURL }}" sizes="16x16 32x32 48x48">
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
<link rel="alternate" type="application/rss+xml" href="{{ "feed.xml" | absURL }}" title="{{ .Site.Title }} (RSS)">
|
||||
<link rel="author" href="{{ "humans.txt" | absURL }}">
|
||||
{{ if and (eq .Type "notes") (eq .Kind "page") }}
|
||||
{{ with .OutputFormats.Get "amp" }}
|
||||
<link rel="amphtml" href="{{ .Permalink }}">
|
||||
{{ end }}
|
||||
{{ partial "schema-person" . }}
|
||||
{{ partial "schema-article" . }}
|
||||
{{ else }}
|
||||
{{ partial "schema-person" . }}
|
||||
{{ end }}
|
@@ -1,10 +1,9 @@
|
||||
{{- $imagePath := "" }}
|
||||
{{- $image := "" }}
|
||||
{{- with .Params.image }}
|
||||
{{- $imagePath = (printf "%s%s%s%s" "content" ($.OutputFormats.Get "html").RelPermalink "images/" .) }}
|
||||
{{- $image = resources.Get (printf "%s%s%s%s" "content" ($.OutputFormats.Get "html").RelPermalink "images/" .) }}
|
||||
{{- else }}
|
||||
{{- $imagePath = (printf "%s%s" "content" $.Site.Params.defaultimage) }}
|
||||
{{- $image = resources.Get (printf "%s%s" "content" $.Site.Params.defaultimage) }}
|
||||
{{- end }}
|
||||
{{- $image := resources.Get $imagePath -}}
|
||||
|
||||
<meta property="og:title" content="{{ .Title }}">
|
||||
<meta property="og:site_name" content="{{ .Site.Title }}">
|
||||
@@ -33,8 +32,9 @@
|
||||
{{- with .Params.tags }}{{ range . }}
|
||||
<meta property="article:tag" content="{{ . }}">{{ end }}{{ end }}
|
||||
{{- end }}
|
||||
{{ with .Site.Author.facebook_id }}<meta property="fb:admins" content="{{ . }}">{{ end }}
|
||||
{{ with .Site.Params.facebook_app_id }}<meta property="fb:app_id" content="{{ . }}">{{ end }}
|
||||
|
||||
{{ with .Site.Author.facebookid }}<meta property="fb:admins" content="{{ . }}">{{ end }}
|
||||
{{ with .Site.Params.facebookappid }}<meta property="fb:app_id" content="{{ . }}">{{ end }}
|
||||
<meta name="twitter:card" content="summary">
|
||||
<meta name="twitter:domain" content="{{ .Site.Params.domain }}">
|
||||
{{- with .Site.Author.twitter }}
|
||||
|
@@ -1,8 +1,7 @@
|
||||
{{- $imagePath := "" }}
|
||||
{{- $image := "" }}
|
||||
{{- with .Params.image }}
|
||||
{{- $imagePath = (printf "%s%s%s%s" "content" ($.OutputFormats.Get "html").RelPermalink "images/" .) }}
|
||||
{{- $image = resources.Get (printf "%s%s%s%s" "content" ($.OutputFormats.Get "html").RelPermalink "images/" .) }}
|
||||
{{- end }}
|
||||
{{- $image := resources.Get $imagePath -}}
|
||||
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
|
Reference in New Issue
Block a user