Skip to content

Commit 25fb174

Browse files
replace with hugo
1 parent 184c017 commit 25fb174

File tree

978 files changed

+25978
-3729
lines changed

Some content is hidden

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

978 files changed

+25978
-3729
lines changed

.github/workflows/hugo.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Sample workflow for building and deploying a Hugo site to GitHub Pages
2+
name: Deploy Hugo site to Pages
3+
4+
on:
5+
# Runs on pushes targeting the default branch
6+
push:
7+
branches: ["main"]
8+
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20+
concurrency:
21+
group: "pages"
22+
cancel-in-progress: false
23+
24+
# Default to bash
25+
defaults:
26+
run:
27+
shell: bash
28+
29+
jobs:
30+
# Build job
31+
build:
32+
runs-on: ubuntu-latest
33+
env:
34+
HUGO_VERSION: 0.128.0
35+
steps:
36+
- name: Install Hugo CLI
37+
run: |
38+
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
39+
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
40+
- name: Install Dart Sass
41+
run: sudo snap install dart-sass
42+
- name: Checkout
43+
uses: actions/checkout@v4
44+
with:
45+
submodules: recursive
46+
- name: Setup Pages
47+
id: pages
48+
uses: actions/configure-pages@v5
49+
- name: Install Node.js dependencies
50+
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
51+
- name: Build with Hugo
52+
env:
53+
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
54+
HUGO_ENVIRONMENT: production
55+
run: |
56+
hugo \
57+
--minify \
58+
--baseURL "${{ steps.pages.outputs.base_url }}/"
59+
- name: Upload artifact
60+
uses: actions/upload-pages-artifact@v3
61+
with:
62+
path: ./public
63+
64+
# Deployment job
65+
deploy:
66+
environment:
67+
name: github-pages
68+
url: ${{ steps.deployment.outputs.page_url }}
69+
runs-on: ubuntu-latest
70+
needs: build
71+
steps:
72+
- name: Deploy to GitHub Pages
73+
id: deployment
74+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
public/
2+
.hugo_build.lock

.gitmodules

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

README.md

Lines changed: 7 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,11 @@
1-
Open Bioinformatics Foundation (OBF) main website
2-
=================================================
1+
# test conversion of the obf website
32

4-
This git repository hosts static HTML for the OBF website, which
5-
GitHub pages serves at http://obf.github.io/ and which we will
6-
later point https://open-bio.org to. This is designed to replace
7-
the WordPress site used until 2025.
3+
Exploring the migration of the OBF WP site to a static site generator
84

9-
This repository will host:
105

11-
* The front-page ``index.html``
12-
* The board of directors ``/board/``
13-
* Member projects ``/projects/``
14-
* Event Award (originally called the OBF Travel Fellowship), ``/event-awards/``
15-
* Membership ``/membership/``
16-
* Code of contact ``/code-of-conduct/``
17-
* Dontations ``/donate/``
18-
* Other small misc. content originally in WordPress
19-
20-
Separate repositories handle other parts of the website, most of which
21-
will be static:
22-
23-
* https://github.com/OBF/wiki hosts the historical ``/wiki/`` content,
24-
originally hosted in MediaWiki but converted to Markdown.
25-
* https://github.com/OBF/bosc2000 to https://github.com/OBF/bosc2016
26-
host the ``/bosc2000/`` to ``/bosc2016`` content, static HTML in the
27-
earlier meetings, later on just the PDFs like abstracts.
28-
* https://github.com/OBF/wp-content hosts the historical ``/wp-content/``
29-
files uploaded via WordPress (mostly photos for blog posts etc).
30-
31-
Pending:
32-
33-
* The ``/bosc/`` content originally in WordPress
6+
## Steps taken
347

8+
1. Create XML export of existing WP site with all pages & posts
9+
2. Run the conversion script [wp2hugo](https://github.com/ashishb/wp2hugo) in the following way `/wp2hugo -source obf.WordPress.2025-01-30.xml -output obf-test-hugo -download-media -continue-on-media-download-error`
10+
3. update the `hugo.yaml` to use the correct base page (as currently not deployed on open-bio.org)
11+
4. remove any leading `/` in media `/wp` paths, as test site isn't deployed to open-bio.org yet: `find . -type f -name '*.md' -exec sed -i "s/image: \/wp/image: \/obf-hugo-test\/wp/g" {} +` & `find . -type f -name '*.md' -exec sed -i "s/](\//](\/obf-hugo-test\//g" {} +`

archetypes/default.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
date: '{{ .Date }}'
3+
draft: true
4+
title: '{{ replace .File.ContentBaseName "-" " " | title }}'
5+
---

0 commit comments

Comments
 (0)