diff --git a/archetypes/post.md b/archetypes/post.md index e71eb0f071..29ddecc41e 100644 --- a/archetypes/post.md +++ b/archetypes/post.md @@ -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" --- diff --git a/archetypes/project.md b/archetypes/project.md index b662891cce..5ee6f6b410 100644 --- a/archetypes/project.md +++ b/archetypes/project.md @@ -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 diff --git a/config.toml b/config.toml index 02be7cc438..45e0e342ec 100644 --- a/config.toml +++ b/config.toml @@ -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/' @@ -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 \ No newline at end of file diff --git a/layouts/404.html b/layouts/404.html index 8f13b9cfc8..294b81f305 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -1,11 +1,3 @@ -{{ define "title"}} -404 - Page not found -{{ end }} - -{{ define "head" }} - -{{ end }} - {{ define "main"}}
diff --git a/layouts/_default/anniversary.html b/layouts/_default/anniversary.html index 151a5bc41d..20456f63e5 100644 --- a/layouts/_default/anniversary.html +++ b/layouts/_default/anniversary.html @@ -1,22 +1,3 @@ -{{ define "title"}} -{{ .Title }} - {{ .Site.Title }} -{{ end }} - -{{ define "head" }} -{{ range .AlternativeOutputFormats -}} - -{{ end -}} - - - -{{ with .Params.img_header }} -{{ end }} -{{with .Params.meta}} - - -{{end}} -{{ end }} - {{ define "main" }}
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index f47e152265..b8e0832d99 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -2,8 +2,6 @@ {{- partial "head.html" . -}} - {{- block "title" .}}{{- end }} - {{- block "head" .}}{{- end }} {{- partial "header.html" . -}} diff --git a/layouts/_default/blog.html b/layouts/_default/blog.html index 89a3782bc7..77e2988a71 100644 --- a/layouts/_default/blog.html +++ b/layouts/_default/blog.html @@ -1,32 +1,3 @@ -{{ define "title"}} -{{ .Title }} - {{ .Site.Title }} -{{ end }} - -{{ define "head" }} - {{ range .AlternativeOutputFormats -}} - - {{ end -}} - - - - - - {{ with .Params.meta }} - - - - {{ end }} - - - - - - {{ with .Params.img_header }} - - - {{ end }} -{{ end }} - {{ define "main" }}
diff --git a/layouts/_default/board.html b/layouts/_default/board.html index 099e80a7cb..3073b34684 100644 --- a/layouts/_default/board.html +++ b/layouts/_default/board.html @@ -1,20 +1,3 @@ -{{ define "title"}} -{{ .Title }} - {{ .Site.Title }} -{{ end }} - -{{ define "head" }} -{{ range .AlternativeOutputFormats -}} - -{{ end -}} - - - -{{ with .Params.img_header }}{{ end }} -{{with .Params.meta}} - - -{{end}} -{{ end }} {{ define "main" }}
diff --git a/layouts/_default/donation.html b/layouts/_default/donation.html index 042a85d808..4258fd597b 100644 --- a/layouts/_default/donation.html +++ b/layouts/_default/donation.html @@ -1,21 +1,3 @@ -{{ define "title"}} -{{ .Title }} - {{ .Site.Title }} -{{ end }} - -{{ define "head" }} -{{ range .AlternativeOutputFormats -}} - -{{ end -}} - - - -{{ with .Params.img_header }}{{ end }} -{{with .Params.meta}} - - -{{end}} -{{ end }} - {{ define "main" }}
diff --git a/layouts/_default/finance.html b/layouts/_default/finance.html index 87051f8b6e..aca008c8a4 100644 --- a/layouts/_default/finance.html +++ b/layouts/_default/finance.html @@ -1,21 +1,3 @@ -{{ define "title"}} -{{ .Title }} - {{ .Site.Title }} -{{ end }} - -{{ define "head" }} -{{ range .AlternativeOutputFormats -}} - -{{ end -}} - - - -{{ with .Params.img_header }}{{ end }} -{{with .Params.meta}} - - -{{end}} -{{ end }} - {{ define "main" }}
diff --git a/layouts/_default/jobs.html b/layouts/_default/jobs.html index 684ba1348f..bfd80910f0 100644 --- a/layouts/_default/jobs.html +++ b/layouts/_default/jobs.html @@ -1,21 +1,3 @@ -{{ define "title"}} -{{ .Title }} - {{ .Site.Title }} -{{ end }} - -{{ define "head" }} -{{ range .AlternativeOutputFormats -}} - -{{ end -}} - - - -{{ with .Params.img_header }}{{ end }} -{{with .Params.meta}} - - -{{end}} -{{ end }} - {{ define "main" }}
diff --git a/layouts/_default/profile.html b/layouts/_default/profile.html index 35031a5e11..ceb5b62b87 100644 --- a/layouts/_default/profile.html +++ b/layouts/_default/profile.html @@ -1,22 +1,3 @@ -{{ define "title"}} -{{ .Title }} - {{ .Site.Title }} -{{ end }} - -{{ define "head" }} -{{ range .AlternativeOutputFormats -}} - -{{ end -}} - - - -{{ with .Params.img_header }} -{{ end }} -{{with .Params.meta}} - - -{{end}} -{{ end }} - {{ define "main" }}
diff --git a/layouts/_default/project.html b/layouts/_default/project.html index 868a98792b..43b48ad6be 100644 --- a/layouts/_default/project.html +++ b/layouts/_default/project.html @@ -1,22 +1,3 @@ -{{ define "title"}} -{{ .Title }} - {{ strings.FirstUpper .Section }} - {{ .Site.Title}} -{{ end }} - -{{ define "head" }} -{{ range .AlternativeOutputFormats -}} - -{{ end -}} -{{with .Params.subtitle }}{{ end }} - - - - -{{with .Params.subtitle}} - - -{{end}} -{{ end }} - {{ define "main" }}
diff --git a/layouts/_default/projekte.html b/layouts/_default/projekte.html index 0651d99432..f6f88dbcc5 100644 --- a/layouts/_default/projekte.html +++ b/layouts/_default/projekte.html @@ -1,22 +1,3 @@ -{{ define "title"}} -{{ .Title }} - {{ .Site.Title }} -{{ end }} - -{{ define "head" }} -{{ range .AlternativeOutputFormats -}} - -{{ end -}} - - - -{{ with .Params.img_header }} -{{ end }} -{{with .Params.meta}} - - -{{end}} -{{ end }} - {{ define "main" }}
diff --git a/layouts/_default/section.html b/layouts/_default/section.html index e01b720c8d..324084eeda 100644 --- a/layouts/_default/section.html +++ b/layouts/_default/section.html @@ -1,22 +1,3 @@ -{{ define "title"}} -{{ .Title }} - {{ .Site.Title }} -{{ end }} - -{{ define "head" }} -{{ range .AlternativeOutputFormats -}} - -{{ end -}} - - - - -{{with .Params.meta}} - - -{{end}} -{{ end }} - - {{ define "main" }}

