From c87cdded7b927fef592088af1ade0828cbf11723 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 11 Dec 2023 10:53:38 +0100 Subject: [PATCH] better looking tags --- assets/sass/user_styles.scss | 3 +- hugo.toml | 1 + layouts/index.html | 130 +++++++++--------- layouts/projects/single.html | 4 +- themes/minimal-theme/layouts/404.html | 3 + .../minimal-theme/layouts/partials/terms.html | 13 +- themes/minimal-theme/layouts/robots.txt | 7 + 7 files changed, 85 insertions(+), 76 deletions(-) create mode 100644 themes/minimal-theme/layouts/404.html create mode 100644 themes/minimal-theme/layouts/robots.txt diff --git a/assets/sass/user_styles.scss b/assets/sass/user_styles.scss index f610b9e..01787b3 100644 --- a/assets/sass/user_styles.scss +++ b/assets/sass/user_styles.scss @@ -50,11 +50,10 @@ body { .fsfw-img { max-width: 50%; height: auto; - margin-bottom: 1.0rem; + margin-bottom: 1.5rem; } .satrs-img { max-width: 20%; height: auto; - margin-bottom: 1.0rem; } diff --git a/hugo.toml b/hugo.toml index 1026689..e37da75 100644 --- a/hugo.toml +++ b/hugo.toml @@ -2,6 +2,7 @@ baseURL = 'https://www.absatsw.irs-uni-stuttgart.de' languageCode = 'en-us' title = 'IRS Satellite Division Software Projects' theme = "minimal-theme" +enableRobotsTXT = true [menu] [[menu.main]] diff --git a/layouts/index.html b/layouts/index.html index c55b4f8..6c884bf 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,73 +1,45 @@ {{ define "main" }} -
-
+

{{ .Content }}

-
{{ end }} diff --git a/layouts/projects/single.html b/layouts/projects/single.html index 1d6b877..571c3b2 100644 --- a/layouts/projects/single.html +++ b/layouts/projects/single.html @@ -1,4 +1,6 @@ {{ define "main" }} - {{ .Content }} +
+ {{ .Content }} +
{{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }} {{ end }} diff --git a/themes/minimal-theme/layouts/404.html b/themes/minimal-theme/layouts/404.html new file mode 100644 index 0000000..a405573 --- /dev/null +++ b/themes/minimal-theme/layouts/404.html @@ -0,0 +1,3 @@ +{{- define "main" }} +
404
+{{- end }}{{/* end main */ -}} diff --git a/themes/minimal-theme/layouts/partials/terms.html b/themes/minimal-theme/layouts/partials/terms.html index 47cf6e4..bb34fd1 100644 --- a/themes/minimal-theme/layouts/partials/terms.html +++ b/themes/minimal-theme/layouts/partials/terms.html @@ -13,11 +13,12 @@ For a given taxonomy, renders a list of terms assigned to the page. {{- with $page.GetTerms $taxonomy }} {{- $label := (index . 0).Parent.LinkTitle }}
-
{{ $label }}:
- +
+ +
{{- end }} diff --git a/themes/minimal-theme/layouts/robots.txt b/themes/minimal-theme/layouts/robots.txt new file mode 100644 index 0000000..f26f508 --- /dev/null +++ b/themes/minimal-theme/layouts/robots.txt @@ -0,0 +1,7 @@ +User-agent: * +{{- if hugo.IsProduction | or (eq site.Params.env "production") }} +Disallow: +{{- else }} +Disallow: / +{{- end }} +Sitemap: {{ "sitemap.xml" | absURL }}