Skip to content

Commit b99a6bf

Browse files
committed
Update template
1 parent 43a73f4 commit b99a6bf

File tree

9 files changed

+83
-25
lines changed

9 files changed

+83
-25
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Hugo Blox GitHub Action to convert Bibtex publications to Markdown-based webpages
2+
name: Import Publications From Bibtex
3+
4+
# Require permission to create a PR
5+
permissions:
6+
contents: write
7+
pull-requests: write
8+
9+
# Run workflow when a `.bib` file is added or updated in the `data/` folder
10+
on:
11+
push:
12+
branches: ['main']
13+
paths: ['publications.bib']
14+
15+
# Allows you to run this workflow manually from the Actions tab
16+
workflow_dispatch:
17+
18+
jobs:
19+
hugoblox:
20+
if: github.repository_owner != 'HugoBlox'
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout the repo
24+
uses: actions/checkout@v4
25+
- name: Set up Python 3.12
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: "3.12"
29+
- name: Install dependencies
30+
run: |
31+
python -m pip install --upgrade pip
32+
pip install academic==0.10.0
33+
- name: Run Academic (Bibtex To Markdown Converter)
34+
# Check `.bib` file exists for case when action runs on `.bib` deletion
35+
# Note GH only provides hashFiles func in `steps.if` context, not `jobs.if` context
36+
if: ${{ hashFiles('publications.bib') != '' }}
37+
run: academic import publications.bib content/publication/ --compact
38+
- name: Create Pull Request
39+
# Set ID for `Check outputs` stage
40+
id: cpr
41+
uses: peter-evans/create-pull-request@v6
42+
with:
43+
commit-message: 'content: import publications from Bibtex'
44+
title: Hugo Blox Builder - Import latest publications
45+
body: |
46+
Import the latest publications from `publications.bib` to `content/publication/`.
47+
将最新的出版物从`publications.bib`导入到`content/publication/`。
48+
[View Documentation](https://github.com/GetRD/academic-file-converter)
49+
base: main
50+
labels: automated-pr, content
51+
branch: hugoblox-import-publications
52+
delete-branch: true
53+
- name: Check outputs
54+
if: ${{ steps.cpr.outputs.pull-request-number }}
55+
run: |
56+
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
57+
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"

.github/workflows/publish.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Deploy website to GitHub Pages
22

33
env:
4-
WC_HUGO_VERSION: '0.123.3'
4+
WC_HUGO_VERSION: '0.135.0'
55

66
on:
77
# Trigger the workflow every time you push to the `main` branch
@@ -32,19 +32,19 @@ jobs:
3232
# Fetch history for Hugo's .GitInfo and .Lastmod
3333
fetch-depth: 0
3434
- name: Setup Hugo
35-
uses: peaceiris/actions-hugo@v2
35+
uses: peaceiris/actions-hugo@v3
3636
with:
3737
hugo-version: ${{ env.WC_HUGO_VERSION }}
3838
extended: true
39-
- uses: actions/cache@v3
39+
- uses: actions/cache@v4
4040
with:
4141
path: /tmp/hugo_cache_runner/
4242
key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.mod') }}
4343
restore-keys: |
4444
${{ runner.os }}-hugomod-
4545
- name: Setup Pages
4646
id: pages
47-
uses: actions/configure-pages@v3
47+
uses: actions/configure-pages@v5
4848
- name: Build with Hugo
4949
env:
5050
HUGO_ENVIRONMENT: production

config/_default/hugo.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ removePathAccents: true
2222

2323
enableGitInfo: false
2424
summaryLength: 30
25-
paginate: 10
25+
pagination:
26+
pagerSize: 10
2627
enableEmoji: true
2728
enableRobotsTXT: true
2829
footnotereturnlinkcontents: <sup>^</sup>

config/_default/languages.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# Default language
66
en:
7-
languageCode: en-gb
7+
languageCode: en-us
88
# Uncomment for multi-lingual sites, and move English content into `en` sub-folder.
99
#contentDir: content/en
1010

config/_default/params.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ marketing:
2323
analytics:
2424
google_analytics: ''
2525
baidu_tongji: ''
26+
google_tag_manager: ''
27+
microsoft_clarity: ''
2628
verification:
2729
google: ''
2830
baidu: ''
@@ -86,6 +88,11 @@ features:
8688
show_count: true
8789
commento:
8890
url: ''
91+
giscus:
92+
repo: ''
93+
repo_id: ''
94+
category: ''
95+
category_id: ''
8996
search:
9097
provider: wowchemy
9198
algolia:
@@ -101,12 +108,9 @@ features:
101108
# Extensions
102109

103110
extensions:
104-
cms:
111+
decap_cms:
105112
branch: main
106113
local_backend: false
107-
isotope:
108-
# Enable if you use the Portfolio widget or Publication filter
109-
enable: true
110114
academicons:
111115
enable: true
112116

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
module github.com/HugoBlox/starter-hugo-research-group
1+
module github.com/wowchemy/starter-hugo-research-group
22

33
go 1.15
44

55
require (
6-
github.com/HugoBlox/hugo-blox-builder/modules/blox-bootstrap/v5 v5.9.7
6+
github.com/HugoBlox/hugo-blox-builder/modules/blox-bootstrap/v5 v5.9.8-0.20241012174104-661cadc17327
77
github.com/HugoBlox/hugo-blox-builder/modules/blox-plugin-decap-cms v0.1.2-0.20231108143325-448ed0e3bd2b
8-
github.com/HugoBlox/hugo-blox-builder/modules/blox-plugin-netlify v1.1.2-0.20231108143325-448ed0e3bd2b
9-
)
8+
github.com/HugoBlox/hugo-blox-builder/modules/blox-plugin-netlify v1.1.2-0.20240509231741-c3d23d929bc6
9+
)

