Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Seo & openGraph #88

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions archetypes/post.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ layout: post
published: true
featured: yellow
title: "Das ist der Titel"
twitter_creator_id: "twitter id of the author | used for open graph"
---
1 change: 1 addition & 0 deletions archetypes/project.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ cta_text: |-
Längere Text mit Markdown wie mensch sich einbringen kann
more_text: |-
Text mit Markdown wie mensch mehr erfahren kann
twitter_creator_id: "twitter id of the author | used for open graph"
---

Hier kommt der Projektbeschreibungstext rein
34 changes: 34 additions & 0 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ enableRobotsTXT = true

[params]
twitter = "okfde"
twitter_site_id = "255123777"
author = "okfde"
keywords = ["Offene Daten", "Civic Tech", "Open Government", "Offene Bildung", "Digitale Mündigkeit" , "Informationsfreiheit", " Open Data"]
subtitle = "Open Knowledge Foundation Deutschland e.V."

[permalinks]
blog = 'blog/:year/:month/:slug/'
Expand Down Expand Up @@ -68,3 +72,33 @@ section = [ "HTML", "Atom", "Json", "Rss" ]

[frontmatter]
date = [":filename", ":default"]

[minify]
disableCSS = false
disableHTML = false
disableJS = false
disableJSON = false
disableSVG = false
disableXML = false
minifyOutput = true
[minify.tdewolff]
[minify.tdewolff.css]
keepCSS2 = true
precision = 0
[minify.tdewolff.html]
keepComments = false
keepConditionalComments = true
keepDefaultAttrVals = true
keepDocumentTags = true
keepEndTags = true
keepQuotes = false
keepWhitespace = false
[minify.tdewolff.js]
keepVarNames = false
precision = 0
[minify.tdewolff.json]
precision = 0
[minify.tdewolff.svg]
precision = 0
[minify.tdewolff.xml]
keepWhitespace = false
8 changes: 0 additions & 8 deletions layouts/404.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
{{ define "title"}}
<title>404 - Page not found</title>
{{ end }}

{{ define "head" }}
<style>img { width:100%; height: auto; }</style>
{{ end }}

{{ define "main"}}
<main id="main">
<div class="container">
Expand Down
19 changes: 0 additions & 19 deletions layouts/_default/anniversary.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
{{ define "title"}}
<title>{{ .Title }} - {{ .Site.Title }}</title>
{{ end }}

{{ define "head" }}
{{ range .AlternativeOutputFormats -}}
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
{{ end -}}
<meta property="og:title" content="{{ .Site.Title }} {{ .Title }}" />
<meta property="og:type" content="website" />
<meta property="og:url" content="{{ .Permalink }}" />
{{ with .Params.img_header }}
<meta property="og:image" content="{{ . }}" />{{ end }}
{{with .Params.meta}}
<meta property="og:description" content="{{.}}">
<meta name="description" content="{{.}}">
{{end}}
{{ end }}

{{ define "main" }}
<div class="container align-items-end">
<div class="row align-items-end">
Expand Down
2 changes: 0 additions & 2 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
<html lang="{{ .Lang }}">
<head>
{{- partial "head.html" . -}}
{{- block "title" .}}{{- end }}
{{- block "head" .}}{{- end }}
</head>
<body class="no-js rebuildall">
{{- partial "header.html" . -}}
Expand Down
29 changes: 0 additions & 29 deletions layouts/_default/blog.html
Original file line number Diff line number Diff line change
@@ -1,32 +1,3 @@
{{ define "title"}}
<title>{{ .Title }} - {{ .Site.Title }}</title>
{{ end }}

{{ define "head" }}
{{ range .AlternativeOutputFormats -}}
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
{{ end -}}

<meta property="og:title" content="{{ .Site.Title }} {{ .Title }}" />
<meta property="og:type" content="website" />
<meta property="og:url" content="{{ .Permalink }}" />

{{ with .Params.meta }}
<meta property="og:description" content="{{.}}">
<meta name="description" content="{{.}}">
<meta name="twitter:description" content="{{ truncate 200 .}}">
{{ end }}

<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@{{ .Site.Params.twitter }}">
<meta name="twitter:title" content="{{ .Title }}">

{{ with .Params.img_header }}
<meta property="og:image" content="{{ . }}" />
<meta name="twitter:image" content="{{ . }}">
{{ end }}
{{ end }}

