Skip to content

Latest commit

Β 

History

History
99 lines (72 loc) Β· 2.96 KB

File metadata and controls

99 lines (72 loc) Β· 2.96 KB

Architecture

devtools.directory is a fully static site. There is no server, no database, and no runtime.


Build pipeline

content/*.md  +  data/abstracts/*.yaml
        β”‚
        β–Ό
      Hugo (build)
        β”‚
        β–Ό
    public/          ← static HTML + CSS + JS + index.json
        β”‚
        β–Ό
  GitHub Pages       ← served on every push to main

Hugo reads all Markdown files, resolves cross-references by slug, runs templates, and writes static HTML. The entire site rebuilds in ~60ms.


Filtering and search

No server-side queries. All filtering happens in the browser via two mechanisms:

1. data-* attributes β€” every content card has its metadata embedded as HTML attributes at build time:

<div class="tool-item"
     data-language="python"
     data-frameworks="django fastapi"
     data-type="library"
     data-pricing="free">

JavaScript reads these attributes and toggles filter-hidden on each element. Instant, zero network requests.

2. JSON index β€” Hugo generates /index.json at build time containing all tools with their full metadata. Any page can fetch('/index.json') for cross-section queries.

For larger datasets (10k+ items), the upgrade path is Pagefind β€” run pagefind --site public after the Hugo build, add one <script> tag, and you get full-text binary search.


Schema system

data/abstracts/*.yaml defines the shape of every content type. Templates read these files to:

  • Know which fields to render and how
  • Validate required fields and emit warnings
  • Resolve inheritance (framework merges tool's fields before its own)

The schema is read at Hugo template render time β€” no separate build step or code generation.


Cross-references

All relationships are plain slug strings in frontmatter, resolved at render time:

{{/* Find the language page for a tool */}}
{{ $langPage := .Site.GetPage (printf "/languages/%s/" .Params.language) }}

{{/* Find all tools that reference a framework */}}
{{ range where .Site.RegularPages "Section" "tools" }}
  {{ if in .Params.frameworks $frameworkSlug }}...{{ end }}
{{ end }}

If a referenced slug has no content file, the reference is silently skipped β€” no 404, no build error.


File structure

devtools.directory/
β”œβ”€β”€ content/           ← all Data and List content files
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ abstracts/     ← schema definitions
β”‚   └── categories.yaml
β”œβ”€β”€ layouts/           ← Hugo HTML templates
β”‚   β”œβ”€β”€ partials/      ← shared components (header, footer, tool-card, validate-abstract)
β”‚   β”œβ”€β”€ tools/
β”‚   β”œβ”€β”€ languages/
β”‚   β”œβ”€β”€ frameworks/
β”‚   β”œβ”€β”€ stacks/
β”‚   └── ...
β”œβ”€β”€ static/
β”‚   └── css/main.css   ← One Dark Pro theme
β”œβ”€β”€ hugo.toml          ← Hugo config
└── .github/
    └── workflows/
        └── deploy.yml ← build + deploy on push to main