Merge branch 'master' into 'master'

Improve meta tags

See merge request framasoft/peertube/joinpeertube!22
This commit is contained in:
Chocobozzz 2018-05-24 11:17:12 +02:00
commit 32c6a4db5c
9 changed files with 22 additions and 40 deletions

View file

@ -60,6 +60,7 @@ OpenGraphImage = "/notebook.jpg"
brand = "Peertube" brand = "Peertube"
topline = "" topline = ""
footline = "" footline = ""
twitter = "framasoft"
customJS = [] customJS = []
customCSS = [] customCSS = []

View file

@ -6,9 +6,8 @@
[Languages.en] [Languages.en]
languageCode = "en" languageCode = "en"
title = "JoinPeerTube"
weight = 1 weight = 1
title = "PeerTube"
description = "A decentralized video hosting network, based on free/libre software"
[[Languages.en.menu.main]] [[Languages.en.menu.main]]
name = "FAQ" name = "FAQ"

View file

@ -6,9 +6,8 @@
[Languages.fr] [Languages.fr]
languageCode = "fr" languageCode = "fr"
title = "JoinPeerTube"
weight = 1 weight = 1
title = "PeerTube"
description = "L'hébergement de vidéos décentralisé, en réseau, basé sur du logiciel libre"
[[Languages.fr.menu.main]] [[Languages.fr.menu.main]]
name = "FAQ" name = "FAQ"

View file

@ -1,7 +1,8 @@
+++ +++
date = "2018-02-28T14:41:00+01:00" date = "2018-02-28T14:41:00+01:00"
title = "FAQ" title = "PeerTube - FAQ"
description = ""
author = "Framasoft" author = "Framasoft"
draft = false draft = false
type = "page" type = "page"

View file

@ -1,7 +1,8 @@
+++ +++
date = "2018-02-28T14:41:00+01:00" date = "2018-02-28T14:41:00+01:00"
title = "FAQ" title = "PeerTube - FAQ"
description = ""
author = "Framasoft" author = "Framasoft"
draft = false draft = false
type = "page" type = "page"

View file

@ -1,7 +1,8 @@
+++ +++
date = "2018-02-28T14:41:00+01:00" date = "2018-02-28T14:41:00+01:00"
title = "PeerTube" title = "Take back the control of video streaming! #JoinPeertube"
description = "PeerTube is an open-source federated video network. Videos can be hosted by the people, with the people, for the people."
author = "Framasoft" author = "Framasoft"
draft = false draft = false
type = "page" type = "page"

View file

@ -1,7 +1,8 @@
+++ +++
date = "2018-02-28T14:41:00+01:00" date = "2018-02-28T14:41:00+01:00"
title = "PeerTube" title = "Reprenez le contrôle de vos vidéos ! #JoinPeertube"
description = "PeerTube est un réseau open-source d'hébergement de vidéos. Les vidéos sont diffusées par les gens, avec les gens, pour les gens."
author = "Framasoft" author = "Framasoft"
draft = false draft = false
type = "page" type = "page"

View file

@ -15,31 +15,28 @@
<meta property="image" content="{{ .Site.BaseURL }}{{ .Site.Params.OpenGraphImage }}"/> <meta property="image" content="{{ .Site.BaseURL }}{{ .Site.Params.OpenGraphImage }}"/>
<meta property="og:title" content="{{ .Title }} {{ if ne .Title .Site.Title }} &middot; {{ .Site.Title }} {{ end }}"> <meta property="og:title" content="{{ .Title }}">
<meta property="og:site_name" content="{{ .Site.Title }}"/> <meta property="og:site_name" content="{{ .Site.Title }}"/>
<meta property="og:url" content="{{ .Permalink }}" /> <meta property="og:url" content="{{ .Site.BaseURL }}" />
<meta property="og:locale" content="{{ .Site.LanguageCode }}"> <meta property="og:locale" content="{{ .Site.LanguageCode }}">
{{ if not .IsPage }}
<meta property="og:type" content="website" /> <meta property="og:type" content="website" />
{{ else }}
<meta property="og:type" content="article" />
<meta property="og:description" content="{{ .Description }}"/> <meta property="og:description" content="{{ .Description }}"/>
<meta property="og:image" content="{{ .Site.BaseURL }}{{ .Site.Params.OpenGraphImage }}"/> <meta property="og:image" content="{{ .Site.BaseURL }}{{ .Site.Params.OpenGraphImage }}"/>
<meta property="og:article:published_time" content="{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}" /> <meta property="og:article:published_time" content="{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}" />
<meta property="og:article:modified_time" content="{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}" /> <meta property="og:article:modified_time" content="{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}" />
{{ if .Keywords }} {{ if .Keywords }}
{{ range .Keywords }} {{ range .Keywords }}
<meta property="og:article:tag" content="{{ . }}"> <meta property="og:article:tag" content="{{ . }}">
{{ end }} {{ end }}
{{ else if isset .Params "tags" }} {{ else if isset .Params "tags" }}
{{ range .Params.tags }} {{ range .Params.tags }}
<meta property="og:article:tag" content="{{ . }}"> <meta property="og:article:tag" content="{{ . }}">
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ if ne .Site.Params.twitter "" }} {{ if ne .Site.Params.twitter "" }}
<meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@{{ .Site.Params.twitter }}" /> <meta name="twitter:site" content="@{{ .Site.Params.twitter }}" />
<meta name="twitter:creator" content="@{{ .Site.Params.twitter }}" /> <meta name="twitter:creator" content="@{{ .Site.Params.twitter }}" />
@ -49,24 +46,6 @@
<meta name="twitter:domain" content="{{ .Site.BaseURL }}"> <meta name="twitter:domain" content="{{ .Site.BaseURL }}">
<meta name="twitter:image" content="{{ .Site.BaseURL }}{{ .Site.Params.OpenGraphImage }}"/> <meta name="twitter:image" content="{{ .Site.BaseURL }}{{ .Site.Params.OpenGraphImage }}"/>
{{ end }}
{{ if ne .Site.Params.googleplus "" }}
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Article",
"headline": "{{ .Title }}",
"author": {
"@type": "Person",
"name": "http://profiles.google.com/+{{ .Site.Params.googleplus }}?rel=author"
},
"datePublished": "{{ .Date.Format "2006-01-02" }}",
"description": "{{ .Description }}",
"wordCount": {{ .WordCount }}
}
</script>
{{ end }}
{{ end }} {{ end }}
{{ if .RSSLink }} {{ if .RSSLink }}

View file

@ -5,7 +5,7 @@
{{ "<!--[if gt IE 8]><!-->" | safeHTML }} <html class="no-js"{{ if .Lang }} lang="{{ .Lang }}"{{ end }}> {{ "<!--<![endif]-->" | safeHTML }} {{ "<!--[if gt IE 8]><!-->" | safeHTML }} <html class="no-js"{{ if .Lang }} lang="{{ .Lang }}"{{ end }}> {{ "<!--<![endif]-->" | safeHTML }}
<head> <head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>{{ .Title }} {{ if ne .Title .Site.Title }} &middot; {{ .Site.Title }}{{ end }}</title> <title>{{ .Title }}</title>
{{ partial "base/metas.html" . }} {{ partial "base/metas.html" . }}
{{ partial "base/imports.html" . }} {{ partial "base/imports.html" . }}
</head> </head>