From 2d1f2015ade8b1fd74523af94b4fa35d177468af Mon Sep 17 00:00:00 2001 From: Ugur Yilmaz Date: Thu, 4 May 2023 10:38:03 +0100 Subject: [PATCH 01/15] Switch to hugo workflow for publishing --- .github/workflows/gh-pages.yml | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 .github/workflows/gh-pages.yml diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml deleted file mode 100644 index f4d1153..0000000 --- a/.github/workflows/gh-pages.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: github pages - -on: - push: - branches: - - main # Set a branch to deploy - -jobs: - deploy: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - with: - submodules: true # Fetch Hugo themes (true OR recursive) - fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod - - - name: Setup Hugo - uses: peaceiris/actions-hugo@v2 - with: - hugo-version: 'latest' # ok in Hugo v0.80.0 - # extended: true - - - name: Build - run: hugo --minify - - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./public From 770cc049facba9726c217abf5d2504f786088bd6 Mon Sep 17 00:00:00 2001 From: Ugur Yilmaz Date: Thu, 4 May 2023 10:38:03 +0100 Subject: [PATCH 02/15] Switch to hugo workflow for publishing --- .github/workflows/gh-pages.yml | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 .github/workflows/gh-pages.yml diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml deleted file mode 100644 index f4d1153..0000000 --- a/.github/workflows/gh-pages.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: github pages - -on: - push: - branches: - - main # Set a branch to deploy - -jobs: - deploy: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - with: - submodules: true # Fetch Hugo themes (true OR recursive) - fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod - - - name: Setup Hugo - uses: peaceiris/actions-hugo@v2 - with: - hugo-version: 'latest' # ok in Hugo v0.80.0 - # extended: true - - - name: Build - run: hugo --minify - - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./public From b68a023fe903f4577f643e2b63244d372bcfdd62 Mon Sep 17 00:00:00 2001 From: Ugur Yilmaz Date: Thu, 4 May 2023 10:46:41 +0100 Subject: [PATCH 03/15] Add hugo workflow --- .github/workflows/hugo.yml | 79 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 .github/workflows/hugo.yml diff --git a/.github/workflows/hugo.yml b/.github/workflows/hugo.yml new file mode 100644 index 0000000..202df8e --- /dev/null +++ b/.github/workflows/hugo.yml @@ -0,0 +1,79 @@ +# Sample workflow for building and deploying a Hugo site to GitHub Pages +# https://gohugo.io/hosting-and-deployment/hosting-on-github/ +name: Deploy Hugo site to Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: + - main + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +# Default to bash +defaults: + run: + shell: bash + +jobs: + # Build job + build: + runs-on: ubuntu-latest + env: + HUGO_VERSION: 0.111.3 + steps: + - name: Install Hugo CLI + run: | + wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \ + && sudo dpkg -i ${{ runner.temp }}/hugo.deb + - name: Install Dart Sass Embedded + run: sudo snap install dart-sass-embedded + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: recursive + fetch-depth: 0 + - name: Setup Pages + id: pages + uses: actions/configure-pages@v3 + - name: Install Node.js dependencies + run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true" + - name: Build with Hugo + env: + # For maximum backward compatibility with Hugo modules + HUGO_ENVIRONMENT: production + HUGO_ENV: production + run: | + hugo \ + --gc \ + --minify \ + --baseURL "${{ steps.pages.outputs.base_url }}/" + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + path: ./public + + # Deployment job + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 \ No newline at end of file From e51ef697f2f164f0b508b87c66e12c5c649318a1 Mon Sep 17 00:00:00 2001 From: Mario Antonioletti Date: Thu, 4 May 2023 10:54:55 +0100 Subject: [PATCH 04/15] Updated contents --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 56a5d7d..2fd4869 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,13 @@ +# CW23 Improvemnts + +For the 2023 Collaborations Worskshop the CW22 hack idea was revisited to improve: + +* The look and feel of the content +* The metadata used for the hack ideas +* The content in terms of enhancements + # Exploring previous Collaborations Workshop ideas (CW-ideas) + This is a fork of a repo originally produced for a hack day project at the [2021 Collaborations Workshop](http://www.software.ac.uk/cw21). The website presents the collaborative ideas and hackday pitches generated at previous Collaborations Workshops and makes them available through an easily browseable and searchable interface. A live version of the website is hosted at: From e52f17fba6662611f0ebd3e9f54cba72787d956c Mon Sep 17 00:00:00 2001 From: Ugur Yilmaz Date: Thu, 4 May 2023 11:14:22 +0100 Subject: [PATCH 05/15] Add authors pages --- config.yml | 4 ++++ content/by_authors.md | 5 +++++ themes/PaperMod/layouts/_default/by_authors.html | 13 +++++++++++++ 3 files changed, 22 insertions(+) create mode 100644 content/by_authors.md create mode 100644 themes/PaperMod/layouts/_default/by_authors.html diff --git a/config.yml b/config.yml index b847ef4..87be617 100644 --- a/config.yml +++ b/config.yml @@ -89,6 +89,10 @@ menu: name: By type url: /bytype/ weight: 25 + - identifier: byauthors + name: By Authors + url: /byauthors/ + weight: 25 - identifier: search name: Search url: /search diff --git a/content/by_authors.md b/content/by_authors.md new file mode 100644 index 0000000..ca211ad --- /dev/null +++ b/content/by_authors.md @@ -0,0 +1,5 @@ +--- +title: "By Authors" +layout: "by_authors" +url: "/byauthors/" +--- \ No newline at end of file diff --git a/themes/PaperMod/layouts/_default/by_authors.html b/themes/PaperMod/layouts/_default/by_authors.html new file mode 100644 index 0000000..306d353 --- /dev/null +++ b/themes/PaperMod/layouts/_default/by_authors.html @@ -0,0 +1,13 @@ +{{ define "main" }} +
+
+ {{ with .Params.subtitle }} + {{.}} + {{ end }} +
+
+ {{ range (.Site.RegularPages.GroupByParam "author")}} +

