Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add website #50

Merged
merged 7 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,14 @@
setup.py
*.pyc
CMakeLists.txt.user
build
build

## GitHub Pages / Jekyll related
_site/
.sass-cache/
.jekyll-cache/
.jekyll-metadata
.bundle/
vendor/
Gemfile.lock

26 changes: 26 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -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]
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ARBITRATION GRAPHS
# Arbitration Graphs

[![License](https://img.shields.io/github/license/KIT-MRT/arbitration_graphs)](./LICENSE)

Expand All @@ -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.

<p align="center">
<img src="docs/pacman_scenario.png" width="400" />
<img src="docs/assets/img/pacman_scenario.png" width="400" />
orzechow marked this conversation as resolved.
Show resolved Hide resolved
</p>
<p align="center">
<img src="docs/pacman_arbitrator_safe.svg" width="500" />
<img src="docs/assets/img/pacman_arbitrator_safe.svg" width="500" />
</p>

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).
Expand Down
53 changes: 53 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +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.
Comment on lines +1 to +8
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image


remote_theme: pages-themes/[email protected]
plugins:
- 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
1 change: 1 addition & 0 deletions docs/_includes/head-custom.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<link rel="stylesheet" href="{{ '/docs/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
36 changes: 36 additions & 0 deletions docs/assets/_sass/fonts.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
@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;
}

.page-header {
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: 'Rubik';
}
}
.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;
}
}
65 changes: 65 additions & 0 deletions docs/assets/_sass/rouge-monokai.scss
Original file line number Diff line number Diff line change
@@ -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 */
23 changes: 23 additions & 0 deletions docs/assets/_sass/variables.scss
Original file line number Diff line number Diff line change
@@ -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;
12 changes: 12 additions & 0 deletions docs/assets/css/style.scss
Original file line number Diff line number Diff line change
@@ -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';
File renamed without changes
28 changes: 28 additions & 0 deletions docs/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
14 changes: 14 additions & 0 deletions docs/docker/Readme.md
Original file line number Diff line number Diff line change
@@ -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`
13 changes: 13 additions & 0 deletions docs/docker/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -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