Skip to content

Commit c65040f

Browse files
authored
162 zotero bibliography (#168)
* [#162] use build script to fetch zotero json and use custom shortcode to format bibliography page * [#162] add current bibliography.json file in data * [#162] remove unneeded semicolons * add fetch script to github workflow, should auto update the bibliography on build * [#162] add hugo-bibliography and remove now unneeded local files * [#162] test to see if bibliography works without .json file already in repo * [#162] add bibliography button to the menu * [#162] move shell script to sub module * [#162] update docker path to fetch script * [#162] update github workflow path to fetch script * [#162] add fetch-script to render build script to actually see bibliography in the pr-render * [#162] Update Bibliography page * [#162] use latest hugo-bibliography which sorts by author * [#162] use correct hugo-bibliography version * [#162] pull latest hugo-bibliography changes * [#162] remove unneeded artifact in docker * [#162] pull latest hugo-bibliography version * [#162] remove filter on citations * [#162] update hugo-bib version, prevents rendering unavailable bib info * [#162] rename page from publications to literature * [#162] incorporate fix for doi rendering bug
1 parent 0eacd85 commit c65040f

File tree

8 files changed

+33
-4
lines changed

8 files changed

+33
-4
lines changed

.github/workflows/hugo.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ jobs:
4848
uses: actions/configure-pages@v5
4949
- name: Install Node.js dependencies
5050
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
51+
- name: Install jq for fetch script
52+
run: sudo apt-get update && sudo apt-get install -y jq
53+
- name: Run Zotero fetch script
54+
run: ../../themes/hugo-bibliography/fetch-zotero.sh
55+
5156
- name: Build with Hugo
5257
env:
5358
# For maximum backward compatibility with Hugo modules

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "themes/hugo-bibliography"]
2+
path = themes/hugo-bibliography
3+
url = https://github.com/dh-tech/hugo-bibliography.git

assets/sass/_custom.sass

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@
3030
.nav .nav_body
3131
justify-content: flex-start
3232

33+
34+
.apa-citation
35+
margin-bottom: 1rem
36+
text-indent: -2rem
37+
padding-left: 2rem
38+
3339
.tag_result
3440
font-size: 1.25rem
3541
width: fit-content

config.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,12 @@ menu:
2424
- name: job board
2525
pageRef: /job-board
2626
weight: 7
27+
- name: literature
28+
pageRef: /literature
29+
weight: 8
2730
- name: join us
2831
pageRef: /join
29-
weight: 8
32+
weight: 9
3033
social:
3134
# social menu links
3235
- name: github
@@ -52,8 +55,7 @@ markup:
5255
renderer:
5356
unsafe: true # allow raw html in content
5457

55-
theme:
56-
- "github.com/chipzoller/hugo-clarity"
58+
theme: ["github.com/chipzoller/hugo-clarity", "hugo-bibliography"]
5759

5860
# clarity-specific configuration
5961

content/literature.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: "Literature Related to Research Software Engineering in DH"
3+
description:
4+
---
5+
{{< bibliography >}}

docker-compose.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,10 @@ services:
66
volumes:
77
- .:/src
88
working_dir: /src
9-
command: ["server", "--bind", "0.0.0.0", "--port", "1313"]
9+
command: >
10+
sh -c "
11+
apk add --no-cache curl jq &&
12+
./themes/hugo-bibliography/fetch-zotero.sh &&
13+
hugo server --bind 0.0.0.0 --port 1313
14+
"
1015
restart: unless-stopped

render-build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ HUGO_VERSION=0.142.0
99
OS_VERSION="Linux-64bit"
1010
#OS_VERSION="darwin-universal" # uncomment to test on mac osx
1111

12+
./themes/hugo-bibliography/fetch-zotero.sh
13+
1214
if [[ ! -f $XDG_CACHE_HOME/hugo ]]; then
1315
echo "...Downloading HUGO"
1416
mkdir -p ~/tmp

themes/hugo-bibliography

Submodule hugo-bibliography added at c6e76b2

0 commit comments

Comments
 (0)