Skip to content

Commit 61569d1

Browse files
authored
Merge pull request #9 from nlharris/nomi
add instructions for running hugo locally
2 parents 880a132 + 2d7100b commit 61569d1

File tree

1 file changed

+33
-6
lines changed

1 file changed

+33
-6
lines changed

README.md

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,41 @@
1-
# test conversion of the obf website
1+
# conversion of the obf website to GitHub pages
22

3-
Exploring the migration of the OBF WP site to a static site generator
3+
Migration of the OBF WP site to a static site generator (Hugo)
44

5-
6-
## Running locally
5+
## Running hugo server locally
76

87
1. [Install hugo](https://gohugo.io/installation/)
9-
2. Run `hugo server` from the root folder of the project to get a local server that automatically rebuilds
8+
2. Clone the GH repo:
9+
```
10+
git clone https://github.com/OBF/OBF.github.io
11+
```
12+
3. Initialize hugo
13+
```
14+
cd OBF.github.io
15+
git submodule init
16+
git submodule update
17+
```
18+
4. Run `hugo server` from the root folder of the project to get a
19+
local server that automatically rebuilds:
20+
```
21+
hugo server &
22+
```
23+
5. View the site in your web browser by going to [http://localhost:1313/](http://localhost:1313/)
24+
6. When you make changes, you should be able to reload http://localhost:1313/ to instantly see the changes!
25+
7. To push your changes back to the live site, remember to commit
26+
them. First you will need a
27+
[GitHub personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). Then do:
28+
```
29+
git checkout -b BRANCH_NAME
30+
git add FILES
31+
git commit -m "my changes"
32+
git push (or you might need to do git push --set-upstream origin BRANCH_NAME)
33+
```
34+
(Then go to https://github.com/OBF/OBF.github.io to make a PR)
35+
8. Once the PR is merged, your changes should be visible on [https://obf.github.io/](https://obf.github.io/)
36+
1037

11-
## Steps taken
38+
## Steps taken to port content from old WP site
1239

1340
1. Create XML export of existing WP site with all pages & posts
1441
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`

0 commit comments

Comments
 (0)