section template

diff --git a/layouts/_default/single.html b/layouts/_default/single.html index cbd6bce0b9..e2f77eb6b3 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,21 +1,3 @@ -{{ define "title"}} -{{ .Title }} - {{ .Site.Title}} -{{ end }} - -{{ define "head" }} -{{ range .AlternativeOutputFormats -}} - -{{ end -}} - - - -{{ with .Params.img_header }}{{ end }} -{{with .Params.meta}} - - -{{end}} -{{ end }} - {{ define "main" }}
diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html index 7df0418316..aff5c39ec7 100644 --- a/layouts/_default/taxonomy.html +++ b/layouts/_default/taxonomy.html @@ -1,21 +1,3 @@ -{{ define "title"}} -{{ .Title }} - {{ strings.FirstUpper .Section }} - {{ .Site.Title}} -{{ end }} - -{{ define "head" }} -{{ range .AlternativeOutputFormats -}} - -{{ end -}} - - - - -{{with .Params.meta}} - - -{{end}} -{{ end }} - {{ define "main" }}
diff --git a/layouts/_default/team.html b/layouts/_default/team.html index 565a5b18cd..dd0deda835 100644 --- a/layouts/_default/team.html +++ b/layouts/_default/team.html @@ -1,22 +1,3 @@ -{{ define "title"}} -{{ .Title }} - {{ .Site.Title }} -{{ end }} - -{{ define "head" }} -{{ range .AlternativeOutputFormats -}} - -{{ end -}} - - - -{{ with .Params.img_header }}{{ end }} -{{with .Params.meta}} - - -{{end}} -{{ end }} - - {{ define "main" }}
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html index 805463a023..3b93b03ebd 100644 --- a/layouts/_default/terms.html +++ b/layouts/_default/terms.html @@ -1,21 +1,3 @@ -{{ define "title"}} -{{ .Title }} - {{ .Site.Title }} -{{ end }} - -{{ define "head" }} -{{ range .AlternativeOutputFormats -}} - -{{ end -}} - - - -{{ with .Params.img_social }}{{ end }} -{{with .Params.meta}} - - -{{end}} -{{ end }} - {{ define "main" }}
diff --git a/layouts/_default/topics.html b/layouts/_default/topics.html index 87c143d8e3..daec04cd33 100644 --- a/layouts/_default/topics.html +++ b/layouts/_default/topics.html @@ -1,21 +1,3 @@ -{{ define "title"}} -{{ .Title }} - {{ .Site.Title }} -{{ end }} - -{{ define "head" }} -{{ range .AlternativeOutputFormats -}} - -{{ end -}} - - - -{{ with .Params.img_social }}{{ end }} -{{with .Params.meta}} - - -{{end}} -{{ end }} - {{ define "main" }}
diff --git a/layouts/_default/verein.html b/layouts/_default/verein.html index 8a7f1aaff7..b11c63a3f8 100644 --- a/layouts/_default/verein.html +++ b/layouts/_default/verein.html @@ -1,21 +1,3 @@ -{{ define "title"}} -{{ .Title }} - {{ .Site.Title }} -{{ end }} - -{{ define "head" }} -{{ range .AlternativeOutputFormats -}} - -{{ end -}} - - - -{{ with .Params.img_header }}{{ end }} -{{with .Params.meta}} - - -{{end}} -{{ end }} - {{ define "main" }}
diff --git a/layouts/index.html b/layouts/index.html index 5fb8a57e3e..f6bdbf31c5 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,18 +1,3 @@ -{{ define "title"}} -OKF - Open Knowledge Foundation Deutschland e.V. -{{ end }} - -{{ define "head" }} - - - -{{ with .Params.img_header }}{{ end }} -{{with .Params.meta}} - - -{{end}} -{{ end }} - {{ define "main" }}
diff --git a/layouts/jobs/single.html b/layouts/jobs/single.html index ddb7f56a9f..6946a906b9 100644 --- a/layouts/jobs/single.html +++ b/layouts/jobs/single.html @@ -1,29 +1,3 @@ -{{ define "title"}} -{{ .Title }} - {{ strings.FirstUpper .Section }} - {{ .Site.Title}} -{{ end }} - -{{ define "head" }} -{{ range .AlternativeOutputFormats -}} - -{{ end -}} - - - - - - - - - - - - -{{with .Params.image}} - - -{{end}} -{{ end }} - {{ define "main" }}
diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 782782dd97..a50e88959b 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -1,16 +1,47 @@ +{{ hugo.Generator }} - - - - - - - - - + + + + + + + + + + + {{ if lt (len .Summary) 150 }} + + {{ else }} + + {{ end }} + + + + + + {{ if (isset .Params "author") }} + + {{ else }} + + {{ end }} + + + {{- partial "head_openGraph.html" . }} + + + {{- partial "head_favicon.html" . }} + + + {{ range .AlternativeOutputFormats -}} + + {{ end -}} + + + @@ -18,3 +49,13 @@ {{ $style := resources.Get "sass/main.sass" | resources.ToCSS | resources.Minify | resources.Fingerprint }} {{- partial "js.html" . -}} + + + + +{{ $ctitle := ( printf "%s - %s" .Title .Site.Title ) }} +{{ if not .IsHome }} + {{ $ctitle = ( printf "%s : %s - %s" .Title .Site.Title .Site.Params.Subtitle) }} +{{ end }} + +{{ $ctitle }} \ No newline at end of file diff --git a/layouts/partials/head_favicon.html b/layouts/partials/head_favicon.html new file mode 100644 index 0000000000..2def362603 --- /dev/null +++ b/layouts/partials/head_favicon.html @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/layouts/partials/head_openGraph.html b/layouts/partials/head_openGraph.html new file mode 100644 index 0000000000..e2abd87a45 --- /dev/null +++ b/layouts/partials/head_openGraph.html @@ -0,0 +1,39 @@ + +{{ $permalink := "/files/favicon/apple-touch-icon.png" | absURL }} +{{ $imgalt := print .Site.Params.subtitle }} + +{{ if (isset .Params "image") }} + {{ $permalink = print .Params.image.src | absURL }} + {{ if (isset .Params.image "title") }} + {{ $imgalt = .Params.image.title }} + {{ end }} +{{ end }} + + + + + +{{ if (isset .Params "twitter_creator_id") }} + +{{ end }} + + +{{ if (isset .Params "tags") }} + {{ $tagstring := " " }} + {{ range .Params.tags}} + {{ $tagstring = (print $tagstring "#" (replace . " " "" ) " ") }} + {{ end }} + + {{ else }} + +{{ end }} + + + + + + + + + + diff --git a/layouts/post/single.html b/layouts/post/single.html index 7029a2346d..69e51515b8 100644 --- a/layouts/post/single.html +++ b/layouts/post/single.html @@ -1,33 +1,3 @@ -{{ define "title"}} -{{ .Title }} - {{ strings.FirstUpper .Section }} - {{ .Site.Title}} -{{ end }} - -{{ define "head" }} -{{ range .AlternativeOutputFormats -}} - -{{ end -}} - - - - -{{ with .Params.tags }} - {{ range . }} - - {{ end }} -{{ end }} - - - - - - - -{{ if (isset .Params "image") }} - - -{{end}} -{{ end }} - {{ define "main" }}
diff --git a/layouts/projektfilter/single.html b/layouts/projektfilter/single.html index 4387601a4b..59c5d019a0 100644 --- a/layouts/projektfilter/single.html +++ b/layouts/projektfilter/single.html @@ -1,16 +1,3 @@ -{{ define "title"}} -{{ .Title }} - {{ strings.FirstUpper .Section }} - {{ .Site.Title}} -{{ end }} - -{{ define "head" }} -{{ range .AlternativeOutputFormats -}} - -{{ end -}} - - - -{{ end }} - {{ define "main" }}
diff --git a/layouts/themen/single.html b/layouts/themen/single.html index 0ea001ccb5..a9a966b071 100644 --- a/layouts/themen/single.html +++ b/layouts/themen/single.html @@ -1,21 +1,3 @@ -{{ define "title"}} -{{ .Title }} - {{ strings.FirstUpper .Section }} - {{ .Site.Title }} -{{ end }} - -{{ define "head" }} -{{ range .AlternativeOutputFormats -}} - -{{ end -}} - - - -{{ with .Params.img_social }}{{ end }} -{{with .Params.meta}} - - -{{end}} -{{ end }} - {{ define "main" }}