go.sum

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
github.com/HugoBlox/hugo-blox-builder/modules/blox-bootstrap/v5 v5.9.7 h1:QPek2BL723n+uM4DjyV97qNIoPsmt/vnKAQyaGJbgvQ=
2-
github.com/HugoBlox/hugo-blox-builder/modules/blox-bootstrap/v5 v5.9.7/go.mod h1:xZiTEEurbEwj/NhZohozvlyLCGVCT2wARHDAJeqKG/c=
1+
github.com/HugoBlox/hugo-blox-builder/modules/blox-bootstrap/v5 v5.9.8-0.20241012174104-661cadc17327 h1:aKhll1k3EctTWSvLZYrkhz4ehSqo1+OX5Ho7LvfZR/0=
2+
github.com/HugoBlox/hugo-blox-builder/modules/blox-bootstrap/v5 v5.9.8-0.20241012174104-661cadc17327/go.mod h1:+Itucnia7M8NWxaEys257x/34K4+POiBlR1yYCTrzBM=
33
github.com/HugoBlox/hugo-blox-builder/modules/blox-core v0.3.1/go.mod h1:So8+V2U+TNxlXmcpZfdDX0muLh3PdJ7z92h30sv3bZg=
44
github.com/HugoBlox/hugo-blox-builder/modules/blox-plugin-decap-cms v0.1.2-0.20231108143325-448ed0e3bd2b h1:pOYZJXK2hahVeW/FcVuBoFdvtR3DpsDDZVcbGnMNEdQ=
55
github.com/HugoBlox/hugo-blox-builder/modules/blox-plugin-decap-cms v0.1.2-0.20231108143325-448ed0e3bd2b/go.mod h1:Njlsj3S1Z833TdX1nacJZzsiwGGhOq4Nilzo2BH/wQ8=
6-
github.com/HugoBlox/hugo-blox-builder/modules/blox-plugin-netlify v1.1.2-0.20231108143325-448ed0e3bd2b h1:W8YVjA0quc4omsSJbsf80MRlB8Cd9DXnqlgYehikezM=
7-
github.com/HugoBlox/hugo-blox-builder/modules/blox-plugin-netlify v1.1.2-0.20231108143325-448ed0e3bd2b/go.mod h1:C7jfxMLv1bEUqbM9XDSmEpfOpS8w06OgqNDEcbuRgL4=
8-
github.com/HugoBlox/hugo-blox-builder/modules/blox-seo v0.2.2/go.mod h1:NsESu6cEms1DgH84icCyylElg2Zu8A0f7Fma5JR0LZE=
9-
github.com/wowchemy/wowchemy-hugo-modules/wowchemy-cms/v5 v5.0.0-20220608104852-b18d867d887d h1:zHd8zfZz8T6wfaeubYDrfAeDU+7U6HnKL1dRDo8tgew=
10-
github.com/wowchemy/wowchemy-hugo-modules/wowchemy-cms/v5 v5.0.0-20220608104852-b18d867d887d/go.mod h1:Sp/AKo+2HAPi/IPHp1MEdKPmee+mzO5+efUBUPLPqPE=
11-
github.com/wowchemy/wowchemy-hugo-modules/wowchemy/v5 v5.0.0-20220608104852-b18d867d887d h1:EghghFsHI/+ULzCCXlo211nI12+9/Jfnk7CLcpkCWF0=
12-
github.com/wowchemy/wowchemy-hugo-modules/wowchemy/v5 v5.0.0-20220608104852-b18d867d887d/go.mod h1:2iL9rdrUYyJXX2BeHKfK+QbqZlubCsaR60nQ87NRQTY=
6+
github.com/HugoBlox/hugo-blox-builder/modules/blox-plugin-netlify v1.1.2-0.20240509231741-c3d23d929bc6 h1:QIQqCc9DnS/PjhHCnyzxe5yhUMUYtJDMpRoaBtBk3VY=
7+
github.com/HugoBlox/hugo-blox-builder/modules/blox-plugin-netlify v1.1.2-0.20240509231741-c3d23d929bc6/go.mod h1:C7jfxMLv1bEUqbM9XDSmEpfOpS8w06OgqNDEcbuRgL4=
8+
github.com/HugoBlox/hugo-blox-builder/modules/blox-seo v0.2.3/go.mod h1:NsESu6cEms1DgH84icCyylElg2Zu8A0f7Fma5JR0LZE=

netlify.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
publish = "public"
44

55
[build.environment]
6-
HUGO_VERSION = "0.123.3"
6+
HUGO_VERSION = "0.135.0"
77
HUGO_ENABLEGITINFO = "true"
88

99
[context.production.environment]

theme.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ features = ["page builder", "widgets", "themes", "search", "research publication
3838

3939
[author]
4040
name = "George Cushen"
41-
homepage = "https://georgecushen.com"
41+
homepage = "https://georgecushen.com"

0 commit comments

Comments
 (0)