Merge pull request #15 from jtom38/features/ui/meta-tags

Features/UI/meta tags
This commit is contained in:
James Tombleson 2022-10-18 22:12:36 -07:00 committed by GitHub
commit b5ff37e179
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 147 additions and 110 deletions

View File

@ -1,6 +1,7 @@
baseURL: 'https://jtom38.github.io/cookbook/' baseURL: 'https://jtom38.github.io/cookbook/'
#baseURL: 'https://cookbook.jamestombleson.com/'
languageCode: 'en-us' languageCode: 'en-us'
title: 'Cookbook' title: 'Tombleson Family Cookbook'
theme: "hugo-bulma-cookbook" theme: "hugo-bulma-cookbook"
taxonomies: taxonomies:

View File

@ -1,12 +1,18 @@
{{ partial "header.html" . }} <!DOCTYPE html>
<html lang="{{ .Page.Language | default "en" }}">
<head>
{{ partial "header.html"}}
{{ partial "header.meta.html" .}}
{{ partial "script.menu.html"}}
<title>{{ .Title }}</title>
</head>
<body>
{{ partial "navbar" . }}
{{ partial "hero.html" . }} {{ partial "hero.html" . }}
<div class="container"> <div class="container">
<br> <br>
<div class="content"> <div class="content">
{{ .Content }} {{ .Content }}
</div> </div>
</div> </div>
</body>

View File

@ -1,6 +1,16 @@
{{ partial "header.html" . }} <!DOCTYPE html>
<html lang="{{ .Page.Language | default "en" }}">
<head>
{{ partial "header.html"}}
{{ partial "header.meta.html" .}}
{{ partial "script.menu.html"}}
<title>{{ .Title }}</title>
</head>
<body>
{{ partial "navbar" . }}
{{ partial "hero.html" . }} {{ partial "hero.html" . }}
<div class="container">
<br>
{{ if $.Site.Params.UseListRows }} {{ if $.Site.Params.UseListRows }}
{{ partial "list.rows.html" . }} {{ partial "list.rows.html" . }}
{{ end }} {{ end }}
@ -8,5 +18,6 @@
{{ if $.Site.Params.UseCardView }} {{ if $.Site.Params.UseCardView }}
{{ partial "list.cards.html" . }} {{ partial "list.cards.html" . }}
{{ end }} {{ end }}
</div>
</body>
{{ partial "footer.html" . }}

View File

@ -1,6 +1,14 @@
{{ partial "header.html" . }} <!DOCTYPE html>
<html lang="{{ .Page.Language | default "en" }}">
<head>
{{ partial "header.html"}}
{{ partial "header.meta.single.html" .}}
{{ partial "script.menu.html"}}
<title>{{ .Title }}</title>
</head>
<body>
{{ partial "navbar" . }}
{{ partial "hero.html" . }} {{ partial "hero.html" . }}
<div class="container"> <div class="container">
<br> <br>
@ -35,6 +43,4 @@
</div> </div>
</div> </div>
</div> </div>
</body>
{{ partial "footer.html" . }}

View File

@ -1,3 +0,0 @@
</body>
</html>

View File

@ -1,6 +1,3 @@
<!DOCTYPE html>
<html lang="{{ .Page.Language | default "en" }}">
<head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css">
@ -9,31 +6,3 @@
<link rel="icon" href="{{ .Site.BaseURL }}favicon.svg"> <link rel="icon" href="{{ .Site.BaseURL }}favicon.svg">
<link rel="mask-icon" href="{{ .Site.BaseURL }}favicon.svg" color="#000000"> <link rel="mask-icon" href="{{ .Site.BaseURL }}favicon.svg" color="#000000">
<link rel="apple-touch-icon" href="{{ .Site.BaseURL }}apple-touch-icon.svg"> <link rel="apple-touch-icon" href="{{ .Site.BaseURL }}apple-touch-icon.svg">
<script>
document.addEventListener('DOMContentLoaded', () => {
// Get all "navbar-burger" elements
const $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0);
// Add a click event on each of them
$navbarBurgers.forEach(el => {
el.addEventListener('click', () => {
// Get the target from the "data-target" attribute
const target = el.dataset.target;
const $target = document.getElementById(target);
// Toggle the "is-active" class on both the "navbar-burger" and the "navbar-menu"
el.classList.toggle('is-active');
$target.classList.toggle('is-active');
});
});
});
</script>
<title>{{ .Title }}</title>
</head>
<body>
{{ partial "navbar" . }}

View File

@ -0,0 +1,7 @@
<meta name="og:site_name" content="Tombleson Cookbook" >
<meta name="og:title" content="{{ .Title }}">
<meta name="og:image" content="{{ .Site.BaseURL }}favicon.svg">
<meta name="twitter:card" charset="summary_large_image">
<meta name="twitter:title" content="{{ .Title }}">
<meta name="twitter:image" content="{{ .Site.BaseURL }}favicon.svg">

View File

@ -0,0 +1,9 @@
<meta name="og:site_name" content="Tombleson Cookbook" >
<meta name="og:title" content="{{ .Title }}">
<meta name="og:description" content="{{ .Params.subtitle }}">
<meta name="og:image" content="{{ .Permalink }}thumbnail.png">
<meta name="twitter:card" charset="summary_large_image">
<meta name="twitter:title" content="{{ .Title }}">
<meta name="twitter:description" content="{{ .Params.subtitle }}">
<meta name="twitter:image" content="{{ .Permalink }}thumbnail.png">

View File

@ -0,0 +1,22 @@
<script>
document.addEventListener('DOMContentLoaded', () => {
// Get all "navbar-burger" elements
const $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0);
// Add a click event on each of them
$navbarBurgers.forEach(el => {
el.addEventListener('click', () => {
// Get the target from the "data-target" attribute
const target = el.dataset.target;
const $target = document.getElementById(target);
// Toggle the "is-active" class on both the "navbar-burger" and the "navbar-menu"
el.classList.toggle('is-active');
$target.classList.toggle('is-active');
});
});
});
</script>

View File

@ -1,6 +1,16 @@
{{ partial "header.html" . }} <!DOCTYPE html>
{{ partial "hero.html" . }} <html lang="{{ .Page.Language | default " en" }}">
<head>
{{ partial "header.html"}}
{{ partial "header.meta.html" .}}
{{ partial "script.menu.html"}}
<title>{{ .Title }}</title>
</head>
<body>
{{ partial "navbar" . }}
{{ partial "hero.html" . }}
<div class="container"> <div class="container">
<br> <br>
@ -12,5 +22,4 @@
{{ end }} {{ end }}
</div> </div>
</div> </div>
</body>
{{ partial "footer.html" . }}