Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 23 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,32 @@ 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 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.

Comment thread
peterjc marked this conversation as resolved.
#### Adding new images

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: `![an image](/img/test-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

- To set up a URL redirect, add an alias to the page you want to
Expand Down