Skip to content

nafSadh/flags.fyi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

295 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

flags.fyi

A web compendium of vexillology (flag study), by Flagstaff.

Architecture

This is a static site β€” no framework, no build step required for deployment. The repository itself is the deployable content for GitHub Pages.

  • HTML pages are pre-generated from flag data using build.js
  • Bulma CSS and Font Awesome loaded from CDN
  • Minimal vanilla JS (app.js) for keyboard navigation and mobile menu
  • Zero runtime dependencies β€” build.js uses only Node.js built-ins

How it works

  1. Flag metadata lives in data/flags.json
  2. Per-flag details (colors, descriptions, articles) live in assets/flags/{namespace}/
  3. build.js reads the data, renders Markdown, and generates static {flagId}/index.html pages
  4. SVG flag images are copied from assets/flags/ into each flag directory
  5. The result is a flat structure where source = deployable output

Development

Rebuild pages after editing data

node build.js

No npm install needed β€” the build script has zero dependencies.

Preview locally

npx serve . -l 3000
# or
python3 -m http.server 3000

Keyboard shortcuts (on flag pages)

  • ← or p β€” Previous flag
  • β†’ or n β€” Next flag
  • i β€” Flag index

Directory structure

β”œβ”€β”€ data/               # Source data (flags.json, meta.json, etc.)
β”œβ”€β”€ assets/flags/       # Flag SVG/PNG images and per-flag JSON/MD
β”œβ”€β”€ build.js            # Static site generator (Node.js, zero deps)
β”œβ”€β”€ style.css           # Custom CSS (Bulma from CDN)
β”œβ”€β”€ app.js              # Minimal JS (keyboard nav, burger menu)
β”œβ”€β”€ index.html          # Landing page
β”œβ”€β”€ flag-index/         # Flag listing page
β”œβ”€β”€ {flagId}/           # Per-flag pages
β”‚   β”œβ”€β”€ index.html      #   Generated page
β”‚   └── flag.svg        #   Flag image (copied from assets/)
β”œβ”€β”€ flags.json          # Flag data (also served as API)
β”œβ”€β”€ CNAME               # GitHub Pages custom domain
└── .nojekyll           # Disable Jekyll processing

Deployment

Push to gh-pages (or configure GitHub Pages to serve from the default branch). Since source = output, no CI/CD build step is needed.

License

MIT

About

🚩 Flags for your info, by Flagstaff

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors