Skip to content

Commit

Permalink
Merge pull request #51 from alanphil2k01/main
Browse files Browse the repository at this point in the history
Add meta tags and remove font-awesome integrity checks
  • Loading branch information
aldrinjenson authored Feb 9, 2023
2 parents eaff1bb + 3b7b844 commit 205c5ef
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 48 deletions.
2 changes: 1 addition & 1 deletion config/_default/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ canonifyURLs = true

languageCode = "en"
DefaultContentLanguage = "en"
title = "IEDC Blog"
# title = "IEDC Blog"
theme = "anatole"
mainSections = ["post"]

Expand Down
6 changes: 6 additions & 0 deletions config/_default/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ reversepagetitle = true # When set to 'true', the Window Title will be reversed

# hidesidebar = true

[meta]
title = "IEDCMEC Blog"
description = "Official Blog of IEDCMEC"
metaURL = "https://blog.iedcmec.in/"
metaImgURL = "https://blog.iedcmec.in/images/site-feature-image.webp"

[simpleAnalytics]
# enable = true
# customurl = "https://analytics.example.com"
Expand Down
6 changes: 3 additions & 3 deletions layouts/partials/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ <h1 class="sidebar__introduction-title">
</div>

{{ end }}
<div class="sidebar__introduction-description">
<p>{{ replace .Site.Params.description "\n" "<br />" | safeHTML }}</p>
</div>
<!-- <div class="sidebar__introduction-description"> -->
<!-- <p>{{ replace .Site.Params.description "\n" "<br />" | safeHTML }}</p> -->
<!-- </div> -->
</div>
<ul class="sidebar__list">
{{ range $item := .Site.Params.socialIcons }}
Expand Down
Binary file added static/images/global/site-feature-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/site-feature-image.webp
Binary file not shown.
109 changes: 65 additions & 44 deletions themes/anatole/layouts/partials/head.html
Original file line number Diff line number Diff line change
@@ -1,43 +1,78 @@
<head>
<title>
{{ if (eq .Site.Params.reversepagetitle true) }}
{{ with .Title }}
{{ . }} |
<!-- <title> -->
<!-- {{ if (eq .Site.Params.reversepagetitle true) }} -->
<!-- {{ with .Title }} -->
<!-- {{ . }} | -->
<!---->
<!-- {{ end }} -->
<!-- {{- .Site.Params.author -}} -->
<!---->
<!---->
<!-- {{ else }} -->
<!-- {{- .Site.Params.author -}}{{ with .Title }} -->
<!-- | -->
<!-- {{ . }} -->
<!---->
<!---->
<!-- {{ end }} -->
<!---->
<!---->
<!-- {{ end }} -->
<!---->
<!-- </title> -->
<!---->

<title>{{- .Site.Params.meta.title -}}</title>
<!-- Meta -->
<meta charset="utf-8" />
{{- hugo.Generator -}}
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="{{ .Site.Params.author }}" />
<meta name="title" content="{{- .Site.Params.meta.title -}}">
<meta
name="description"
content="{{ if .Params.description }}
{{- .Params.description -}}
{{ end }}
{{- .Site.Params.author -}}
{{ else }}
{{- .Site.Params.meta.description -}}
{{ else }}
{{- .Site.Params.author -}}{{ with .Title }}
|
{{ . }}
{{ end }}"
/>

{{ end }}
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website">
<meta property="og:url" content="{{- .Site.Params.meta.metaURL -}}">
<meta property="og:title" content="{{- .Site.Params.meta.title -}}">
<meta property="og:description" content="{{ if .Params.description }}
{{- .Params.description -}}
{{ end }}
{{ else }}
{{- .Site.Params.meta.description -}}
</title>
<!-- Meta -->
<meta charset="utf-8" />
{{- hugo.Generator -}}
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover" />
<meta name="author" content="{{ .Site.Params.author }}" />
<meta
name="description"
content="{{ if .Params.description }}
{{- .Params.description -}}
{{ end }}">
<meta property="og:image" content="{{- .Site.Params.meta.metaImgURL -}}">

