Skip to content

Commit

Permalink
Frontpage: show evaluations as well as blog posts
Browse files Browse the repository at this point in the history
  • Loading branch information
manics committed Apr 25, 2024
1 parent ad83c0b commit 8c6917a
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 25 deletions.
4 changes: 4 additions & 0 deletions content/en/evaluations/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
author: SATRE
title: Evaluations
---
27 changes: 9 additions & 18 deletions content/en/page/about.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
---
author: SATRE
title: About Me
date: 2021-07-15
title: About Us
date: 2024-01-01
description:
keywords: ["about-us", "about-hugo", "contact"]
keywords: ["about-us", "tre", "contact"]
type: about
---

Written in Go, Hugo is an open source static site generator available under the [Apache Licence 2.0.](https://github.com/gohugoio/hugo/blob/master/LICENSE) Hugo supports TOML, YAML and JSON data file types, Markdown and HTML content files and uses shortcodes to add rich content. Other notable features are taxonomies, multilingual mode, image processing, custom output formats, HTML/CSS/JS minification and support for Sass SCSS workflows.
SATRE (Standardised Architecture for Trusted Research Environments) started as a DARE UK Driver Project working to standardise access to secure data in trusted research environments, and included University of Dundee, Alan Turing Institute, UCL, Ulster University, and Research Data Scotland.

Hugo makes use of a variety of open source projects including:
Version 1.0 of SATRE was published last year, and we're now working on refining it with the goal of published version 2.0 this year.
We are also working with interested parties to help them evaluate or build their own TREs and related infrastructure.

- https://github.com/yuin/goldmark
- https://github.com/alecthomas/chroma
- https://github.com/muesli/smartcrop
- https://github.com/spf13/cobra
- https://github.com/spf13/viper

Hugo is ideal for blogs, corporate websites, creative portfolios, online magazines, single page applications or even a website with thousands of pages.

Hugo is for people who want to hand code their own website without worrying about setting up complicated runtimes, dependencies and databases.

Websites built with Hugo are extremely fast, secure and can be deployed anywhere including, AWS, GitHub Pages, Heroku, Netlify and any other hosting provider.

Learn more and contribute on [GitHub](https://github.com/gohugoio).
- SATRE specification https://satre-specification.readthedocs.io/en/stable/
- SATRE GitHub organisation https://github.com/sa-tre
- Medium blog https://medium.com/satre
10 changes: 3 additions & 7 deletions hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,10 @@ DefaultContentLanguageInSubdir = true
url = "page/about/"
weight = 2

[[languages.en.menu.main]]
name = "Tags"
url = "tags"
weight = 3

[[languages.en.menu.main]]
name = "Evaluations"
url = "evaluations/"
weight = 4
weight = 3

[params]
# Enable the darkmode toggle in header
Expand Down Expand Up @@ -68,7 +63,8 @@ DefaultContentLanguageInSubdir = true
ascentColor = "bg-blue-300"

# The page bundle that is shown on the front page
frontBundle = "blog"
frontBundle = "evaluations"
frontBundle2 = "blog"

# Used to hide the post metadata such as posted date, reading time and word count
# Can be used at site level or page level
Expand Down
37 changes: 37 additions & 0 deletions layouts/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

{{ define "main" }}
{{- partial "intro.html" . -}}
{{ $frontBundle := .Site.Params.frontBundle | default "blog" }}
<div class="p-6">
<h2 class="text-2xl font-bold mb-2">{{ strings.Title $frontBundle }}</h2>
<div class="container p-6 mx-auto grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 lg:gap-8">
{{ range first 6 (where .Site.RegularPages.ByDate.Reverse "Type" $frontBundle) }}
{{- partial "blog-card.html" . -}}
{{ end }}
</div>
</div>

{{ $frontBundle2 := .Site.Params.frontBundle2 }}
{{ if $frontBundle2 }}
<div class="p-6">
<h2 class="text-2xl font-bold mb-2">{{ strings.Title $frontBundle2 }}</h2>
<div class="container p-6 mx-auto grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 lg:gap-8">
{{ range first 6 (where .Site.RegularPages.ByDate.Reverse "Type" $frontBundle2) }}
{{- partial "blog-card.html" . -}}
{{ end }}
{{ end }}
</div>
</div>

{{ if gt (len (where .Site.RegularPages.ByDate.Reverse "Type" $frontBundle2)) 6 }}
<div class="text-center mb-8">
<a class="px-8 py-3 rounded transition-colors {{ .Site.Params.ascentColor | default "bg-pink-50" }}
text-gray-500 hover:text-gray-800 dark:bg-gray-900 dark:text-gray-400 dark:hover:text-white"
href="{{ (index (.Site.Menus.main) 0).URL | absLangURL }}" lang="{{ .Lang }}">
{{ i18n "morePosts" }}
</a>
</div>
{{ end }}

{{- partial "social.html" . -}}
{{ end }}

0 comments on commit 8c6917a

Please sign in to comment.