{{ .Key }}

+ {{ end }} +
+{{ end }} From b3ab8daf76c8f1185189d5ae03e55aa161a9026c Mon Sep 17 00:00:00 2001 From: Mario Antonioletti Date: Thu, 4 May 2023 11:16:07 +0100 Subject: [PATCH 06/15] Added credit to those involved. --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 2fd4869..019d65a 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,15 @@ For the 2023 Collaborations Worskshop the CW22 hack idea was revisited to improv * The metadata used for the hack ideas * The content in terms of enhancements +People involved: + +* Heather Turner +* Finn Bacall +* Joao Morado +* Jez Compe +* Ugur Yilmaz +* Gaurav Bhalerao + # Exploring previous Collaborations Workshop ideas (CW-ideas) This is a fork of a repo originally produced for a hack day project at the [2021 Collaborations Workshop](http://www.software.ac.uk/cw21). The website presents the collaborative ideas and hackday pitches generated at previous Collaborations Workshops and makes them available through an easily browseable and searchable interface. From c804e31a6571883be61e0b25ebe2ea683fd2c430 Mon Sep 17 00:00:00 2001 From: Mario Antonioletti Date: Thu, 4 May 2023 11:17:40 +0100 Subject: [PATCH 07/15] Fixed typo. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 019d65a..1585029 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# CW23 Improvemnts +# CW23 Improvements For the 2023 Collaborations Worskshop the CW22 hack idea was revisited to improve: From 4275c8abb3d817ddab151832f3bcafa8fcefb33b Mon Sep 17 00:00:00 2001 From: Mario Antonioletti Date: Thu, 4 May 2023 11:24:37 +0100 Subject: [PATCH 08/15] Added roles and added missing people. --- README.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 1585029..225d562 100644 --- a/README.md +++ b/README.md @@ -8,12 +8,14 @@ For the 2023 Collaborations Worskshop the CW22 hack idea was revisited to improv People involved: -* Heather Turner -* Finn Bacall -* Joao Morado -* Jez Compe -* Ugur Yilmaz -* Gaurav Bhalerao +* Heather Turner, worked on content improvement +* Finn Bacall, Hugo improvement +* Joao Morado, Hugo improvements +* Jez Cope, Metadata improvements +* Patricia Herterich, Metadata improvements +* Ugur Yilmaz, Hugo improvements +* Gaurav Bhalerao, Hugo improvements +* Mario Antonioletti, Content improvements # Exploring previous Collaborations Workshop ideas (CW-ideas) From 8f1deca2d7854a35a43c2574a7826e81c7c852d2 Mon Sep 17 00:00:00 2001 From: Mario Antonioletti Date: Thu, 4 May 2023 11:26:51 +0100 Subject: [PATCH 09/15] CW22 -> CW21. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 225d562..500585a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # CW23 Improvements -For the 2023 Collaborations Worskshop the CW22 hack idea was revisited to improve: +For the 2023 Collaborations Worskshop the CW21 hack idea was revisited to improve: * The look and feel of the content * The metadata used for the hack ideas From dee3fa5a8bb2e914b50e8048e01280f032928266 Mon Sep 17 00:00:00 2001 From: Mario Antonioletti Date: Thu, 4 May 2023 11:30:50 +0100 Subject: [PATCH 10/15] Making CW21 content more specific --- README.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/README.md b/README.md index 500585a..14b8f16 100644 --- a/README.md +++ b/README.md @@ -54,10 +54,5 @@ Tasks divided orthogonally - Provisioning a GitHub repo (Robin) ## Hack day presentation -Available [here](https://docs.google.com/presentation/d/1GOjaNzfhDBwjr1lmJOlYjHYNzxpctGAla5PxpZDzOIQ/edit?usp=sharing). +CW21 hack day presentation is available [here](https://docs.google.com/presentation/d/1GOjaNzfhDBwjr1lmJOlYjHYNzxpctGAla5PxpZDzOIQ/edit?usp=sharing). - - -## ToDo - -- [ ] Implementation of ordering: hack-day > hack-ideas > collaborative-ideas in `by_type.html` and `by_year.html` at `themes/PaperMod/layouts/_default` could be done much more elegantly - it's a bit of a hack just now. From 8f4bddb895aa5707222654a9a66ef3261d383a40 Mon Sep 17 00:00:00 2001 From: Finn Bacall Date: Thu, 4 May 2023 13:01:18 +0100 Subject: [PATCH 11/15] Group links by type (Hack day etc.) in a defined order without duplication of code --- themes/PaperMod/layouts/_default/by_type.html | 37 +--------------- themes/PaperMod/layouts/_default/by_year.html | 43 ++----------------- .../layouts/partials/grouped_by_type.html | 15 +++++++ 3 files changed, 20 insertions(+), 75 deletions(-) create mode 100644 themes/PaperMod/layouts/partials/grouped_by_type.html diff --git a/themes/PaperMod/layouts/_default/by_type.html b/themes/PaperMod/layouts/_default/by_type.html index 99fe6c3..d7a036d 100644 --- a/themes/PaperMod/layouts/_default/by_type.html +++ b/themes/PaperMod/layouts/_default/by_type.html @@ -6,41 +6,6 @@ {{ end }}
- {{ range (.Site.RegularPages.GroupByParam "type")}} - {{ if eq .Key "hack-day"}} -