<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:url" content="{{- .Site.Params.meta.metaURL -}}">
<meta property="twitter:title" content="{{- .Site.Params.meta.title -}}">
<meta property="twitter:description" content="{{ if .Params.description }}
{{- .Params.description -}}
{{ else }}
{{- .Site.Params.description -}}
{{ else }}
{{- .Site.Params.meta.description -}}
{{ end }}">
<meta property="twitter:image" content="{{- .Site.Params.meta.metaImgURL -}}">


{{ end }}"
/>
{{ if .Params.redirectUrl }}
<meta http-equiv="refresh" content="1; url={{ .Params.redirectUrl }}" />

Expand All @@ -55,7 +90,6 @@
<link
rel="stylesheet"
href="{{ $style.RelPermalink }}"
integrity="{{ $style.Data.Integrity }}"
crossorigin="anonymous"
type="text/css"
/>
Expand All @@ -66,7 +100,6 @@
<link
rel="stylesheet"
href="{{ $style.RelPermalink }}"
integrity="{{ $style.Data.Integrity }}"
crossorigin="anonymous"
type="text/css"
/>
Expand All @@ -77,7 +110,6 @@
<link
rel="stylesheet"
href="{{ $markupHighlightStyle.RelPermalink }}"
integrity="{{ $markupHighlightStyle.Data.Integrity }}"
crossorigin="anonymous"
type="text/css"
/>
Expand All @@ -87,7 +119,6 @@
<link
rel="stylesheet"
href="{{ $styles.RelPermalink }}"
integrity="{{ $styles.Data.Integrity }}"
crossorigin="anonymous"
media="screen"
/>
Expand All @@ -97,31 +128,27 @@
<link
rel="stylesheet"
href="{{ $style.RelPermalink }}"
integrity="{{ $style.Data.Integrity }}"
crossorigin="anonymous"
type="text/css"
/>
{{ $style := resources.Get "fontawesome/css/solid.min.css" | resources.Fingerprint }}
<link
rel="stylesheet"
href="{{ $style.RelPermalink }}"
integrity="{{ $style.Data.Integrity }}"
crossorigin="anonymous"
type="text/css"
/>
{{ $style := resources.Get "fontawesome/css/regular.min.css" | resources.Fingerprint }}
<link
rel="stylesheet"
href="{{ $style.RelPermalink }}"
integrity="{{ $style.Data.Integrity }}"
crossorigin="anonymous"
type="text/css"
/>
{{ $style := resources.Get "fontawesome/css/brands.min.css" | resources.Fingerprint }}
<link
rel="stylesheet"
href="{{ $style.RelPermalink }}"
integrity="{{ $style.Data.Integrity }}"
crossorigin="anonymous"
type="text/css"
/>
Expand All @@ -130,7 +157,6 @@
<link
rel="stylesheet"
href="{{ $style.RelPermalink }}"
integrity="{{ $style.Data.Integrity }}"
crossorigin="anonymous"
type="text/css"
/>
Expand Down Expand Up @@ -169,7 +195,6 @@
<script
type="text/javascript"
src="{{ $secureHeaderJS.RelPermalink }}"
integrity="{{ $secureHeaderJS.Data.Integrity }}"
crossorigin="anonymous"
></script>

Expand All @@ -179,7 +204,6 @@
<script
type="text/javascript"
src="{{ $secureThemeSwitcherJS.RelPermalink }}"
integrity="{{ $secureThemeSwitcherJS.Data.Integrity }}"
crossorigin="anonymous"
></script>

Expand Down Expand Up @@ -217,7 +241,6 @@
<script
type="text/javascript"
src="{{ $secureJS.RelPermalink }}"
integrity="{{ $secureJS.Data.Integrity }}"
crossorigin="anonymous"
></script>

Expand All @@ -236,12 +259,10 @@
{{ end }}


<!-- Twitter Cards -->
{{ template "_internal/twitter_cards.html" . }}


<!-- Open Graph -->
{{ template "_internal/opengraph.html" . }}
<!-- {{ template "_internal/twitter_cards.html" . }} -->
<!---->
<!---->
<!-- {{ template "_internal/opengraph.html" . }} -->


<!-- Schema.org-->
Expand Down

1 comment on commit 205c5ef

@vercel
Copy link

@vercel vercel bot commented on 205c5ef Feb 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.