From 2c27240f74bd4e38de7a6509f77891eb3dd766c3 Mon Sep 17 00:00:00 2001 From: Piotr Spieker Date: Mon, 23 Sep 2024 21:38:17 +0200 Subject: [PATCH 1/7] Use Cayman theme --- _config.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 _config.yml diff --git a/_config.yml b/_config.yml new file mode 100644 index 00000000..876981a4 --- /dev/null +++ b/_config.yml @@ -0,0 +1,3 @@ +remote_theme: pages-themes/cayman@v0.2.0 +plugins: +- jekyll-remote-theme \ No newline at end of file From 7e0ec68148703c26449c2751c7d8f1148ddac1b8 Mon Sep 17 00:00:00 2001 From: Piotr Spieker Date: Mon, 7 Oct 2024 13:39:06 +0200 Subject: [PATCH 2/7] Setup Docker image for local GitHub Pages testing --- .gitignore | 12 +++++++++++- Gemfile | 26 ++++++++++++++++++++++++++ docs/docker/Dockerfile | 28 ++++++++++++++++++++++++++++ docs/docker/docker-compose.yaml | 13 +++++++++++++ 4 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 Gemfile create mode 100644 docs/docker/Dockerfile create mode 100644 docs/docker/docker-compose.yaml diff --git a/.gitignore b/.gitignore index a8193724..f9a3e6dd 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,14 @@ setup.py *.pyc CMakeLists.txt.user -build \ No newline at end of file +build + +## GitHub Pages / Jekyll related +_site/ +.sass-cache/ +.jekyll-cache/ +.jekyll-metadata +.bundle/ +vendor/ +Gemfile.lock + diff --git a/Gemfile b/Gemfile new file mode 100644 index 00000000..90fb16f9 --- /dev/null +++ b/Gemfile @@ -0,0 +1,26 @@ +# This file is necessary for local testing of the GitHub Page +# It has been created by following the GitHub Pages docs: +# https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/creating-a-github-pages-site-with-jekyll + +source "https://rubygems.org" + +# We use GitHub Pages. To upgrade, run `bundle update github-pages`. +gem "github-pages", "~> 232", group: :jekyll_plugins +# If you have any plugins, put them here! +group :jekyll_plugins do + gem "jekyll-feed", "~> 0.12" +end + +# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem +# and associated library. +platforms :mingw, :x64_mingw, :mswin, :jruby do + gem "tzinfo", ">= 1", "< 3" + gem "tzinfo-data" +end + +# Performance-booster for watching directories on Windows +gem "wdm", "~> 0.1", :platforms => [:mingw, :x64_mingw, :mswin] + +# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem +# do not have a Java counterpart. +gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby] diff --git a/docs/docker/Dockerfile b/docs/docker/Dockerfile new file mode 100644 index 00000000..a127f264 --- /dev/null +++ b/docs/docker/Dockerfile @@ -0,0 +1,28 @@ +# This file is based on +# https://github.com/BretFisher/jekyll-serve/blob/main/Dockerfile + +# Start from a light-weight ruby image +# Version as used by GitHub Pages, see https://pages.github.com/versions +FROM ruby:3.3.4-alpine + +# Install gcc, make and git +RUN apk add build-base git + +# Install jekyll +RUN gem install jekyll bundler + +# Make directory for site +WORKDIR /site + +# The Jekyll server runs on port 4000 by default +EXPOSE 4000 + +# Install the required gems for the site +COPY Gemfile /site/ +RUN bundle install + +# Override the GitHub Pages repo name +ENV PAGES_REPO_NWO="KIT-MRT/arbitration_graphs" + +# Run jekyll-serve for dynamic development +CMD [ "bundle", "exec", "jekyll", "serve", "--livereload", "--force_polling", "-H", "0.0.0.0", "-P", "4000"] \ No newline at end of file diff --git a/docs/docker/docker-compose.yaml b/docs/docker/docker-compose.yaml new file mode 100644 index 00000000..69e45fa5 --- /dev/null +++ b/docs/docker/docker-compose.yaml @@ -0,0 +1,13 @@ +# This file is based on +# https://github.com/VSteinborn/Docker-Jekyll/blob/main/compose.yaml + +name: github-pages-dev +services: + github-pages-dev: + build: + context: ../.. + dockerfile: docs/docker/Dockerfile + ports: + - 4000:4000 + volumes: + - ../..:/site \ No newline at end of file From 63a95d2396d6264b2ac59b34256bca1978792170 Mon Sep 17 00:00:00 2001 From: Piotr Spieker Date: Mon, 7 Oct 2024 17:36:06 +0200 Subject: [PATCH 3/7] Customize the Cayman theme to our liking --- _config.yml | 52 +++++++++++++++++++++- docs/_includes/head-custom.html | 1 + docs/assets/_sass/fonts.scss | 26 +++++++++++ docs/assets/_sass/rouge-monokai.scss | 65 ++++++++++++++++++++++++++++ docs/assets/_sass/variables.scss | 23 ++++++++++ docs/assets/css/style.scss | 12 +++++ 6 files changed, 178 insertions(+), 1 deletion(-) create mode 100644 docs/_includes/head-custom.html create mode 100644 docs/assets/_sass/fonts.scss create mode 100644 docs/assets/_sass/rouge-monokai.scss create mode 100644 docs/assets/_sass/variables.scss create mode 100644 docs/assets/css/style.scss diff --git a/_config.yml b/_config.yml index 876981a4..58fc9335 100644 --- a/_config.yml +++ b/_config.yml @@ -1,3 +1,53 @@ +# This is a config file for Jekyll, the static site generator used by GitHub Pages. +# +# In our setup, the top-level README.md is the landing page, +# while the rest of the pages and all assets are in the docs folder. +# +# This way, we can use the main branchs' README.md as main website, +# add subpages for the tutorial and deep dive docs, +# while avoiding Jekyll clutter in the repo root. + remote_theme: pages-themes/cayman@v0.2.0 plugins: -- jekyll-remote-theme \ No newline at end of file +- jekyll-remote-theme + +includes_dir: docs/_includes +sass: + sass_dir: docs/assets/_sass + + +# Tell Jekyll to use README.md and docs/ only. +# +# For some reason exluding root and then including only these does not work, +# see https://github.com/jekyll/jekyll/issues/9116 +# So, we have to take the explicit detour… + +exclude: + # Jekyll default excludes + - .sass-cache/ + - .jekyll-cache/ + - gemfiles/ + - Gemfile + - Gemfile.lock + - node_modules/ + - vendor/bundle/ + - vendor/cache/ + - vendor/gems/ + - vendor/ruby/ + + # Custom C++ excludes + - build + - cmake + - CMakeLists.txt + - demo + - include + - src + - test + + # Docker files + - /**/*ocker* + - /*ocker* + + # Others + - CODEOWNERS + - LICENSE diff --git a/docs/_includes/head-custom.html b/docs/_includes/head-custom.html new file mode 100644 index 00000000..79e110a5 --- /dev/null +++ b/docs/_includes/head-custom.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/assets/_sass/fonts.scss b/docs/assets/_sass/fonts.scss new file mode 100644 index 00000000..42f3e901 --- /dev/null +++ b/docs/assets/_sass/fonts.scss @@ -0,0 +1,26 @@ +@import url('https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&family=Source+Code+Pro:ital,wght@0,200..900;1,200..900&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap'); + + +body { + font-family: "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif; +} + +.main-content { + h1, + h2, + h3, + h4, + h5, + h6 { + font-weight: 600; + font-family: 'Rubik'; + } + + code { + font-family: "Source Code Pro", Consolas, "Liberation Mono", Menlo, Courier, monospace; + } + + pre { + font-family: "Source Code Pro", Consolas, "Liberation Mono", Menlo, Courier, monospace; + } +} diff --git a/docs/assets/_sass/rouge-monokai.scss b/docs/assets/_sass/rouge-monokai.scss new file mode 100644 index 00000000..e020d51f --- /dev/null +++ b/docs/assets/_sass/rouge-monokai.scss @@ -0,0 +1,65 @@ +.highlight pre { background-color: #272822; } +.highlight .hll { background-color: #272822; } +.highlight .c { color: #75715e } /* Comment */ +.highlight .err { color: #960050; background-color: #1e0010 } /* Error */ +.highlight .k { color: #66d9ef } /* Keyword */ +.highlight .l { color: #ae81ff } /* Literal */ +.highlight .n { color: #f8f8f2 } /* Name */ +.highlight .o { color: #f92672 } /* Operator */ +.highlight .p { color: #f8f8f2 } /* Punctuation */ +.highlight .cm { color: #75715e } /* Comment.Multiline */ +.highlight .cp { color: #75715e } /* Comment.Preproc */ +.highlight .c1 { color: #75715e } /* Comment.Single */ +.highlight .cs { color: #75715e } /* Comment.Special */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .kc { color: #66d9ef } /* Keyword.Constant */ +.highlight .kd { color: #66d9ef } /* Keyword.Declaration */ +.highlight .kn { color: #f92672 } /* Keyword.Namespace */ +.highlight .kp { color: #66d9ef } /* Keyword.Pseudo */ +.highlight .kr { color: #66d9ef } /* Keyword.Reserved */ +.highlight .kt { color: #66d9ef } /* Keyword.Type */ +.highlight .ld { color: #e6db74 } /* Literal.Date */ +.highlight .m { color: #ae81ff } /* Literal.Number */ +.highlight .s { color: #e6db74 } /* Literal.String */ +.highlight .na { color: #a6e22e } /* Name.Attribute */ +.highlight .nb { color: #f8f8f2 } /* Name.Builtin */ +.highlight .nc { color: #a6e22e } /* Name.Class */ +.highlight .no { color: #66d9ef } /* Name.Constant */ +.highlight .nd { color: #a6e22e } /* Name.Decorator */ +.highlight .ni { color: #f8f8f2 } /* Name.Entity */ +.highlight .ne { color: #a6e22e } /* Name.Exception */ +.highlight .nf { color: #a6e22e } /* Name.Function */ +.highlight .nl { color: #f8f8f2 } /* Name.Label */ +.highlight .nn { color: #f8f8f2 } /* Name.Namespace */ +.highlight .nx { color: #a6e22e } /* Name.Other */ +.highlight .py { color: #f8f8f2 } /* Name.Property */ +.highlight .nt { color: #f92672 } /* Name.Tag */ +.highlight .nv { color: #f8f8f2 } /* Name.Variable */ +.highlight .ow { color: #f92672 } /* Operator.Word */ +.highlight .w { color: #f8f8f2 } /* Text.Whitespace */ +.highlight .mf { color: #ae81ff } /* Literal.Number.Float */ +.highlight .mh { color: #ae81ff } /* Literal.Number.Hex */ +.highlight .mi { color: #ae81ff } /* Literal.Number.Integer */ +.highlight .mo { color: #ae81ff } /* Literal.Number.Oct */ +.highlight .sb { color: #e6db74 } /* Literal.String.Backtick */ +.highlight .sc { color: #e6db74 } /* Literal.String.Char */ +.highlight .sd { color: #e6db74 } /* Literal.String.Doc */ +.highlight .s2 { color: #e6db74 } /* Literal.String.Double */ +.highlight .se { color: #ae81ff } /* Literal.String.Escape */ +.highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */ +.highlight .si { color: #e6db74 } /* Literal.String.Interpol */ +.highlight .sx { color: #e6db74 } /* Literal.String.Other */ +.highlight .sr { color: #e6db74 } /* Literal.String.Regex */ +.highlight .s1 { color: #e6db74 } /* Literal.String.Single */ +.highlight .ss { color: #e6db74 } /* Literal.String.Symbol */ +.highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */ +.highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */ +.highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */ +.highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */ +.highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */ + +.highlight .gh { } /* Generic Heading & Diff Header */ +.highlight .gu { color: #75715e; } /* Generic.Subheading & Diff Unified/Comment? */ +.highlight .gd { color: #f92672; } /* Generic.Deleted & Diff Deleted */ +.highlight .gi { color: #a6e22e; } /* Generic.Inserted & Diff Inserted */ diff --git a/docs/assets/_sass/variables.scss b/docs/assets/_sass/variables.scss new file mode 100644 index 00000000..1f12ce6b --- /dev/null +++ b/docs/assets/_sass/variables.scss @@ -0,0 +1,23 @@ +// Breakpoints +$large-breakpoint: 64em !default; +$medium-breakpoint: 42em !default; + +// Headers +$header-heading-color: #fff !default; +$header-bg-color: #008383 !default; +$header-bg-color-secondary: #00001D !default; + +// Text +$section-headings-color: #257180 !default; +$body-text-color: #606c71 !default; +$body-link-color: #008383 !default; +$blockquote-text-color: #819198 !default; + +// Code +$code-bg-color: #272822 !default; +$code-text-color: #f8f8f2 !default; + +// Borders +$border-color: #dce6f0 !default; +$table-border-color: #e9ebec !default; +$hr-border-color: #eff0f1 !default; diff --git a/docs/assets/css/style.scss b/docs/assets/css/style.scss new file mode 100644 index 00000000..f49910dc --- /dev/null +++ b/docs/assets/css/style.scss @@ -0,0 +1,12 @@ +--- +--- + +// Set custom colors +@import 'variables'; + +// Use the Cayman theme +@import 'jekyll-theme-cayman'; + +// Change fonts and syntax highlighting +@import 'fonts'; +@import 'rouge-monokai'; \ No newline at end of file From d054312ab3be36f668ba26c11e5bd9de1128edbc Mon Sep 17 00:00:00 2001 From: Piotr Spieker Date: Mon, 7 Oct 2024 17:37:56 +0200 Subject: [PATCH 4/7] Move images to docs/assets/img --- README.md | 4 ++-- docs/{ => assets/img}/pacman_arbitrator_safe.svg | 0 docs/{ => assets/img}/pacman_scenario.png | Bin 3 files changed, 2 insertions(+), 2 deletions(-) rename docs/{ => assets/img}/pacman_arbitrator_safe.svg (100%) rename docs/{ => assets/img}/pacman_scenario.png (100%) diff --git a/README.md b/README.md index 4eea236b..889d76d8 100644 --- a/README.md +++ b/README.md @@ -9,10 +9,10 @@ Arbitration graphs combine simple atomic behavior components into more complex b We are currently working on a demonstration of this library using Pac-Man as an example application.

