From 63a95d2396d6264b2ac59b34256bca1978792170 Mon Sep 17 00:00:00 2001 From: Piotr Spieker Date: Mon, 7 Oct 2024 17:36:06 +0200 Subject: [PATCH] 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