Home Blog Certs Knowledge Base About

Project Overview โ€” Architecture & Pipeline

What is this project?

maks.top โ€” a static site built with Hugo using a custom theme maks. No third-party themes or frameworks โ€” everything is written from scratch.


Hugo pipeline: how the site is built

content/ (markdown)  โ”€โ”€โ”
layouts/ (templates) โ”€โ”€โ”ผโ”€โ”€โ–บ Hugo build โ”€โ”€โ–บ public/ โ”€โ”€โ–บ GitHub Pages
static/  (assets)    โ”€โ”€โ”˜
  1. Hugo reads hugo.toml โ€” site configuration
  2. For each .md file in content/, it finds a matching template from layouts/
  3. The template inserts data from frontmatter + .Content (markdown body)
  4. Static files from static/ and themes/maks/static/ are copied as-is
  5. The result โ€” a public/ folder with clean HTML/CSS/JS

Template lookup โ€” priority order

Hugo searches for a template in this order (first match wins):

PageTemplate lookup (in order)
/posts/lpic2-200-1/layouts/posts/single.html โ†’ layouts/_default/single.html
/posts/linux-namespaces/layouts/posts/linux-namespaces.html โ†’ layouts/posts/single.html
/certs/ccna/layouts/certs/single.html โ†’ layouts/_default/single.html
/ccna-quiz/p01/layouts/ccna-quiz/single.html
/ccna-quiz/layouts/ccna-quiz/list.html
/about/layouts/about/single.html โ†’ layouts/_default/single.html
/layouts/index.html
/posts/layouts/posts/list.html โ†’ layouts/_default/list.html
/tags/layouts/taxonomy/tag.html

Key rule: a more specific path always overrides the default.


Directory structure

