Skip to content

Commit

Permalink
Update theme and fix the post date for Medium
Browse files Browse the repository at this point in the history
  • Loading branch information
amree committed Sep 20, 2024
1 parent cc999b7 commit 8a1978d
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 1 deletion.
79 changes: 79 additions & 0 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="{{ if .IsHome }}{{ $.Site.Params.Subtitle }}{{ else if .Description}}{{ .Description | plainify }}{{ else }}{{ .Summary | plainify }}{{ end }}" />
<meta name="keywords" content="{{ with .Params.Keywords }}{{ delimit . ", " }}{{ else }}{{ $.Site.Params.Keywords }}{{ end }}" />
{{ if .Params.noindex }}
{{ if or (eq (.Param "noindex") true) (eq (.Param "noindex") "true") }}
<meta name="robots" content="noindex" />
{{ end }}
{{ else }}
<meta name="robots" content="noodp" />
{{ end }}
<link rel="canonical" href="{{ .Permalink }}" />

{{ template "_internal/google_analytics.html" . }}

{{ $css := resources.Match "css/*.css" }}
{{ range $css }}
{{ $styles := . | minify | fingerprint }}
<link rel="stylesheet" href="{{ $styles.Permalink }}">
{{ end }}
<!-- Custom Terminal.css styles -->
{{ if (fileExists "static/terminal.css") -}}
<link rel="stylesheet" href="{{ "terminal.css" | absURL }}">
{{- end }}
<!-- Custom CSS to override theme properties (/static/style.css) -->
{{ if (fileExists "static/style.css") -}}
<link rel="stylesheet" href="{{ "style.css" | absURL }}">
{{- end }}

<!-- Icons -->
<link rel="shortcut icon" href="{{ "favicon.png" | absURL }}">
<link rel="apple-touch-icon" href="{{ "apple-touch-icon.png" | absURL }}">

<!-- Twitter Card -->
<meta name="twitter:card" content="summary" />
{{ if (isset $.Site.Params "twitter") }}
{{ if (isset $.Site.Params.Twitter "site") }}
<meta name="twitter:site" content="{{ $.Site.Params.Twitter.site }}" />
{{ end }}
<meta name="twitter:creator" content="{{ if .IsHome }}{{ $.Site.Params.Twitter.creator }}{{ else if isset .Params "authortwitter" }}{{ .Params.authorTwitter }}{{ else }}{{ .Params.Author }}{{ end }}" />
{{ end }}

<!-- OG data -->
<meta property="og:locale" content="{{ $.Site.Language.Lang }}" />
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" />
<meta property="og:title" content="{{ if .IsHome }}{{ $.Site.Title }}{{ else }}{{ .Title }}{{ end }}">
<meta property="og:description" content="{{ if .IsHome }}{{ $.Site.Params.Subtitle }}{{ else if .Description}}{{ .Description | plainify }}{{ else }}{{ .Summary | plainify }}{{ end }}" />
<meta property="og:url" content="{{ .Permalink }}" />
<meta property="og:site_name" content="{{ $.Site.Title }}" />
{{ if (isset .Params "cover") }}
{{ $pageCover := .Param "cover" }}
{{ with (.Resources.GetMatch (.Param "cover")) }}
{{ $pageCover = .RelPermalink }}
{{ end }}
<meta property="og:image" content="{{ $pageCover | absURL }}">
{{ else }}
<meta property="og:image" content="{{ "og-image.png" | absURL }}">
{{ end }}
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="627">
{{ range .Params.categories }}
<meta property="article:section" content="{{ . }}" />
{{ end }}
{{ if isset .Params "date" }}
<meta property="article:published_time" content="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}" />
{{ end }}

<!-- RSS -->
{{ with .OutputFormats.Get "RSS" }}
<link href="{{ .RelPermalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />
{{ end }}

<!-- JSON Feed -->
{{ with .OutputFormats.Get "json" }}
<link href="{{ .RelPermalink }}" rel="alternate" type="application/json" title="{{ $.Site.Title }}" />
{{ end }}

<!-- Extended head section-->
{{ partial "extended_head.html" . }}
2 changes: 1 addition & 1 deletion themes/terminal
Submodule terminal updated 72 files
+1 −1 .gitignore
+4 −2 .stylelintrc.json
+4 −0 COMMUNITY-FEATURES.md
+45 −49 README.md
+7 −16 USERS.md
+0 −1 archetypes/posts.md
+123 −0 assets/css/buttons.css
+0 −95 assets/css/buttons.scss
+118 −0 assets/css/code.css
+0 −84 assets/css/code.scss
+0 −1 assets/css/color/blue.scss
+0 −1 assets/css/color/green.scss
+0 −1 assets/css/color/orange.scss
+0 −1 assets/css/color/pink.scss
+0 −1 assets/css/color/red.scss
+5 −5 assets/css/fonts.css
+47 −0 assets/css/footer.css
+0 −44 assets/css/footer.scss
+0 −30 assets/css/form.scss
+5 −0 assets/css/gist.css
+0 −6 assets/css/gist.scss
+46 −0 assets/css/header.css
+0 −34 assets/css/header.scss
+0 −8 assets/css/logo.scss
+170 −0 assets/css/main.css
+0 −346 assets/css/main.scss
+149 −0 assets/css/menu.css
+0 −157 assets/css/menu.scss
+97 −0 assets/css/pagination.css
+0 −87 assets/css/pagination.scss
+142 −0 assets/css/post.css
+0 −128 assets/css/post.scss
+324 −0 assets/css/prism.css
+0 −336 assets/css/prism.scss
+0 −19 assets/css/style.scss
+116 −0 assets/css/syntax.css
+0 −153 assets/css/syntax.scss
+377 −0 assets/css/terminal.css
+19 −0 assets/css/terms.css
+0 −9 assets/css/terms.scss
+0 −14 assets/css/variables.scss
+3 −1 exampleSite/config.toml
+3 −4 exampleSite/content/about.md
+156 −48 exampleSite/content/showcase.md
+1 −1 go.mod
+ images/screenshot.png
+ images/terminal-css.png
+ images/terminal-theme-old.png
+ images/terminal-theme.png
+ images/tn.png
+2 −2 layouts/_default/baseof.html
+9 −9 layouts/_default/index.html
+11 −11 layouts/_default/list.html
+12 −12 layouts/_default/single.html
+57 −0 layouts/_default/term.html
+12 −7 layouts/_default/terms.html
+1 −1 layouts/partials/footer.html
+11 −26 layouts/partials/head.html
+1 −1 layouts/partials/menu.html
+1 −1 layouts/partials/pagination.html
+20 −23 layouts/partials/posts_pagination.html
+1 −1 layouts/shortcodes/image.html
+0 −3 resources/_gen/assets/scss/css/base.scss_06c91705bc48efa09403e08ed1e70fce.content
+0 −1 resources/_gen/assets/scss/css/base.scss_06c91705bc48efa09403e08ed1e70fce.json
+ static/apple-touch-icon.png
+ static/favicon.png
+ static/img/theme-colors/blue.png
+ static/img/theme-colors/green.png
+ static/img/theme-colors/pink.png
+ static/img/theme-colors/red.png
+ static/og-image.png
+2 −1 theme.toml

0 comments on commit 8a1978d

Please sign in to comment.