You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-9Lines changed: 11 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,31 +62,33 @@ hugo server &
62
62
http://localhost:1313/ will reload seconds later so you can instantly see the changes!
63
63
64
64
65
-
#### Seeing images on localhost
65
+
#### Seeing historic images on localhost
66
66
67
-
At the moment (2025-03-05), historic images live in a large separate repo
68
-
https://github.com/OBF/wp-content/ which is included as a git submodule.
69
-
If you want to view images in the web pages on localhost:1313, you will need
67
+
Historic images from when the website was on WordPress live in a large separate
68
+
repo https://github.com/OBF/wp-content/ which is included as a git submodule.
69
+
If you want to view images in the web pages on `localhost:1313`, you will need
70
70
to also initialise this repository, which is currently setup using the
71
71
`git submodule` workflow. **By default the `wp-content` submodule is not cloned**
72
72
73
73
To load it you can run:
74
74
75
-
*`cd OBF.github.io/`
76
-
*`git submodule init`
77
-
*`git submodule update`
75
+
```
76
+
cd OBF.github.io/
77
+
git submodule init
78
+
git submodule update
79
+
```
78
80
79
81
Getting the files can take a while (the `wp-content` repo is ~500 MB).
80
82
81
83
This may change.
82
84
83
85
#### Adding new images
84
86
85
-
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.
87
+
For new images, you can place these into the `static/img/yyyy/` folder of this repository, where `yyyy` means the four digit year as a subfolder.
86
88
87
89
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.
88
90
89
-
As an example: A file that resides in `static/img/test-image.jpg` should be linked in the markdown files like this: ``
91
+
As an example: A file that resides in `static/img/2025/test-image.jpg` should be linked in the markdown files like this: ``
90
92
91
93
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).
0 commit comments