{{ .Key }}

-
- -

- {{ end }} - {{ end }} - {{ range (.Site.RegularPages.GroupByParam "type")}} - {{ if eq .Key "hack-ideas"}} -

{{ .Key }}

-
- -

- {{ end }} - {{ end }} - {{ range (.Site.RegularPages.GroupByParam "type")}} - {{ if eq .Key "collaborative-ideas"}} -

{{ .Key }}

-
- -

- {{ end }} - {{ end }} + {{- partial "grouped_by_type.html" . -}} {{ end }} diff --git a/themes/PaperMod/layouts/_default/by_year.html b/themes/PaperMod/layouts/_default/by_year.html index 747e6fd..9c91277 100644 --- a/themes/PaperMod/layouts/_default/by_year.html +++ b/themes/PaperMod/layouts/_default/by_year.html @@ -6,44 +6,9 @@ {{ end }}
- {{ range (.Site.RegularPages.GroupByParam "year").Reverse}} -

{{ .Key }}

- {{ range (.Pages.GroupByParam "type").Reverse}} - {{ if eq .Key "hack-day" }} -
-
-
{{ .Key }}
- {{range .Pages}} -
{{.Title}}
- {{end}} -
-
- {{ end }} - {{ end }} - {{ range (.Pages.GroupByParam "type").Reverse}} - {{ if eq .Key "hack-ideas" }} -
-
-
{{ .Key }}
- {{range .Pages}} -
{{.Title}}
- {{end}} -
-
- {{ end }} - {{ end }} - {{ range (.Pages.GroupByParam "type").Reverse}} - {{ if eq .Key "collaborative-ideas" }} -
-
-
{{ .Key }}
- {{range .Pages}} -
{{.Title}}
- {{end}} -
-
- {{ end }} - {{ end }} - {{ end }} + {{- range (.Site.Pages.GroupByParam "year").Reverse -}} +

{{ .Key }}

+ {{- partial "grouped_by_type.html" . -}} + {{- end -}} {{ end }} diff --git a/themes/PaperMod/layouts/partials/grouped_by_type.html b/themes/PaperMod/layouts/partials/grouped_by_type.html new file mode 100644 index 0000000..a05aecf --- /dev/null +++ b/themes/PaperMod/layouts/partials/grouped_by_type.html @@ -0,0 +1,15 @@ +{{- $pages := cond (eq .Pages nil) site.RegularPages .Pages -}} +{{- $hack_day := where $pages "Params.type" "hack-day" | group "Hack Day" -}} +{{- $hack_ideas := where $pages "Params.type" "hack-ideas" | group "Hack Ideas" -}} +{{- $collaborative_ideas := where $pages "Params.type" "collaborative-ideas" | group "Collaborative Ideas" -}} +{{- $groups := slice $hack_day $hack_ideas $collaborative_ideas -}} +{{ range $groups }} +
+
+
{{ .Key }}
+ {{ range .Pages }} +
{{.Title}}
+ {{ end }} +
+
+{{ end }} From 34010f58b0401af9c25dce25e42f7edfa882878a Mon Sep 17 00:00:00 2001 From: Ugur Yilmaz Date: Thu, 4 May 2023 13:52:08 +0100 Subject: [PATCH 12/15] Add authors and sort them by contributions --- config.yml | 4 ++++ themes/PaperMod/layouts/_default/by_authors.html | 10 +++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/config.yml b/config.yml index 87be617..94c9980 100644 --- a/config.yml +++ b/config.yml @@ -98,3 +98,7 @@ menu: url: /search weight: 30 +taxonomies: + author: "author" + tag: "tags" + category: "categories" \ No newline at end of file diff --git a/themes/PaperMod/layouts/_default/by_authors.html b/themes/PaperMod/layouts/_default/by_authors.html index 306d353..e5394ec 100644 --- a/themes/PaperMod/layouts/_default/by_authors.html +++ b/themes/PaperMod/layouts/_default/by_authors.html @@ -6,8 +6,12 @@ {{ end }}
- {{ range (.Site.RegularPages.GroupByParam "author")}} -

