Updated the layout to load meta tags for when a link is shared with someone
This commit is contained in:
parent
9dbd44dd2f
commit
3fc155c7ba
@ -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:
|
||||||
|
@ -1,12 +1,18 @@
|
|||||||
{{ partial "header.html" . }}
|
<!DOCTYPE html>
|
||||||
{{ partial "hero.html" . }}
|
<html lang="{{ .Page.Language | default "en" }}">
|
||||||
|
<head>
|
||||||
<div class="container">
|
{{ partial "header.html"}}
|
||||||
<br>
|
{{ partial "header.meta.html" .}}
|
||||||
|
{{ partial "script.menu.html"}}
|
||||||
<div class="content">
|
<title>{{ .Title }}</title>
|
||||||
{{ .Content }}
|
</head>
|
||||||
|
<body>
|
||||||
|
{{ partial "navbar" . }}
|
||||||
|
{{ partial "hero.html" . }}
|
||||||
|
<div class="container">
|
||||||
|
<br>
|
||||||
|
<div class="content">
|
||||||
|
{{ .Content }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</body>
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,12 +1,23 @@
|
|||||||
{{ 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">
|
||||||
|
<br>
|
||||||
|
{{ if $.Site.Params.UseListRows }}
|
||||||
|
{{ partial "list.rows.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if $.Site.Params.UseCardView }}
|
||||||
|
{{ partial "list.cards.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
|
||||||
{{ if $.Site.Params.UseListRows }}
|
|
||||||
{{ partial "list.rows.html" . }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ if $.Site.Params.UseCardView }}
|
|
||||||
{{ partial "list.cards.html" . }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ partial "footer.html" . }}
|
|
@ -1,40 +1,46 @@
|
|||||||
{{ partial "header.html" . }}
|
<!DOCTYPE html>
|
||||||
{{ partial "hero.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" . }}
|
||||||
|
<div class="container">
|
||||||
|
<br>
|
||||||
|
|
||||||
<div class="container">
|
<div class="columns">
|
||||||
<br>
|
|
||||||
|
|
||||||
<div class="columns">
|
|
||||||
|
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<img src="{{ .Site.BaseURL }}{{.File.Dir}}thumbnail.png" alt="Missing thumbnail :(" />
|
<img src="{{ .Site.BaseURL }}{{.File.Dir}}thumbnail.png" alt="Missing thumbnail :(" />
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="column">
|
|
||||||
<div class="content">
|
|
||||||
{{ .Content }}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4 class="subtitle" id="date"> Posted: {{ .Date.Format "Mon Jan 2, 2006" }} </h4>
|
|
||||||
<h5 class="subtitle" id="wordcount"> Word Count: {{ .WordCount }} Words </h5>
|
|
||||||
|
|
||||||
<br>
|
|
||||||
<h2 class="title">Tags</h2>
|
|
||||||
|
|
||||||
<div class="buttons">
|
<div class="column">
|
||||||
{{ with .Params.tags }}
|
<div class="content">
|
||||||
|
{{ .Content }}
|
||||||
{{ range . }}
|
</div>
|
||||||
<button class="button">
|
|
||||||
<a href="{{ "tags" | absURL }}/{{ . | urlize }}">{{ . }}</a>
|
<h4 class="subtitle" id="date"> Posted: {{ .Date.Format "Mon Jan 2, 2006" }} </h4>
|
||||||
</button>
|
<h5 class="subtitle" id="wordcount"> Word Count: {{ .WordCount }} Words </h5>
|
||||||
{{ end }}
|
|
||||||
|
<br>
|
||||||
{{ end }}
|
<h2 class="title">Tags</h2>
|
||||||
|
|
||||||
|
<div class="buttons">
|
||||||
|
{{ with .Params.tags }}
|
||||||
|
|
||||||
|
{{ range . }}
|
||||||
|
<button class="button">
|
||||||
|
<a href="{{ " tags" | absURL }}/{{ . | urlize }}">{{ . }}</a>
|
||||||
|
</button>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</body>
|
||||||
|
|
||||||
|
|
||||||
{{ partial "footer.html" . }}
|
|
@ -1,3 +0,0 @@
|
|||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,39 +1,8 @@
|
|||||||
<!DOCTYPE html>
|
<meta charset="utf-8">
|
||||||
<html lang="{{ .Page.Language | default "en" }}">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<head>
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css">
|
||||||
<meta charset="utf-8">
|
<link rel="stylesheet" type="text/css" href="https://unpkg.com/bulma-prefers-dark" />
|
||||||
<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" type="text/css" href="https://unpkg.com/bulma-prefers-dark" />
|
|
||||||
|
|
||||||
<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" . }}
|
|
||||||
|
@ -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">
|
@ -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">
|
22
themes/hugo-bulma-cookbook/layouts/partials/script.menu.html
Normal file
22
themes/hugo-bulma-cookbook/layouts/partials/script.menu.html
Normal 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>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user