mirror of
https://github.com/thegeeklab/hugo-geekdoc.git
synced 2024-11-21 20:30:39 +00:00
fix: rework site header for better title and decription handling (#98)
This commit is contained in:
parent
d51f514b90
commit
5eff47c68b
@ -1,5 +1,6 @@
|
||||
---
|
||||
title: Documentation
|
||||
description: Geekdoc is a simple Hugo theme for documentations. It is intentionally designed as a fast and lean theme and may not fit the requirements of complex projects. If a more feature-complete theme is required there are a lot of got alternatives out there.
|
||||
---
|
||||
|
||||
<!-- markdownlint-capture -->
|
||||
@ -13,7 +14,7 @@ title: Documentation
|
||||
|
||||
<!-- markdownlint-restore -->
|
||||
|
||||
Geekdoc is a simple Hugo theme for documentations. It is intentionally designed as a fast and lean theme and may not fit the requirements of complex projects. If a more feature-complete theme is required there are a lot of got alternatives out there. You can find a demo and the full documentation at [https://geekdocs.de](https://geekdocs.de).
|
||||
Geekdoc is a simple Hugo theme for documentations. It is intentionally designed as a fast and lean theme and may not fit the requirements of complex projects. If a more feature-complete theme is required there are a lot of got alternatives out there.
|
||||
|
||||
## Features
|
||||
|
||||
|
@ -5,6 +5,8 @@ weight: -20
|
||||
|
||||
This page tells you how to get started with the Geekdoc theme, including installation and basic configuration.
|
||||
|
||||
<!--more-->
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
## Install requirements
|
||||
|
@ -2,7 +2,11 @@
|
||||
<html lang="{{ .Site.Language.Lang }}">
|
||||
|
||||
<head>
|
||||
{{ partial "head" . }}
|
||||
{{ partial "head/meta" . }}
|
||||
<title>Lost? Don't worry</title>
|
||||
|
||||
{{ partial "head/favicons" . }}
|
||||
{{ partial "head/others" . }}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
@ -2,7 +2,11 @@
|
||||
<html lang="{{ .Site.Language.Lang }}">
|
||||
|
||||
<head>
|
||||
{{ partial "head" . }}
|
||||
{{ partial "head/meta" . }}
|
||||
<title>{{ if not (eq .Kind "home") }}{{ partial "title" . }} | {{ end }}{{ .Site.Title }}</title>
|
||||
|
||||
{{ partial "head/favicons" . }}
|
||||
{{ partial "head/others" . }}
|
||||
</head>
|
||||
|
||||
<body itemscope itemtype="https://schema.org/WebPage">
|
||||
|
1
layouts/partials/head/favicons.html
Normal file
1
layouts/partials/head/favicons.html
Normal file
@ -0,0 +1 @@
|
||||
<link rel="icon" href="{{ "favicon/favicon-32x32.png" | relURL }}" type="image/x-icon">
|
12
layouts/partials/head/meta.html
Normal file
12
layouts/partials/head/meta.html
Normal file
@ -0,0 +1,12 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
{{ $description := default (default .Site.Title .Site.Params.description) (default .Summary .Description) }}
|
||||
{{ $keywords := default .Site.Params.Keywords .Keywords }}
|
||||
|
||||
{{ with $description }}
|
||||
<meta name="description" content="{{ . }}">
|
||||
{{ end }}
|
||||
{{ with $keywords }}
|
||||
<meta name="keywords" content="{{ delimit . "," }}">
|
||||
{{ end }}
|
@ -1,9 +1,3 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="{{ partial "title" . }}">
|
||||
|
||||
<title>{{ partial "title" . }} | {{ .Site.Title -}}</title>
|
||||
|
||||
<link rel="icon" href="{{ "favicon/favicon-32x32.png" | relURL }}" type="image/x-icon">
|
||||
|
||||
<link rel="preload" as="font" href="{{ "fonts/Metropolis.woff2" | relURL }}" type="font/woff2" crossorigin="anonymous">
|
Loading…
Reference in New Issue
Block a user