{{ .Key }}

- {{ end }} + + + {{ end }} From 7bb85e661e36b90f4ed2fcac98d98e3f2029b0e4 Mon Sep 17 00:00:00 2001 From: Finn Bacall Date: Thu, 4 May 2023 14:03:26 +0100 Subject: [PATCH 13/15] Add icons for 1st, 2nd & 3rd place winners --- themes/PaperMod/assets/css/main.css | 5 +++++ .../layouts/partials/grouped_by_type.html | 19 ++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/themes/PaperMod/assets/css/main.css b/themes/PaperMod/assets/css/main.css index a22329e..22fef5b 100644 --- a/themes/PaperMod/assets/css/main.css +++ b/themes/PaperMod/assets/css/main.css @@ -43,3 +43,8 @@ code { direction: ltr } + +.prize-tag.prize-1 { color: #c98016 } +.prize-tag.prize-2 { color: #7f7f7f } +.prize-tag.prize-3 { color: #da7c47 } +.prize-tag.prize-other { color: #256d8a } diff --git a/themes/PaperMod/layouts/partials/grouped_by_type.html b/themes/PaperMod/layouts/partials/grouped_by_type.html index a05aecf..90d8d8c 100644 --- a/themes/PaperMod/layouts/partials/grouped_by_type.html +++ b/themes/PaperMod/layouts/partials/grouped_by_type.html @@ -8,7 +8,24 @@
{{ .Key }}
{{ range .Pages }} -
{{.Title}}
+
+ {{.Title}} + {{ if eq .Params.prize 1 }} + 🥇 1st Place + {{ else }} + {{ if eq .Params.prize 2 }} + 🥈 2nd Place + {{ else }} + {{ if eq .Params.prize 3 }} + 🥉 3rd Place + {{ else }} + {{ if ne .Params.prize nil }} + 🏅 Winner + {{ end }} + {{ end }} + {{ end }} + {{ end }} +
{{ end }}
From b5e27ac29d77135d61b9c6038e5246ef813ec5bc Mon Sep 17 00:00:00 2001 From: Gaurav Bhalerao Date: Thu, 4 May 2023 14:54:09 +0100 Subject: [PATCH 14/15] Update by_authors.html Hide counts equal to 1 --- themes/PaperMod/layouts/_default/by_authors.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/themes/PaperMod/layouts/_default/by_authors.html b/themes/PaperMod/layouts/_default/by_authors.html index e5394ec..a6d074b 100644 --- a/themes/PaperMod/layouts/_default/by_authors.html +++ b/themes/PaperMod/layouts/_default/by_authors.html @@ -9,7 +9,12 @@ From 309a3e91a3249b31b901f69e05f2de183dc8d9f7 Mon Sep 17 00:00:00 2001 From: Gaurav Bhalerao Date: Thu, 4 May 2023 14:56:07 +0100 Subject: [PATCH 15/15] Update terms.html Sort and hide count 1 --- themes/PaperMod/layouts/_default/terms.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/themes/PaperMod/layouts/_default/terms.html b/themes/PaperMod/layouts/_default/terms.html index b091987..6daf46a 100644 --- a/themes/PaperMod/layouts/_default/terms.html +++ b/themes/PaperMod/layouts/_default/terms.html @@ -13,12 +13,16 @@

{{ .Title }}

    {{- $type := .Type }} - {{- range $key, $value := .Data.Terms.Alphabetical }} + {{- range $key, $value := .Data.Terms.ByCount }} {{- $name := .Name }} {{- $count := .Count }} {{- with $.Site.GetPage (printf "/%s/%s" $type $name) }}
  • - {{ .Name }} {{ $count }} + {{ if gt $count 1 }} + {{ .Name }}{{ $count }} + {{ else }} + {{ .Name }} + {{- end }}
  • {{- end }} {{- end }}