From b97c225ce03ebd34986d38a5809bc52fcb05dcc8 Mon Sep 17 00:00:00 2001
From: Peter Cock
Date: Wed, 5 Mar 2025 00:21:44 +0000
Subject: [PATCH 1/4] Update README regarding wp-content submodule
---
README.md | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index 6b53b8627..287bf746e 100644
--- a/README.md
+++ b/README.md
@@ -59,11 +59,10 @@ hugo server &
#### Seeing images on localhost
-At the moment (2025-02-12), the images live in a separate repo,
-https://github.com/OBF/wp-content/. If you want to view images in the
-web pages on localhost:1313, you will need to clone that repo and then
-make a symbolic link to it in the content directory of your
-checked-out copy of OBF.github.io.
+At the moment (2025-03-05), historic images live in a large separate repo
+https://github.com/OBF/wp-content/ which is included as a git submodule.
+If you want to view images in the web pages on localhost:1313, you will need
+to have cloned that repo via the `git submodule update` command above.
This may change.
From 524d923c8e3acb138be17047168ab5d66c0100f3 Mon Sep 17 00:00:00 2001
From: Peter Cock
Date: Wed, 5 Mar 2025 07:55:31 +0000
Subject: [PATCH 2/4] Update README.md wp-content guidance
Co-authored-by: Bastian Greshake Tzovaras
---
README.md | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 287bf746e..7a665ca99 100644
--- a/README.md
+++ b/README.md
@@ -62,7 +62,17 @@ hugo server &
At the moment (2025-03-05), historic images live in a large separate repo
https://github.com/OBF/wp-content/ which is included as a git submodule.
If you want to view images in the web pages on localhost:1313, you will need
-to have cloned that repo via the `git submodule update` command above.
+to also initialise this repository, which is currently setup using the
+`git submodule` workflow. **By default the `wp-content` submodule is not cloned**
+
+To load it you can run:
+
+* `cd OBF.github.io/`
+* `git submodule init`
+* `git submodule update`
+
+Getting the files can take a while (the `wp-content` repo is ~500 MB).
+
This may change.
From 04c2284369686ca6af1368fca5abd264bbb9345f Mon Sep 17 00:00:00 2001
From: Peter Cock
Date: Wed, 5 Mar 2025 09:48:26 +0000
Subject: [PATCH 3/4] Document adding new images
Co-authored-by: Bastian Greshake Tzovaras
---
README.md | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/README.md b/README.md
index 7a665ca99..2398cf604 100644
--- a/README.md
+++ b/README.md
@@ -75,6 +75,15 @@ Getting the files can take a while (the `wp-content` repo is ~500 MB).
This may change.
+#### Adding new images
+
+For new images, you can place these into the `static/img` folder of this repository (you can also make sub-folders there if useful).
+
+When compiling the website during the build, Hugo will move everything in `static/` into the website root, i.e. to `open-bio.org/`. This means that when linking images you do not have to include the `static/` as part of the media/image link.
+
+As an example: A file that resides in `static/img/test-image.jpg` should be linked in the markdown files like this: ``
+
+It is also good practice to name media files with the date you add them/the date of the page/post you want to add them to, i.e. `2025-03-04-blogpost-image.jpg`
#### Some other random tips
From afa44ffdbea7113e5ff38177125e2fdae927dd30 Mon Sep 17 00:00:00 2001
From: Peter Cock
Date: Wed, 5 Mar 2025 16:00:20 +0000
Subject: [PATCH 4/4] Notes on image naming and subfolders
---
README.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index 2398cf604..d67ca43d3 100644
--- a/README.md
+++ b/README.md
@@ -73,17 +73,17 @@ To load it you can run:
Getting the files can take a while (the `wp-content` repo is ~500 MB).
-
This may change.
+
#### Adding new images
-For new images, you can place these into the `static/img` folder of this repository (you can also make sub-folders there if useful).
+For new images, you can place these into the `static/img` folder of this repository, ideally in a subfolder based on the four digit year.
When compiling the website during the build, Hugo will move everything in `static/` into the website root, i.e. to `open-bio.org/`. This means that when linking images you do not have to include the `static/` as part of the media/image link.
As an example: A file that resides in `static/img/test-image.jpg` should be linked in the markdown files like this: ``
-It is also good practice to name media files with the date you add them/the date of the page/post you want to add them to, i.e. `2025-03-04-blogpost-image.jpg`
+It is also good practice to name media files with the date you add them/the date of the page/post you want to add them to, e.g. `static/img/2025/2025-03-04-blogpost-image.jpg` (using `yyyy-mm-dd` as the start of the filename).
#### Some other random tips