Skip to content

Commit 51cf160

Browse files
authored
Merge pull request #6 from ResearchSoftwareCulham/add-setup-guide
Add setup guide for serving locally
2 parents 7f5d3c3 + e74f11e commit 51cf160

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

Gemfile

+2
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,5 @@ end
2828
# Performance-booster for watching directories on Windows
2929
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
3030

31+
# webrick apparently required for later Ruby versions
32+
gem "webrick"

Gemfile.lock

+2
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ GEM
251251
unf_ext
252252
unf_ext (0.0.7.7)
253253
unicode-display_width (1.7.0)
254+
webrick (1.7.0)
254255
zeitwerk (2.4.2)
255256

256257
PLATFORMS
@@ -263,6 +264,7 @@ DEPENDENCIES
263264
tzinfo (~> 1.2)
264265
tzinfo-data
265266
wdm (~> 0.1.1)
267+
webrick
266268

267269
BUNDLED WITH
268270
2.2.14

README.md

+26
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,31 @@
44

55
A blog for Research Software at Culham.
66

7+
This site is hosted using [Github Pages](https://pages.github.com/) and is generated using the [Jekyll](https://jekyllrb.com/) static site generator. This means that a Markdown file (with some YAML front matter) on the `master` branch will be automatically published to [researchsoftwareculham.github.io](https://researchsoftwareculham.github.io/) as a blog post or page.
8+
9+
## Setup for serving the site locally
10+
To serve the site locally and preview your changes before committing, you will need to set up Jekyll. The full Gitlab documentation for setting this up can be found [here](https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll).
11+
12+
First, [install Ruby](https://www.ruby-lang.org/en/documentation/installation/). On Ubuntu, using `apt`, this is:
13+
```
14+
sudo apt install ruby-full
15+
```
16+
17+
Next, [install Bundler](https://bundler.io/), which manages Ruby gem dependencies:
18+
```
19+
gem install bundler
20+
```
21+
22+
Then navigate to the project root directory and install the required gems:
23+
```
24+
bundle install
25+
```
26+
27+
Then run `jekyll` using Bundler, generating and serving the Jekyll site locally:
28+
```
29+
bundle exec jekyll serve
30+
```
31+
32+
To preview the site in your web browser, navigate to `http://localhost:4000`.
733
[cc-by]: http://creativecommons.org/licenses/by/4.0/
834
[cc-by-shield]: https://img.shields.io/badge/License-CC%20BY%204.0-lightgrey.svg

0 commit comments

Comments
 (0)