- +

- +

Feel free to take a look at the work in progress in the [pacman-demo branch](https://github.com/KIT-MRT/arbitration_graphs/tree/pacman-demo). diff --git a/docs/pacman_arbitrator_safe.svg b/docs/assets/img/pacman_arbitrator_safe.svg similarity index 100% rename from docs/pacman_arbitrator_safe.svg rename to docs/assets/img/pacman_arbitrator_safe.svg diff --git a/docs/pacman_scenario.png b/docs/assets/img/pacman_scenario.png similarity index 100% rename from docs/pacman_scenario.png rename to docs/assets/img/pacman_scenario.png From dcb48b9e48b8cf7cd73ea04cb28bc5a1e93745f6 Mon Sep 17 00:00:00 2001 From: Piotr Spieker Date: Mon, 7 Oct 2024 17:53:32 +0200 Subject: [PATCH 5/7] Add short documentation for GitHub Pages docker environment --- docs/docker/Readme.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 docs/docker/Readme.md diff --git a/docs/docker/Readme.md b/docs/docker/Readme.md new file mode 100644 index 00000000..83902f7e --- /dev/null +++ b/docs/docker/Readme.md @@ -0,0 +1,14 @@ +# GitHub Pages dev environment + +This setup allows debugging the website in a local Docker environment, before publishing online. + +1. Run the docker container: + + ```bash + docker compose up --build + ``` + +2. Open http://0.0.0.0:4000 in your browser +3. Enjoy + +The Jekyll server updates the page automatically on changes. You might have to restart the container when adding new pages though or changing the `_config.yml` \ No newline at end of file From ad495acd57449ac2c05671002f6b04e9bda7b637 Mon Sep 17 00:00:00 2001 From: Piotr Spieker Date: Fri, 11 Oct 2024 16:15:21 +0200 Subject: [PATCH 6/7] Use normal title case for the page title --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 889d76d8..4a51aa3d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ARBITRATION GRAPHS +# Arbitration Graphs [![License](https://img.shields.io/github/license/KIT-MRT/arbitration_graphs)](./LICENSE) From 80c9518907a24f793579be4d23cb57719b91d63e Mon Sep 17 00:00:00 2001 From: Piotr Spieker Date: Fri, 11 Oct 2024 16:16:18 +0200 Subject: [PATCH 7/7] Use Rubik font in page header as well --- docs/assets/_sass/fonts.scss | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/assets/_sass/fonts.scss b/docs/assets/_sass/fonts.scss index 42f3e901..57d04fb5 100644 --- a/docs/assets/_sass/fonts.scss +++ b/docs/assets/_sass/fonts.scss @@ -5,6 +5,16 @@ body { font-family: "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif; } +.page-header { + h1, + h2, + h3, + h4, + h5, + h6 { + font-family: 'Rubik'; + } +} .main-content { h1, h2,