maks.top/
โ”‚
โ”œโ”€โ”€ hugo.toml                        # Site configuration
โ”‚
โ”œโ”€โ”€ content/                         # Content (markdown)
โ”‚   โ”œโ”€โ”€ about.md                     # /about/ page
โ”‚   โ”œโ”€โ”€ posts/                       # /posts/ section (blog)
โ”‚   โ”‚   โ”œโ”€โ”€ lpic2-200-1-*.md         # LPIC-2 articles
โ”‚   โ”‚   โ””โ”€โ”€ linux-namespaces.md      # Interactive namespace explorer
โ”‚   โ”œโ”€โ”€ certs/                       # /certs/ section
โ”‚   โ”‚   โ”œโ”€โ”€ ccna.md                  # CCNA cert page (accordion + resource tiles)
โ”‚   โ”‚   โ”œโ”€โ”€ lpic-1.md, lpic-2.md     # LPIC cert pages
โ”‚   โ”‚   โ”œโ”€โ”€ network-engineer.md      # OTUS course: 17 topics, 24 articles
โ”‚   โ”‚   โ””โ”€โ”€ aws-saa.md
โ”‚   โ”œโ”€โ”€ ccna-quiz/                   # /ccna-quiz/ section
โ”‚   โ”‚   โ”œโ”€โ”€ _index.md                # Quiz index page (49-tile grid)
โ”‚   โ”‚   โ””โ”€โ”€ p01.md โ€“ p49.md          # 489 questions, 10 per page, YAML frontmatter
โ”‚   โ”œโ”€โ”€ kb/                          # /kb/ section (quick references)
โ”‚   โ”‚   โ”œโ”€โ”€ linux-network.md         # ip, ss, tcpdump, nmcli, iptables
โ”‚   โ”‚   โ”œโ”€โ”€ bash.md                  # Variables, arrays, loops, functions
โ”‚   โ”‚   โ”œโ”€โ”€ text-processing.md       # grep, awk, sed, cut, sort, xargs
โ”‚   โ”‚   โ”œโ”€โ”€ filesystem.md            # find, du/df, lsof, chmod, LVM
โ”‚   โ”‚   โ”œโ”€โ”€ processes.md             # ps, systemd, cron, journald
โ”‚   โ”‚   โ”œโ”€โ”€ cisco-routing.md         # OSPF/EIGRP/BGP IOS commands
โ”‚   โ”‚   โ”œโ”€โ”€ cisco-switching.md       # VLAN/STP/EtherChannel IOS commands
โ”‚   โ”‚   โ”œโ”€โ”€ docker.md                # run/build/compose/volumes
โ”‚   โ”‚   โ”œโ”€โ”€ git.md                   # commit/rebase/stash/cherry-pick
โ”‚   โ”‚   โ”œโ”€โ”€ aws-cli.md               # EC2/S3/IAM/VPC commands
โ”‚   โ”‚   โ”œโ”€โ”€ iptables-nftables.md     # Firewall rules deep-dive
โ”‚   โ”‚   โ””โ”€โ”€ ssh.md                   # Keys/tunnels/config/rsync
โ”‚   โ””โ”€โ”€ docs/                        # /docs/ section (this documentation)
โ”‚
โ”œโ”€โ”€ static/                          # Global static files
โ”‚   โ”œโ”€โ”€ img/quiz/                    # 247 JPEG images extracted from CCNA PDF
โ”‚   โ”œโ”€โ”€ roadmap/index.html           # Static roadmap page (/roadmap/)
โ”‚   โ””โ”€โ”€ CNAME                        # Custom domain for GitHub Pages
โ”‚
โ””โ”€โ”€ themes/maks/                     # Custom theme
    โ”œโ”€โ”€ theme.toml                   # Theme metadata
    โ”‚
    โ”œโ”€โ”€ layouts/                     # Hugo templates (Go templates)
    โ”‚   โ”œโ”€โ”€ index.html               # Home page /
    โ”‚   โ”œโ”€โ”€ _default/
    โ”‚   โ”‚   โ”œโ”€โ”€ baseof.html          # Base layout (wrapper for all pages)
    โ”‚   โ”‚   โ”œโ”€โ”€ single.html          # Article with ToC and progress bar
    โ”‚   โ”‚   โ””โ”€โ”€ list.html            # Page listing with pagination
    โ”‚   โ”œโ”€โ”€ posts/
    โ”‚   โ”‚   โ”œโ”€โ”€ list.html            # Blog listing + Pagefind search
    โ”‚   โ”‚   โ””โ”€โ”€ linux-namespaces.html # Interactive namespace explorer
    โ”‚   โ”œโ”€โ”€ ccna-quiz/
    โ”‚   โ”‚   โ”œโ”€โ”€ list.html            # Quiz index (49 page tiles)
    โ”‚   โ”‚   โ””โ”€โ”€ single.html          # Quiz page: questions, options, scoring
    โ”‚   โ”œโ”€โ”€ about/
    โ”‚   โ”‚   โ””โ”€โ”€ single.html          # About page with certs-widget
    โ”‚   โ”œโ”€โ”€ certs/
    โ”‚   โ”‚   โ””โ”€โ”€ single.html          # Cert overview: hero, resource tiles, accordion
    โ”‚   โ”œโ”€โ”€ taxonomy/
    โ”‚   โ”‚   โ””โ”€โ”€ tag.html             # Tags with interactive filtering
    โ”‚   โ”œโ”€โ”€ kb/
    โ”‚   โ”‚   โ””โ”€โ”€ list.html            # KB index grouped by Params.group
    โ”‚   โ”œโ”€โ”€ partials/                # Reusable fragments
    โ”‚   โ”‚   โ”œโ”€โ”€ certs-widget.html    # Cert cards for About page
    โ”‚   โ”‚   โ”œโ”€โ”€ pagination.html      # Dot-grid pagination (shared CSS in global.css)
    โ”‚   โ”‚   โ””โ”€โ”€ breadcrumb.html      # Breadcrumb navigation
    โ”‚   โ””โ”€โ”€ shortcodes/              # Shortcode components for markdown
    โ”‚       โ”œโ”€โ”€ ns-card.html         # Linux namespace card (uses --c variable)
    โ”‚       โ””โ”€โ”€ code.html            # Code block with Chroma highlighting
    โ”‚
    โ””โ”€โ”€ static/                      # Theme static files
        โ”œโ”€โ”€ js/
        โ”‚   โ”œโ”€โ”€ site.js              # Global functions (theme, menu)
        โ”‚   โ””โ”€โ”€ ns.js                # Namespace explorer logic
        โ””โ”€โ”€ styles/
            โ”œโ”€โ”€ global.css           # Variables, nav, common components, pagination
            โ”œโ”€โ”€ home.css             # Home page styles
            โ”œโ”€โ”€ prose.css            # Article typography, NS cards, tabs, ref-panel
            โ”œโ”€โ”€ cert.css             # Cert pages (hero, resource tiles, accordion)
            โ”œโ”€โ”€ quiz.css             # CCNA quiz cards, options, scoring badges
            โ”œโ”€โ”€ ns.css               # linux-namespaces page layout only
            โ”œโ”€โ”€ chroma.css           # Syntax highlighting: Dracula (dark) / GitHub (light)
            โ”œโ”€โ”€ fonts.css            # @font-face: Inter (body), JetBrains Mono, Unbounded
            โ””โ”€โ”€ mobile.css           # Mobile nav and breakpoints