{{ define "main" }}
<main>
<header class="l__blog__header container align-items-end">
Expand Down
17 changes: 0 additions & 17 deletions layouts/_default/board.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,3 @@
{{ define "title"}}
<title>{{ .Title }} - {{ .Site.Title }}</title>
{{ end }}

{{ define "head" }}
{{ range .AlternativeOutputFormats -}}
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
{{ end -}}
<meta property="og:title" content="{{ .Site.Title }} {{ .Title }}" />
<meta property="og:type" content="website" />
<meta property="og:url" content="{{ .Permalink }}" />
{{ with .Params.img_header }}<meta property="og:image" content="{{ . }}" />{{ end }}
{{with .Params.meta}}
<meta property="og:description" content="{{.}}">
<meta name="description" content="{{.}}">
{{end}}
{{ end }}

{{ define "main" }}
<main>
Expand Down
18 changes: 0 additions & 18 deletions layouts/_default/donation.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,3 @@
{{ define "title"}}
<title>{{ .Title }} - {{ .Site.Title }}</title>
{{ end }}

{{ define "head" }}
{{ range .AlternativeOutputFormats -}}
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
{{ end -}}
<meta property="og:title" content="{{ .Site.Title }} {{ .Title }}" />
<meta property="og:type" content="website" />
<meta property="og:url" content="{{ .Permalink }}" />
{{ with .Params.img_header }}<meta property="og:image" content="{{ . }}" />{{ end }}
{{with .Params.meta}}
<meta property="og:description" content="{{.}}">
<meta name="description" content="{{.}}">
{{end}}
{{ end }}

{{ define "main" }}
<section class="l__donation container align-items-end">
<div class="row align-items-end">
Expand Down
18 changes: 0 additions & 18 deletions layouts/_default/finance.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,3 @@
{{ define "title"}}
<title>{{ .Title }} - {{ .Site.Title }}</title>
{{ end }}

{{ define "head" }}
{{ range .AlternativeOutputFormats -}}
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
{{ end -}}
<meta property="og:title" content="{{ .Site.Title }} {{ .Title }}" />
<meta property="og:type" content="website" />
<meta property="og:url" content="{{ .Permalink }}" />
{{ with .Params.img_header }}<meta property="og:image" content="{{ . }}" />{{ end }}
{{with .Params.meta}}
<meta property="og:description" content="{{.}}">
<meta name="description" content="{{.}}">
{{end}}
{{ end }}

{{ define "main" }}
<section class="l__finance container align-items-end">
<div class="row align-items-end">
Expand Down
18 changes: 0 additions & 18 deletions layouts/_default/jobs.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,3 @@
{{ define "title"}}
<title>{{ .Title }} - {{ .Site.Title }}</title>
{{ end }}

{{ define "head" }}
{{ range .AlternativeOutputFormats -}}
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
{{ end -}}
<meta property="og:title" content="{{ .Site.Title }} {{ .Title }}" />
<meta property="og:type" content="website" />
<meta property="og:url" content="{{ .Permalink }}" />
{{ with .Params.img_header }}<meta property="og:image" content="{{ . }}" />{{ end }}
{{with .Params.meta}}
<meta property="og:description" content="{{.}}">
<meta name="description" content="{{.}}">
{{end}}
{{ end }}

{{ define "main" }}
<main>
<div class="l__content container">
Expand Down
19 changes: 0 additions & 19 deletions layouts/_default/profile.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
{{ define "title"}}
<title>{{ .Title }} - {{ .Site.Title }}</title>
{{ end }}

{{ define "head" }}
{{ range .AlternativeOutputFormats -}}
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
{{ end -}}
<meta property="og:title" content="{{ .Site.Title }} {{ .Title }}" />
<meta property="og:type" content="website" />
<meta property="og:url" content="{{ .Permalink }}" />
{{ with .Params.img_header }}
<meta property="og:image" content="{{ . }}" />{{ end }}
{{with .Params.meta}}
<meta property="og:description" content="{{.}}">
<meta name="description" content="{{.}}">
{{end}}
{{ end }}

{{ define "main" }}
<div class="container">
<div class="row">
Expand Down
19 changes: 0 additions & 19 deletions layouts/_default/project.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
{{ define "title"}}
<title>{{ .Title }} - {{ strings.FirstUpper .Section }} - {{ .Site.Title}}</title>
{{ end }}

