From f4aadc1406a4daa622b3a7e147d9f8480c7a67b0 Mon Sep 17 00:00:00 2001 From: Spencer Bliven Date: Mon, 8 Jan 2024 13:20:08 +0100 Subject: [PATCH 1/4] Correct README extension --- README.txt => README.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename README.txt => README.md (100%) diff --git a/README.txt b/README.md similarity index 100% rename from README.txt rename to README.md From 8d4f40ca7bdb85ecbaf7c9fef3d027390c8564a6 Mon Sep 17 00:00:00 2001 From: Spencer Bliven Date: Mon, 8 Jan 2024 14:39:00 +0100 Subject: [PATCH 2/4] Cleanup, docker-compose, and `page` layout - Use `relative_url` for URLs in layouts. This makes them work on all pages. - Add `page` layout suitable for pages other than the home - Rename `.markdown` suffix to `.md` - Add docker-compose.yaml file for building jekyll - Remove /about and /jekyll/update/2023/09/15/welcome-to-jekyll.html --- README.md | 37 ++++++++++++++++++-- _includes/header.html | 2 +- _includes/nav.html | 14 ++++---- _layouts/page.html | 24 +++++++++++++ _posts/.gitkeep | 0 _posts/2023-09-15-welcome-to-jekyll.markdown | 29 --------------- about.markdown | 18 ---------- docker-compose.yaml | 9 +++++ index.markdown => index.md | 0 9 files changed, 76 insertions(+), 57 deletions(-) create mode 100644 _layouts/page.html create mode 100644 _posts/.gitkeep delete mode 100644 _posts/2023-09-15-welcome-to-jekyll.markdown delete mode 100644 about.markdown create mode 100644 docker-compose.yaml rename index.markdown => index.md (100%) diff --git a/README.md b/README.md index 60891da..dba744a 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,41 @@ # SciCat Project website -This repository contains all the files that are needed to generate the SciCat website that is hosted on gitHub Pages +This repository contains all the files that are needed to generate the SciCat homepage. +It is that is hosted using github pages at https://scicatproject.github.io/. Source +code can be cloned from [github](https://github.com/SciCatProject/scicatproject.github.io). -### Resources +In addition to the homepage, the technical documentation served under `/documentation` +and hosted in the [SciCatProject/documentation](https://github.com/SciCatProject/documentation) +repository. + +# Building + +The site is generated using [jekyll](https://jekyllrb.com/). It is typically built by +github directly, but can also be run locally for testing. + +## Running locally with ruby + +If you have ruby installed you can run jekyll locally: + +```bash +gem install bundler jekyll + bundle exec jekyll serve +``` + +## Running with docker + +You may prefer to build using a docker container to avoid installing all the dependencies. +This can be done by simply running the following from the project directory: + +```bash +docker-compose up +``` + +This will serve the site at http://localhost:4000. Most changes live-update, with the +exception of changes to `_config.yml`. + + +# Resources - https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/creating-a-github-pages-site-with-jekyll - https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/testing-your-github-pages-site-locally-with-jekyll - https://medium.com/codex/how-to-add-bootstrap-5-to-jekyll-in-two-easy-ways-4d9dd3c8c895 diff --git a/_includes/header.html b/_includes/header.html index f83156f..ecc45c9 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -3,7 +3,7 @@
- +

{{ site.slogan }}

diff --git a/_includes/nav.html b/_includes/nav.html index 36a551d..9cbb984 100644 --- a/_includes/nav.html +++ b/_includes/nav.html @@ -11,7 +11,7 @@ diff --git a/_layouts/page.html b/_layouts/page.html new file mode 100644 index 0000000..3740e9c --- /dev/null +++ b/_layouts/page.html @@ -0,0 +1,24 @@ + + + + + {{ site.title }} + + + + + + + + {% include nav.html %} +
+
+

{{ page.title }}

+{{ content }} +
+
+ {% include breaker.html %} + {% include footer.html %} + + + diff --git a/_posts/.gitkeep b/_posts/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/_posts/2023-09-15-welcome-to-jekyll.markdown b/_posts/2023-09-15-welcome-to-jekyll.markdown deleted file mode 100644 index 5acff92..0000000 --- a/_posts/2023-09-15-welcome-to-jekyll.markdown +++ /dev/null @@ -1,29 +0,0 @@ ---- -layout: post -title: "Welcome to Jekyll!" -date: 2023-09-15 14:52:26 +0200 -categories: jekyll update ---- -You’ll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated. - -Jekyll requires blog post files to be named according to the following format: - -`YEAR-MONTH-DAY-title.MARKUP` - -Where `YEAR` is a four-digit number, `MONTH` and `DAY` are both two-digit numbers, and `MARKUP` is the file extension representing the format used in the file. After that, include the necessary front matter. Take a look at the source for this post to get an idea about how it works. - -Jekyll also offers powerful support for code snippets: - -{% highlight ruby %} -def print_hi(name) - puts "Hi, #{name}" -end -print_hi('Tom') -#=> prints 'Hi, Tom' to STDOUT. -{% endhighlight %} - -Check out the [Jekyll docs][jekyll-docs] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll’s GitHub repo][jekyll-gh]. If you have questions, you can ask them on [Jekyll Talk][jekyll-talk]. - -[jekyll-docs]: https://jekyllrb.com/docs/home -[jekyll-gh]: https://github.com/jekyll/jekyll -[jekyll-talk]: https://talk.jekyllrb.com/ diff --git a/about.markdown b/about.markdown deleted file mode 100644 index 8b4e0b2..0000000 --- a/about.markdown +++ /dev/null @@ -1,18 +0,0 @@ ---- -layout: page -title: About -permalink: /about/ ---- - -This is the base Jekyll theme. You can find out more info about customizing your Jekyll theme, as well as basic Jekyll usage documentation at [jekyllrb.com](https://jekyllrb.com/) - -You can find the source code for Minima at GitHub: -[jekyll][jekyll-organization] / -[minima](https://github.com/jekyll/minima) - -You can find the source code for Jekyll at GitHub: -[jekyll][jekyll-organization] / -[jekyll](https://github.com/jekyll/jekyll) - - -[jekyll-organization]: https://github.com/jekyll diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..c5752b0 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,9 @@ +version: '3' +services: + serve: + image: jekyll/jekyll:latest + command: jekyll serve --watch --force_polling --verbose + ports: + - 4000:4000 + volumes: + - .:/srv/jekyll \ No newline at end of file diff --git a/index.markdown b/index.md similarity index 100% rename from index.markdown rename to index.md From 92d3212eaa890d1299798c7b52b601a6fc07397d Mon Sep 17 00:00:00 2001 From: Spencer Bliven Date: Mon, 8 Jan 2024 14:40:46 +0100 Subject: [PATCH 3/4] Add docs to navbar --- _includes/nav.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/_includes/nav.html b/_includes/nav.html index 9cbb984..a09b0e6 100644 --- a/_includes/nav.html +++ b/_includes/nav.html @@ -36,5 +36,8 @@ +
From 8cbbbb27efcb129a1b82f49927ff7d2d800cd7bc Mon Sep 17 00:00:00 2001 From: Max Novelli Date: Tue, 9 Jan 2024 12:39:40 +0100 Subject: [PATCH 4/4] Update _includes/nav.html Co-authored-by: Despina Adamopoulou <16343312+despadam@users.noreply.github.com> --- _includes/nav.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/nav.html b/_includes/nav.html index a09b0e6..c7982fd 100644 --- a/_includes/nav.html +++ b/_includes/nav.html @@ -37,7 +37,7 @@ Resources