Build pipeline: from push to live site

git push origin hugo
        โ”‚
        โ–ผ
GitHub Actions (.github/workflows/deploy.yml)
        โ”‚
        โ”œโ”€โ”€ actions/checkout@v4          # Clones repo with submodules
        โ”œโ”€โ”€ peaceiris/actions-hugo@v3    # Installs Hugo (latest, extended)
        โ”œโ”€โ”€ hugo --minify --gc           # Builds site into public/
        โ”‚   โ”œโ”€โ”€ --minify: compresses HTML/CSS/JS
        โ”‚   โ””โ”€โ”€ --gc: removes unused cache files
        โ”œโ”€โ”€ pagefind --site public        # Indexes content for search
        โ”œโ”€โ”€ actions/upload-pages-artifact # Uploads public/ as artifact
        โ””โ”€โ”€ actions/deploy-pages@v4       # Deploys to GitHub Pages
                โ”‚
                โ–ผ
        https://maks.top/
        (Fastly CDN + Let's Encrypt TLS + gzip)

hugo.toml โ€” key parameters

baseURL = "https://maks.top/"   # Used for absolute links
languageCode = "en"
title = "maks.top"
theme = "maks"                  # References themes/maks/
paginate = 10                   # Posts per page in listings

[params]                        # Available in templates as .Site.Params.*
  author      = "Maks"
  description = "..."
  location    = "Sydney, AU"
  github      = "https://github.com/NickelFace"
  linkedin    = "..."
  telegram    = "..."

[taxonomies]
  tag      = "tags"             # Tags: /tags/{tag-name}/
  category = "categories"      # Categories: /categories/{name}/

[outputs]
  home    = ["HTML"]            # HTML only (no RSS, JSON)
  section = ["HTML"]
  page    = ["HTML"]

[markup.goldmark.renderer]
  unsafe = true                 # Allows raw HTML inside markdown

[markup.highlight]
  noClasses   = false           # Class-based Chroma (CSS in chroma.css)
  codeFences  = true            # Syntax highlight fenced code blocks
  guessSyntax = true            # Auto-detect language if not specified
  lineNos     = false
  tabWidth    = 2

How Hugo passes data to templates

Each template has access to . (dot) โ€” the current page context:

VariableTypeDescription
.TitlestringFrom frontmatter title:
.Datetime.TimeFrom frontmatter date:
.Contenttemplate.HTMLMarkdown body converted to HTML
.DescriptionstringFrom frontmatter description:
.ParamsmapAll custom frontmatter fields
.Params.tags[]stringFrom frontmatter tags:
.PermalinkstringFull page URL
.RelPermalinkstringRelative URL
.SectionstringSection: “posts”, “certs”, “ccna-quiz”
.IsHomebooltrue only for the home page
.SiteSiteGlobal site object
.Site.ParamsmapParameters from [params] in hugo.toml
.Site.RegularPages[]PageAll site pages
.Site.Taxonomies.tagsTaxonomyAll tags with post counts
.PaginatorPaginatorPagination object (in list templates)

  • Templates โ€” each layout file in detail
  • CSS โ€” style architecture and class reference
  • Frontmatter โ€” all fields by content type
  • JavaScript โ€” functions and event listeners