Skip to content

Commit a54a956

Browse files
updated to newest Hugo version
1 parent 1bdbaf2 commit a54a956

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+5690
-6370
lines changed

.editorconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,3 @@ max_line_length = 100
1515

1616
[*.md]
1717
trim_trailing_whitespace = false
18-
19-
[layouts/shortcodes/*.html]
20-
insert_final_newline = false

.forestry/front_matter/templates/blog-post.yml

Lines changed: 0 additions & 50 deletions
This file was deleted.

.forestry/front_matter/templates/event.yml

Lines changed: 0 additions & 71 deletions
This file was deleted.

.forestry/settings.yml

Lines changed: 0 additions & 56 deletions
This file was deleted.

.github/workflows/gh-pages.yml

Lines changed: 56 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,70 @@
11
name: github pages
2+
3+
env:
4+
WC_HUGO_VERSION: '0.147.9'
5+
26
on:
37
push:
48
branches:
59
- src # Set a branch name to trigger deployment
10+
# Allows you to run this workflow manually from the Actions tab on GitHub.
11+
workflow_dispatch:
12+
13+
# Provide permission to clone the repo and deploy it to GitHub Pages
14+
permissions:
15+
contents: read
16+
pages: write
17+
id-token: write
18+
19+
concurrency:
20+
group: "pages"
21+
cancel-in-progress: false
22+
623
jobs:
7-
deploy:
8-
runs-on: ubuntu-22.04
24+
build:
25+
runs-on: ubuntu-latest
926
steps:
10-
- uses: actions/checkout@v3
27+
- name: Checkout
28+
uses: actions/checkout@v4
1129
with:
12-
submodules: true # Fetch Hugo themes (true OR recursive)
13-
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
30+
# Fetch history for Hugo's .GitInfo and .Lastmod
31+
fetch-depth: 0
1432
- name: Setup Hugo
15-
uses: peaceiris/actions-hugo@v2
33+
uses: peaceiris/actions-hugo@v3
1634
with:
17-
hugo-version: '0.81.0'
35+
hugo-version: ${{ env.WC_HUGO_VERSION }}
1836
extended: true
19-
- name: Build
20-
run: hugo --minify
37+
- uses: actions/cache@v4
38+
with:
39+
path: /tmp/hugo_cache_runner/
40+
key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.mod') }}
41+
restore-keys: |
42+
${{ runner.os }}-hugomod-
43+
- name: Setup Pages
44+
id: pages
45+
uses: actions/configure-pages@v5
46+
- name: Build with Hugo
47+
env:
48+
HUGO_ENVIRONMENT: production
49+
run: |
50+
echo "Hugo Cache Dir: $(hugo config | grep cachedir)"
51+
hugo --minify --baseURL "${{ steps.pages.outputs.base_url }}/"
52+
- name: Upload artifact
53+
uses: actions/upload-pages-artifact@v3
54+
with:
55+
path: ./public
56+
57+
# Deploy website to GitHub Pages hosting
58+
deploy:
59+
environment:
60+
name: github-pages
61+
url: ${{ steps.deployment.outputs.page_url }}
62+
runs-on: ubuntu-latest
63+
needs: build
64+
steps:
65+
- name: Deploy to GitHub Pages
66+
id: deployment
67+
uses: actions/deploy-pages@v4
2168
- name: Deploy
2269
uses: peaceiris/actions-gh-pages@v3
2370
with:

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@
44
# Hugo
55
/resources/
66
public/
7-
jsconfig.json
8-
node_modules/
7+
assets/jsconfig.json

README.md

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,59 +6,34 @@ git clone [email protected]:DFKI-NLP/dfki-nlp.github.io.git
66

77
Create a new publication, e.g. by copying an old one:
88
```bash
9-
cp -r content/publication/acl2022-repl4nlp-chen-fewie/
9+
cp -r content/publication/acl2022-repl4nlp-chen-fewie/ content/publication/<your-new-folder-name>
1010
```
1111
And edit the files index.md and cite.bib.
1212
Then just commit and push. Check whether the commit was built correctly (e.g. here: https://github.com/DFKI-NLP/dfki-nlp.github.io/actions)
1313

1414
Add / update a news post:
1515
```bash
16-
cp -r content/post/acl2022
16+
cp -r content/post/acl2022 content/post/<new-post>
1717
```
1818
and edit index.md
1919
Then just commit and push. Check whether the commit was built correctly (e.g. here: https://github.com/DFKI-NLP/dfki-nlp.github.io/actions)
2020

2121
# How-To (with Hugo)
2222

23-
For local testing, install Hugo (https://gohugo.io/):
24-
```bash
25-
wget https://github.com/gohugoio/hugo/releases/download/v0.80.0/hugo_extended_0.80.0_Linux-64bit.tar.gz
26-
tar -xvf hugo_extended_0.80.0_Linux-64bit.tar.gz
27-
sudo mv hugo /usr/local/bin/
28-
```
23+
For local testing, install Hugo, following the instructions here https://docs.hugoblox.com/getting-started/install-hugo/
24+
25+
Note: You can install hugo in a Conda environment with 'conda install go' followed by 'pip install hugo'.
2926

3027
Clone the website repo:
3128
```bash
3229
git clone [email protected]:DFKI-NLP/dfki-nlp.github.io.git
3330
```
3431

35-
Init all submodules in the repo:
36-
```bash
37-
cd dfki-nlp.github.io
38-
git submodule update --init --recursive
39-
```
40-
4132
Serve the website locally (reachable at http://localhost:1313/):
4233
```bash
4334
hugo server
4435
```
4536

46-
## Add a publication
47-
48-
Assuming that we are in the top-level directory, create a new publication entry:
49-
```bash
50-
hugo new --kind publication publication/<my-publication>
51-
```
52-
53-
Go to `content > publication > <my-publication>` and edit `index.md`.
54-
Here is an example: https://raw.githubusercontent.com/DFKI-NLP/dfki-nlp.github.io/src/content/publication/Fine-tuning-Pre-Trained-Transformer-Language-Models-to-Distantly-Supervised-Relation-Extraction/index.md
55-
56-
If you add a file called `cite.bib` with a bibtex entry, hugo will create a cite button.
57-
File (e.g. poster) can be added to the directory and linked to a "poster" button (see example).
58-
Links to the paper and/or demo can be added as well.
59-
60-
More details can be found here: https://sourcethemes.com/academic/docs/managing-content/#manually
61-
There is also a way to automatically create a publication from bibtex but it did not work for me: https://sourcethemes.com/academic/docs/managing-content/#automatically
6237

6338
## Publish Website
6439

assets/images/icon-pack/.gitkeep

Whitespace-only changes.
File renamed without changes.

assets/scss/template.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Make page header alignment consistent with widget page header alignment
2+
.universal-wrapper h1 {
3+
text-align: center;
4+
}
5+
6+
// Center the CTA shortcode button
7+
.cta-group {
8+
justify-content: center;
9+
}

0 commit comments

Comments
 (0)