{{ define "head" }}
{{ range .AlternativeOutputFormats -}}
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
{{ end -}}
{{with .Params.subtitle }}<meta description="{{.}}">{{ end }}
<meta property="og:title" content="{{ .Title }}" />
<meta property="og:type" content="article" />
<meta property="og:url" content="{{ .Permalink }}" />
<meta property="og:image" content='/files/{{ trim .Params.img_header "/"}}' />
{{with .Params.subtitle}}
<meta property="og:description" content="{{.}}">
<meta name="description" content="{{.}}">
{{end}}
{{ end }}

{{ define "main" }}
<main>
<article class="l__project">
Expand Down
19 changes: 0 additions & 19 deletions layouts/_default/projekte.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
{{ define "title"}}
<title>{{ .Title }} - {{ .Site.Title }}</title>
{{ end }}

{{ define "head" }}
{{ range .AlternativeOutputFormats -}}
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
{{ end -}}
<meta property="og:title" content="{{ .Site.Title }} {{ .Title }}" />
<meta property="og:type" content="website" />
<meta property="og:url" content="{{ .Permalink }}" />
{{ with .Params.img_header }}
<meta property="og:image" content="{{ . }}" />{{ end }}
{{with .Params.meta}}
<meta property="og:description" content="{{.}}">
<meta name="description" content="{{.}}">
{{end}}
{{ end }}

{{ define "main" }}
<main>
<section class='container l__projects js-shuffle'>
Expand Down
19 changes: 0 additions & 19 deletions layouts/_default/section.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
{{ define "title"}}
<title>{{ .Title }} - {{ .Site.Title }}</title>
{{ end }}

{{ define "head" }}
{{ range .AlternativeOutputFormats -}}
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
{{ end -}}
<meta property="og:title" content="{{.Title}}" />
<meta property="og:type" content="website" />
<meta property="og:url" content="{{.Permalink}}" />
<meta property="og:image" content="" />
{{with .Params.meta}}
<meta property="og:description" content="{{.}}">
<meta name="description" content="{{.}}">
{{end}}
{{ end }}


{{ define "main" }}
<main>
<p>section template</p>
Expand Down
18 changes: 0 additions & 18 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,3 @@
{{ define "title"}}
<title>{{ .Title }} - {{ .Site.Title}}</title>
{{ end }}

{{ define "head" }}
{{ range .AlternativeOutputFormats -}}
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
{{ end -}}
<meta property="og:title" content="{{ .Title }}" />
<meta property="og:type" content="website" />
<meta property="og:url" content="{{ .Permalink }}" />
{{ with .Params.img_header }}<meta property="og:image" content="{{ . }}" />{{ end }}
{{with .Params.meta}}
<meta property="og:description" content="{{.}}">
<meta name="description" content="{{.}}">
{{end}}
{{ end }}

{{ define "main" }}
<main>
<div class="container l__content">
Expand Down
18 changes: 0 additions & 18 deletions layouts/_default/taxonomy.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,3 @@
{{ define "title"}}
<title>{{ .Title }} - {{ strings.FirstUpper .Section }} - {{ .Site.Title}}</title>
{{ end }}

{{ define "head" }}
{{ range .AlternativeOutputFormats -}}
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
{{ end -}}
<meta property="og:title" content="{{ .Site.Title }} - {{ strings.FirstUpper .Section }}: {{ .Title }}" />
<meta property="og:type" content="website" />
<meta property="og:url" content="{{ .Permalink }}" />
<meta property="og:image" content="" />
{{with .Params.meta}}
<meta property="og:description" content="{{.}}">
<meta name="description" content="{{.}}">
{{end}}
{{ end }}

{{ define "main" }}
<main>
<header class="l__blog__header container">
Expand Down
19 changes: 0 additions & 19 deletions layouts/_default/team.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
{{ define "title"}}
<title>{{ .Title }} - {{ .Site.Title }}</title>
{{ end }}

{{ define "head" }}
{{ range .AlternativeOutputFormats -}}
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
{{ end -}}
<meta property="og:title" content="{{ .Site.Title }} {{ .Title }}" />
<meta property="og:type" content="website" />
<meta property="og:url" content="{{ .Permalink }}" />
{{ with .Params.img_header }}<meta property="og:image" content="{{ . }}" />{{ end }}
{{with .Params.meta}}
<meta property="og:description" content="{{.}}">
<meta name="description" content="{{.}}">
{{end}}
{{ end }}


{{ define "main" }}
<main>
<div class="container l__team">
Expand Down