From c5a4535a6a0b252988ec2116d7fbc785fc0a053a Mon Sep 17 00:00:00 2001 From: Daniel Esteban Date: Tue, 31 Mar 2026 13:02:59 +0200 Subject: [PATCH] added missing files --- assets/css/hbx/blocks/shared/docs-custom.css | 45 +++++ content/docs/getting-started/installation.md | 10 ++ content/docs/getting-started/introduction.md | 10 ++ content/docs/getting-started/quick-start.md | 10 ++ content/docs/guides/_index.md | 7 + content/docs/guides/first-project.md | 10 ++ content/docs/hardware/3d-printing.md | 10 ++ content/docs/hardware/assembly-guide.md | 10 ++ content/docs/hardware/bill-of-materials.md | 10 ++ content/docs/hardware/electronics.md | 10 ++ content/docs/software/_index.md | 7 + content/docs/software/api-reference.md | 10 ++ content/docs/software/firmware.md | 10 ++ content/docs/software/mobile-app.md | 10 ++ content/docs/software/web-dashboard.md | 10 ++ deploy.sh | 98 +++++++++++ layouts/_partials/components/sidebar.html | 157 ++++++++++++++++++ layouts/_partials/docs_layout.html | 28 ++++ .../_partials/functions/render_callout.html | 138 +++++++++++++++ 19 files changed, 600 insertions(+) create mode 100644 assets/css/hbx/blocks/shared/docs-custom.css create mode 100644 content/docs/getting-started/installation.md create mode 100644 content/docs/getting-started/introduction.md create mode 100644 content/docs/getting-started/quick-start.md create mode 100644 content/docs/guides/_index.md create mode 100644 content/docs/guides/first-project.md create mode 100644 content/docs/hardware/3d-printing.md create mode 100644 content/docs/hardware/assembly-guide.md create mode 100644 content/docs/hardware/bill-of-materials.md create mode 100644 content/docs/hardware/electronics.md create mode 100644 content/docs/software/_index.md create mode 100644 content/docs/software/api-reference.md create mode 100644 content/docs/software/firmware.md create mode 100644 content/docs/software/mobile-app.md create mode 100644 content/docs/software/web-dashboard.md create mode 100755 deploy.sh create mode 100644 layouts/_partials/components/sidebar.html create mode 100644 layouts/_partials/docs_layout.html create mode 100644 layouts/_partials/functions/render_callout.html diff --git a/assets/css/hbx/blocks/shared/docs-custom.css b/assets/css/hbx/blocks/shared/docs-custom.css new file mode 100644 index 0000000..2d47259 --- /dev/null +++ b/assets/css/hbx/blocks/shared/docs-custom.css @@ -0,0 +1,45 @@ +/* ── Go Education Project — Docs custom styles ─────────────────────── */ + +/* Prose heading colors — dark navy matching brand secondary */ +.docs-content :is(h1, h2, h3, h4, h5, h6) { + color: #1B3A6B; +} + +/* Dark mode headings — lighter so they read on dark bg */ +.dark .docs-content :is(h1, h2, h3, h4, h5, h6) { + color: #a8d8f0; +} + +/* Prose links — use primary teal */ +.docs-content a { + color: var(--color-primary-600, #1DCAD4); + text-decoration-color: var(--color-primary-300, #99e8ed); +} +.docs-content a:hover { + color: var(--color-primary-500, #1DCAD4); +} + +/* Blockquote — brand left border */ +.docs-content blockquote { + border-left-color: var(--color-primary-400, #1DCAD4); + color: #4a6080; +} + +/* Inline code — subtle teal tint */ +.docs-content :not(pre) > code { + color: #1B3A6B; + background-color: #e8f6f7; +} +.dark .docs-content :not(pre) > code { + color: #a8d8f0; + background-color: #0d2340; +} + +/* Strong / bold — slightly darker navy */ +.docs-content strong { + color: #1B3A6B; + font-weight: 700; +} +.dark .docs-content strong { + color: #c8e8f8; +} diff --git a/content/docs/getting-started/installation.md b/content/docs/getting-started/installation.md new file mode 100644 index 0000000..77c389b --- /dev/null +++ b/content/docs/getting-started/installation.md @@ -0,0 +1,10 @@ +--- +title: Installation +weight: 2 +--- + +## Installing the Tools + +This guide covers installing the software you need to program your Go Education board. + +> 📖 Full content coming soon. diff --git a/content/docs/getting-started/introduction.md b/content/docs/getting-started/introduction.md new file mode 100644 index 0000000..39fc0d4 --- /dev/null +++ b/content/docs/getting-started/introduction.md @@ -0,0 +1,10 @@ +--- +title: Introduction +weight: 1 +--- + +## What is Go Education Project? + +Go Education Project is an open source & open hardware educational robotics platform designed for students, teachers, and makers worldwide. + +> 📖 Full content coming soon. diff --git a/content/docs/getting-started/quick-start.md b/content/docs/getting-started/quick-start.md new file mode 100644 index 0000000..94f08d9 --- /dev/null +++ b/content/docs/getting-started/quick-start.md @@ -0,0 +1,10 @@ +--- +title: Quick Start +weight: 3 +--- + +## Quick Start + +From zero to blinking LED in 5 minutes. + +> 📖 Full content coming soon. diff --git a/content/docs/guides/_index.md b/content/docs/guides/_index.md new file mode 100644 index 0000000..44b9767 --- /dev/null +++ b/content/docs/guides/_index.md @@ -0,0 +1,7 @@ +--- +title: Guides +weight: 40 +sidebar: + icon: "hero/book-open" +summary: "Step-by-step project guides from beginner to advanced." +--- diff --git a/content/docs/guides/first-project.md b/content/docs/guides/first-project.md new file mode 100644 index 0000000..60f3a20 --- /dev/null +++ b/content/docs/guides/first-project.md @@ -0,0 +1,10 @@ +--- +title: First Project +weight: 1 +--- + +## Your First Project + +Build a blinking LED circuit and write your first program — the classic "Hello World" of hardware. + +> 📖 Full content coming soon. diff --git a/content/docs/hardware/3d-printing.md b/content/docs/hardware/3d-printing.md new file mode 100644 index 0000000..d38b2cc --- /dev/null +++ b/content/docs/hardware/3d-printing.md @@ -0,0 +1,10 @@ +--- +title: 3D Printing +weight: 4 +--- + +## 3D Printing + +All chassis and structural parts are available as open source STL files. + +> 📖 Full content coming soon. diff --git a/content/docs/hardware/assembly-guide.md b/content/docs/hardware/assembly-guide.md new file mode 100644 index 0000000..ffc6fbf --- /dev/null +++ b/content/docs/hardware/assembly-guide.md @@ -0,0 +1,10 @@ +--- +title: Assembly Guide +weight: 2 +--- + +## Assembly Guide + +Step-by-step instructions for assembling your Go Education robot. + +> 📖 Full content coming soon. diff --git a/content/docs/hardware/bill-of-materials.md b/content/docs/hardware/bill-of-materials.md new file mode 100644 index 0000000..0fb646f --- /dev/null +++ b/content/docs/hardware/bill-of-materials.md @@ -0,0 +1,10 @@ +--- +title: Bill of Materials +weight: 1 +--- + +## Bill of Materials + +Complete list of components for the Go Education robot kit. + +> 📖 Full content coming soon. diff --git a/content/docs/hardware/electronics.md b/content/docs/hardware/electronics.md new file mode 100644 index 0000000..38fe63e --- /dev/null +++ b/content/docs/hardware/electronics.md @@ -0,0 +1,10 @@ +--- +title: Electronics +weight: 3 +--- + +## Electronics + +Understanding the electronic components in your Go Education kit. + +> 📖 Full content coming soon. diff --git a/content/docs/software/_index.md b/content/docs/software/_index.md new file mode 100644 index 0000000..e6c4a8c --- /dev/null +++ b/content/docs/software/_index.md @@ -0,0 +1,7 @@ +--- +title: Software +weight: 30 +sidebar: + icon: "hero/code-bracket" +summary: "Firmware, APIs, mobile app and web dashboard documentation." +--- diff --git a/content/docs/software/api-reference.md b/content/docs/software/api-reference.md new file mode 100644 index 0000000..8ace2b7 --- /dev/null +++ b/content/docs/software/api-reference.md @@ -0,0 +1,10 @@ +--- +title: API Reference +weight: 2 +--- + +## API Reference + +Complete reference for the Go Education software API. + +> 📖 Full content coming soon. diff --git a/content/docs/software/firmware.md b/content/docs/software/firmware.md new file mode 100644 index 0000000..ab3a4bf --- /dev/null +++ b/content/docs/software/firmware.md @@ -0,0 +1,10 @@ +--- +title: Firmware +weight: 1 +--- + +## Firmware + +The Go Education board firmware — architecture, building, and flashing. + +> 📖 Full content coming soon. diff --git a/content/docs/software/mobile-app.md b/content/docs/software/mobile-app.md new file mode 100644 index 0000000..324a4ad --- /dev/null +++ b/content/docs/software/mobile-app.md @@ -0,0 +1,10 @@ +--- +title: Mobile App +weight: 3 +--- + +## Mobile App + +Control and monitor your robot from the Go Education mobile app. + +> 📖 Full content coming soon. diff --git a/content/docs/software/web-dashboard.md b/content/docs/software/web-dashboard.md new file mode 100644 index 0000000..890a341 --- /dev/null +++ b/content/docs/software/web-dashboard.md @@ -0,0 +1,10 @@ +--- +title: Web Dashboard +weight: 4 +--- + +## Web Dashboard + +The Go Education web dashboard for classroom management and monitoring. + +> 📖 Full content coming soon. diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..b9e692d --- /dev/null +++ b/deploy.sh @@ -0,0 +1,98 @@ +#!/usr/bin/env bash +# ───────────────────────────────────────────────────────────────────────────── +# Go Education Project — Deploy to Cloudflare Pages +# Usage: ./deploy.sh [--dry-run] +# ───────────────────────────────────────────────────────────────────────────── +set -euo pipefail + +SITE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +CF_PROJECT="goeducation-site" +CF_BRANCH="main" +DRY_RUN=false + +# ── Parse args ─────────────────────────────────────────────────────────────── +for arg in "$@"; do + case $arg in + --dry-run) DRY_RUN=true ;; + *) echo "Unknown argument: $arg"; exit 1 ;; + esac +done + +# ── Colors ─────────────────────────────────────────────────────────────────── +RED='\033[0;31m'; GREEN='\033[0;32m'; YELLOW='\033[1;33m' +CYAN='\033[0;36m'; BOLD='\033[1m'; RESET='\033[0m' + +info() { echo -e "${CYAN}▶ $*${RESET}"; } +success() { echo -e "${GREEN}✔ $*${RESET}"; } +warn() { echo -e "${YELLOW}⚠ $*${RESET}"; } +error() { echo -e "${RED}✖ $*${RESET}"; exit 1; } +step() { echo -e "\n${BOLD}── $* ──────────────────────────────────────${RESET}"; } + +# ── Checks ─────────────────────────────────────────────────────────────────── +step "Pre-flight checks" + +cd "$SITE_DIR" + +# Node via nvm +if command -v nvm &>/dev/null || [ -s "$HOME/.nvm/nvm.sh" ]; then + source "$HOME/.nvm/nvm.sh" + nvm use 20 --silent + success "Node $(node --version)" +else + error "nvm not found. Install it or ensure Node 20 is in PATH." +fi + +# Local node_modules/.bin takes priority — wrangler, pagefind, tailwindcss come from here +export PATH="$SITE_DIR/node_modules/.bin:$PATH" + +# Install deps first if node_modules is missing (needed for tool checks below) +if [ ! -d "$SITE_DIR/node_modules" ]; then + info "node_modules not found — running npm ci..." + npm ci +fi + +# Check required tools +command -v hugo &>/dev/null || error "hugo not found." +command -v wrangler &>/dev/null || error "wrangler not found. Run: npm install" +command -v pagefind &>/dev/null || error "pagefind not found. Run: npm install" +command -v tailwindcss &>/dev/null || error "tailwindcss not found. Run: npm install" + +info "Hugo: $(hugo version | head -1 | cut -d' ' -f2)" +info "Wrangler: $(wrangler --version 2>&1 | head -1)" +info "Pagefind: $(pagefind --version 2>&1 | head -1)" + +$DRY_RUN && warn "DRY RUN — build will run but upload will be skipped." + +# ── npm deps (already handled above if missing) ─────────────────────────────── +step "npm dependencies" +success "node_modules present (wrangler $(wrangler --version 2>&1 | head -1))" + +# ── Hugo build ──────────────────────────────────────────────────────────────── +step "Hugo build" + +info "Building site..." +rm -rf "$SITE_DIR/public" +hugo --minify --environment production +success "Hugo build complete ($(find public -name '*.html' | wc -l | tr -d ' ') HTML pages)" + +# ── Pagefind — search index ─────────────────────────────────────────────────── +step "Pagefind search index" + +info "Indexing content for search..." +pagefind --site public +success "Search index built" + +# ── Deploy ──────────────────────────────────────────────────────────────────── +step "Deploy → Cloudflare Pages" + +if $DRY_RUN; then + warn "Dry run: skipping upload." + warn "Would deploy: $(du -sh public | cut -f1) to project '$CF_PROJECT' (branch: $CF_BRANCH)" +else + info "Uploading to Cloudflare Pages..." + wrangler pages deploy public \ + --project-name "$CF_PROJECT" \ + --branch "$CF_BRANCH" + echo "" + success "Deploy complete! → https://${CF_PROJECT}.pages.dev" +fi diff --git a/layouts/_partials/components/sidebar.html b/layouts/_partials/components/sidebar.html new file mode 100644 index 0000000..10fe914 --- /dev/null +++ b/layouts/_partials/components/sidebar.html @@ -0,0 +1,157 @@ +{{- $context := .context -}} + +{{- $no_sidebar := ne .no_sidebar false -}} +{{- $pad_sidebar := true -}} +{{- $sidebar_dynamic_class := cond $no_sidebar (cond $pad_sidebar "lg:hidden xl:block" "lg:hidden") "lg:sticky" -}} + +{{- $root_section := cond (eq site.Home.Type "docs") site.Home $context.FirstSection -}} +{{- $page_url := $context.RelPermalink -}} + +{{/* Only replace explicit mobile menu links with automated links for Docs pages */}} +{{ if not $no_sidebar }} + +{{ end }} + + + +{{- define "menu-links" -}} + {{ template "link-tree" (dict "context" .context "level" 0 "page" .page "pageURL" .pageURL "toc" (.toc | default false)) }} +{{- end -}} + +{{- define "link-tree" -}} + {{- if ge .level 4 -}} + {{- return -}} + {{- end -}} + + {{- $context := .context -}} + {{- $page := .page -}} + {{- $page_url := .page.RelPermalink -}} + {{- $level := .level -}} + {{- $toc := .toc | default false -}} + + {{- with $items := union .context.RegularPages .context.Sections -}} + {{- $items = where $items "Params.sidebar.hidden" "!=" true -}} + + {{- if eq $level 0 -}} + {{/* ── Level 0: section group headers with icon ─────────────── */}} + {{- range $items.ByWeight -}} + {{- $active := eq $page_url .RelPermalink -}} + {{- $is_expanded := or (.Params.sidebar.open) (.IsAncestor $page) $active | default false -}} + {{- $icon := .Params.sidebar.icon | default "" -}} +
  • + + {{/* Section header — styled like the image: icon + uppercase label */}} +
    + {{- if $icon -}} + + {{ partial "functions/get_icon" (dict "name" $icon "attributes" "class=\"h-4 w-4\"") }} + + {{- end -}} + + {{- .LinkTitle -}} + +
    + + {{- if and $toc $active -}} + {{- template "mobile-toc" dict "page" . -}} + {{- end -}} + {{- template "link-tree" dict "context" . "page" $page "pageURL" $page_url "level" (add $level 1) "toc" $toc -}} +
  • + {{- end -}} + + {{- else -}} + {{/* ── Level 1+: regular indented links ─────────────────────── */}} +
    + +
    + {{- end -}} + {{- end -}} +{{- end -}} + +{{- define "mobile-toc" -}} + {{ $page := .page }} + {{ with $page.Fragments.Headings }} + + {{ end }} +{{- end -}} + +{{- define "custom-menu-links" -}} + {{- range site.Menus.sidebar -}} + {{- $name := .Name -}} + {{ if eq .Params.type "separator" }} +
  • + {{ $name }} +
  • + {{ else }} +
  • {{ template "custom-menu-link" dict "active" false "title" $name "link" (.URL | relLangURL) }}
  • + {{ end }} + {{- end -}} +{{- end -}} + +{{- define "custom-menu-link" -}} + {{- $is_external := strings.HasPrefix .link "http" -}} + + {{- .title -}} + {{- with .context -}} + {{- if or .RegularPages .Sections -}} + + + + + + {{- end -}} + {{- end -}} + +{{- end -}} diff --git a/layouts/_partials/docs_layout.html b/layouts/_partials/docs_layout.html new file mode 100644 index 0000000..bb5aeef --- /dev/null +++ b/layouts/_partials/docs_layout.html @@ -0,0 +1,28 @@ +
    + {{ partial "components/sidebar.html" (dict "context" . "no_sidebar" false) }} + {{ partial "components/toc.html" . }} +
    +
    + {{ if (.Params.show_breadcrumb | default true) }} +
    + {{ partial "components/breadcrumb.html" . }} +
    + {{ end }} + +
    +

    {{ .Title }}

    + {{ .Content }} + + docs + {{ with .Params.categories }} + {{ index . 0 }} + {{ end }} +
    + + {{ partial "components/last-edited.html" . }} + {{ .Scratch.Set "invert_pager" true }} + {{ partial "components/next-in-series.html" . }} + {{ partial "comments.html" . }} +
    +
    +
    diff --git a/layouts/_partials/functions/render_callout.html b/layouts/_partials/functions/render_callout.html new file mode 100644 index 0000000..b35a394 --- /dev/null +++ b/layouts/_partials/functions/render_callout.html @@ -0,0 +1,138 @@ +{{ $type := (lower .type) | default "note" }} +{{ $content := .content }} +{{ $title := .title }} +{{ if or (not $title) (eq $title "") }} + {{ $i18n_key := printf "callout_%s" $type }} + {{ $title = or (i18n $i18n_key) (title $type) }} +{{ end }} + +{{/* Brand-aware color mappings — info/note types use primary teal, others unchanged */}} +{{ $alertConfigs := dict + "note" (dict + "icon" "pencil" + "class" "bg-primary-50 dark:bg-primary-950" + "textClass" "text-primary-700 dark:text-primary-300" + "borderClass" "border-primary-400" + ) + "abstract" (dict + "icon" "clipboard-document-list" + "class" "bg-primary-50 dark:bg-primary-950" + "textClass" "text-primary-700 dark:text-primary-300" + "borderClass" "border-primary-400" + ) + "summary" (dict + "icon" "clipboard-document-list" + "class" "bg-primary-50 dark:bg-primary-950" + "textClass" "text-primary-700 dark:text-primary-300" + "borderClass" "border-primary-400" + ) + "info" (dict + "icon" "information-circle" + "class" "bg-primary-50 dark:bg-primary-950" + "textClass" "text-primary-700 dark:text-primary-300" + "borderClass" "border-primary-400" + ) + "todo" (dict + "icon" "check-circle" + "class" "bg-primary-50 dark:bg-primary-950" + "textClass" "text-primary-700 dark:text-primary-300" + "borderClass" "border-primary-400" + ) + "tip" (dict + "icon" "light-bulb" + "class" "bg-emerald-100 dark:bg-emerald-900" + "textClass" "text-emerald-600 dark:text-emerald-300" + "borderClass" "border-emerald-500" + ) + "success" (dict + "icon" "check-circle" + "class" "bg-green-100 dark:bg-green-900" + "textClass" "text-green-600 dark:text-green-300" + "borderClass" "border-green-500" + ) + "question" (dict + "icon" "question-mark-circle" + "class" "bg-yellow-100 dark:bg-yellow-900" + "textClass" "text-yellow-700 dark:text-yellow-300" + "borderClass" "border-yellow-500" + ) + "warning" (dict + "icon" "exclamation-triangle" + "class" "bg-orange-100 dark:bg-orange-900" + "textClass" "text-orange-600 dark:text-orange-300" + "borderClass" "border-orange-500" + ) + "failure" (dict + "icon" "x-circle" + "class" "bg-red-100 dark:bg-red-900" + "textClass" "text-red-600 dark:text-red-300" + "borderClass" "border-red-500" + ) + "danger" (dict + "icon" "exclamation-triangle" + "class" "bg-red-100 dark:bg-red-900" + "textClass" "text-red-600 dark:text-red-300" + "borderClass" "border-red-500" + ) + "bug" (dict + "icon" "bug-ant" + "class" "bg-red-100 dark:bg-red-900" + "textClass" "text-red-600 dark:text-red-300" + "borderClass" "border-red-500" + ) + "example" (dict + "icon" "beaker" + "class" "bg-purple-100 dark:bg-purple-900" + "textClass" "text-purple-600 dark:text-purple-300" + "borderClass" "border-purple-500" + ) + "quote" (dict + "icon" "chat-bubble-left-right" + "class" "bg-gray-100 dark:bg-gray-800" + "textClass" "text-gray-600 dark:text-gray-300" + "borderClass" "border-gray-500" + ) + "important" (dict + "icon" "exclamation-circle" + "class" "bg-purple-100 dark:bg-purple-900" + "textClass" "text-purple-600 dark:text-purple-300" + "borderClass" "border-purple-500" + ) + "caution" (dict + "icon" "exclamation-triangle" + "class" "bg-red-100 dark:bg-red-900" + "textClass" "text-red-600 dark:text-red-300" + "borderClass" "border-red-500" + ) +}} + +{{ $config := index $alertConfigs $type }} +{{ $icon := $type }} +{{ $class := "bg-primary-50 dark:bg-primary-950" }} +{{ $textClass := "text-primary-700 dark:text-primary-300" }} +{{ $borderClass := "border-primary-400" }} + +{{ if $config }} + {{ $icon = $config.icon }} + {{ $class = $config.class }} + {{ $textClass = $config.textClass }} + {{ $borderClass = $config.borderClass }} +{{ end }} + +
    + + {{ partial "functions/get_icon" (dict "name" $icon "attributes" "height=\"24\"") }} + +
    + {{- with $title -}} +
    + {{- . -}} +
    + {{- end -}} +
    + {{- $content -}} +
    +
    +