Skip to content

Commit

Permalink
Testing various layouts and customization schemes. Changed Setup to D…
Browse files Browse the repository at this point in the history
…ocker system for easier and standardized developments
  • Loading branch information
choafe committed Jun 9, 2024
1 parent 9f44550 commit 5d91d8b
Show file tree
Hide file tree
Showing 27 changed files with 234 additions and 36 deletions.
25 changes: 25 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/debian
{
"name": "Debian",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/base:bullseye",
"features": {
"ghcr.io/devcontainers/features/ruby:1": {}
},
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [
// Jekyll server
4000,
// Live reload server
35729
],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "sh .devcontainer/install-dependencies.sh"
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
18 changes: 18 additions & 0 deletions .devcontainer/install-dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh

# Install the version of Bundler.
if [ -f Gemfile.lock ] && grep "BUNDLED WITH" Gemfile.lock > /dev/null; then
cat Gemfile.lock | tail -n 2 | grep -C2 "BUNDLED WITH" | tail -n 1 | xargs gem install bundler -v
fi

# Enter directory where website/ Gemfile is stored
cd docs

# If there's a Gemfile, then run `bundle install`
# It's assumed that the Gemfile will install Jekyll too
if [ -f Gemfile ]; then
bundle install
fi

# Return (not necessary)
cd ..
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for more information:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
# https://containers.dev/guide/dependabot

version: 2
updates:
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: weekly
2 changes: 1 addition & 1 deletion .github/workflows/jekyll-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
push:
branches:
- "main"
# - "newbie-guide" # Commented out, used for initial commits
- "newbie-guide" # Commented out, used for initial commits
paths: # UNCOMMENT once website is running (only changes to docs should trigger workflow)
- "docs/**"

Expand Down
2 changes: 1 addition & 1 deletion docs/_assets/css/just-the-docs-custom-dark.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
---
{ % include css/just-the-docs.scss.liquid color_scheme="custom-dark" % }
{% include css/just-the-docs.scss.liquid color_scheme="custom-dark" %}
2 changes: 1 addition & 1 deletion docs/_assets/css/just-the-docs-custom-light.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
---
{ % include css/just-the-docs.scss.liquid color_scheme="custom-light" % }
{% include css/just-the-docs.scss.liquid color_scheme="custom-light" %}
8 changes: 8 additions & 0 deletions docs/_assets/css/just-the-docs-default.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
---
{% if site.color_scheme and site.color_scheme != "nil" %}
{% assign color_scheme = site.color_scheme %}
{% else %}
{% assign color_scheme = "light" %}
{% endif %}
{% include css/just-the-docs.scss.liquid color_scheme=color_scheme %}
9 changes: 5 additions & 4 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,25 +60,26 @@ collections:
guide-general:
permalink: "/:path"
output: true
sort: nav-order
sort: nav_order
guide-primaries:
permalink: "/:path"
output: true
sort_by: order
guide-supplementals:
permalink: "/:path"
output: true
sort_by: order

# Define which collections are used in just-the-docs
just_the_docs:
collections:
guide-general:
name: ""
name: "Home"
nav_fold: false
guide-primaries:
name: Newbie Guide
nav_fold: true
guide-supplementals:
name: Resources
nav_fold: true

# Define default color scheme
color_scheme: custom-light
52 changes: 52 additions & 0 deletions docs/_layouts/default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
layout: table_wrappers
---

<!DOCTYPE html>

<html lang="{{ site.lang | default: 'en-US' }}">
{% include head.html %}

<body>
<a class="skip-to-main" href="#main-content">Skip to main content</a>
{% include icons/icons.html %}
{% if page.nav_enabled == true %}
{% include components/sidebar.html %}
{% elsif layout.nav_enabled == true and page.nav_enabled == nil %}
{% include components/sidebar.html %}
{% elsif site.nav_enabled != false and layout.nav_enabled == nil and page.nav_enabled == nil %}
{% include components/sidebar.html %}
{% endif %}
<div class="main" id="top">
{% include components/header.html %}
<div class="main-content-wrap">
{% include components/breadcrumbs.html %}
<div id="main-content" class="main-content">
<main>
{% if site.heading_anchors != false %}
{% include vendor/anchor_headings.html html=content beforeHeading="true" anchorBody="<svg
viewBox=\"0 0 16 16\" aria-hidden=\"true\">
<use xlink:href=\"#svg-link\"></use>
</svg>" anchorClass="anchor-heading" anchorAttrs="aria-labelledby=\"%html_id%\"" %}
{% else %}
{{ content }}
{% endif %}

{% if page.has_children == true and page.has_toc != false %}
{% include components/children_nav.html %}
{% endif %}
</main>
{% include components/footer.html %}
</div>
</div>
{% if site.search_enabled != false %}
{% include components/search_footer.html %}
{% endif %}
</div>

{% if site.mermaid %}
{% include components/mermaid.html %}
{% endif %}
</body>

</html>
5 changes: 5 additions & 0 deletions docs/_layouts/home.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
layout: default
---

{{ content }}
6 changes: 6 additions & 0 deletions docs/_layouts/minimal.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
layout: default
nav_enabled: false
---

{{ content }}
5 changes: 5 additions & 0 deletions docs/_layouts/page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
layout: default
---

{{ content }}
6 changes: 6 additions & 0 deletions docs/_layouts/table_wrappers.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
layout: vendor/compress
---

{% assign content_ = content | replace: '<table', '<div class="table-wrapper"><table' %} {% assign content_=content_ |
replace: '</table>' , '</table></div>' %} {{ content_ }}
21 changes: 17 additions & 4 deletions docs/_sass/color_schemes/custom-dark.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
---
---

@import "{{ site.theme }}";

@import "./color_schemes/dark";

$color-scheme: custom-dark;
// $body-background-color: $grey-dk-300;
// $body-heading-color: $grey-lt-000;
$body-text-color: $grey-lt-300;
$link-color: $blue-000;
$nav-child-link-color: $grey-dk-000;
$sidebar-color: $grey-dk-300;
$base-button-color: $grey-dk-250;
$btn-primary-color: $blue-200;
$code-background-color: #31343f; // OneDarkJekyll default for syntax-one-dark-vivid
$code-linenumber-color: #dee2f7; // OneDarkJekyll .nf for syntax-one-dark-vivid
$feedback-color: darken($sidebar-color, 3%);
$table-background-color: $grey-dk-250;
$search-background-color: $grey-dk-250;
$search-result-preview-color: $grey-dk-000;
// $border-color: $grey-dk-200;
18 changes: 15 additions & 3 deletions docs/_sass/color_schemes/custom-light.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
---
---

@import "{{ site.theme }}";
@import "./color_schemes/light";

$color-scheme: custom-light;
$body-background-color: $white;
$body-heading-color: $grey-dk-300;
$body-text-color: $grey-dk-100;
$link-color: $blue-000;
$nav-child-link-color: $grey-dk-100;
$sidebar-color: $grey-lt-000;
$base-button-color: #34d1bf;
$btn-primary-color: $blue-100;
$code-background-color: $grey-lt-000;
$feedback-color: darken($sidebar-color, 3%);
$table-background-color: $white;
$search-background-color: $white;
$search-result-preview-color: $grey-dk-000;

19 changes: 19 additions & 0 deletions docs/_sass/color_schemes/dark.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

@import "./vendor/OneDarkJekyll/syntax"; // This is the one-dark-vivid atom syntax theme

$color-scheme: dark;
$body-background-color: $grey-dk-300;
$body-heading-color: $grey-lt-000;
$body-text-color: $grey-lt-300;
$link-color: $blue-000;
$nav-child-link-color: $grey-dk-000;
$sidebar-color: $grey-dk-300;
$base-button-color: $grey-dk-250;
$btn-primary-color: $blue-200;
$code-background-color: #31343f; // OneDarkJekyll default for syntax-one-dark-vivid
$code-linenumber-color: #dee2f7; // OneDarkJekyll .nf for syntax-one-dark-vivid
$feedback-color: darken($sidebar-color, 3%);
$table-background-color: $grey-dk-250;
$search-background-color: $grey-dk-250;
$search-result-preview-color: $grey-dk-000;
$border-color: $grey-dk-200;
17 changes: 17 additions & 0 deletions docs/_sass/color_schemes/light.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

@import "./vendor/OneLightJekyll/syntax";

$color-scheme: light !default;
$body-background-color: $white !default;
$body-heading-color: $grey-dk-300 !default;
$body-text-color: $grey-dk-100 !default;
$link-color: $purple-000 !default;
$nav-child-link-color: $grey-dk-100 !default;
$sidebar-color: $grey-lt-000 !default;
$base-button-color: #f7f7f7 !default;
$btn-primary-color: $purple-100 !default;
$code-background-color: $grey-lt-000 !default;
$feedback-color: darken($sidebar-color, 3%) !default;
$table-background-color: $white !default;
$search-background-color: $white !default;
$search-result-preview-color: $grey-dk-000 !default;
4 changes: 4 additions & 0 deletions docs/_sass/custom/custom.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// For styles that aren’t defined as SCSS variables, you may want to modify specific CSS classes
// Additionally, you may want to add completely custom CSS specific to your content
// To do this, put your styles in the file _sass/custom/custom.scss
// This will allow for all overrides to be kept in a single file, and for any upstream changes to still be applied
3 changes: 3 additions & 0 deletions docs/_sass/custom/setup.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// To define new SCSS variables or functions, place SCSS code in _sass/custom/setup.scss

// New color scheme variables
8 changes: 0 additions & 8 deletions docs/_sections/_guide-general/competition.md

This file was deleted.

6 changes: 3 additions & 3 deletions docs/_sections/_guide-general/forms.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
layout: page
layout: default
title: Forms
nav-include: true
nav-order: 3
nav_include: true
nav_order: 4
---

TBD
4 changes: 2 additions & 2 deletions docs/_sections/_guide-general/rulebook.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
layout: page
title: Rulebook
nav-include: true
nav-order: 4
nav_include: true
nav_order: 3
---

TBD
8 changes: 4 additions & 4 deletions docs/_sections/_guide-general/schedule.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
layout: page
title: Checkpoint & Workshop Schedule
nav-include: true
nav-order: 2
layout: default
title: Competition Schedule
nav_include: true
nav_order: 2
---

TBD
6 changes: 3 additions & 3 deletions docs/_sections/_guide-general/welcome.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
layout: page
layout: default
title: Welcome
nav-include: true
nav-order: 5
nav_include: true
nav_order: 1
---

TBD
2 changes: 1 addition & 1 deletion docs/_sections/_guide-primaries/guide-manual.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
layout: page
layout: default
title:
---
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
layout: page
layout: default
title: Newbie Guide
---

0 comments on commit 5d91d8b

Please sign in to comment.