Skip to content

Repository files navigation

Barbados Digital Toolkit for Government

Everything you need to design, build and procure digital services that meet the Barbados Digital Service Standards — whether you are building in-house or working with a supplier.

How the site is built

Content lives as markdown under src/. Templates and partials live under src/_includes/. Eleventy turns them into static HTML in _site/.

src/
├── index.njk                             ← home page (data-driven sections)
├── styles.css                            ← copied through to _site/
├── flag_of_barbados.png                  ← favicon, copied through
├── _includes/
│   ├── layouts/
│   │   ├── base.njk                      ← banner, header, phase banner, footer
│   │   ├── home.njk                      ← extends base; hero + section lists
│   │   └── article.njk                   ← extends base; breadcrumb, header, TOC
│   └── partials/                         ← official banner, phase banner, logo, footer
└── <section>/<slug>.md                   ← one markdown file per article

Each article's front matter drives its title and lede:

---
layout: layouts/article.njk
title: Using the Barbados Government Design System
lede: How to install and use the Barbados Government Design System packages …
---

The output URL is derived from the file path — src/design-and-build/using-the-design-system.md becomes /design-and-build/using-the-design-system/.

The "Last updated" date shown on the home page is computed at build time from the last git commit that touched each file, so there is no lastUpdated field to maintain.

The table of contents is generated automatically from the ## headings in each article. Heading IDs are slugified from the heading text.

Adding a new page

  1. Create a markdown file at src/<section>/<slug>.md (pick an existing section directory or create a new one). Use the frontmatter shape above.

  2. Write the body. Use ## for headings — they become the table of contents.

  3. Add the page to the home index by editing src/index.njk. Find the right section under sections: and add an item that references the file:

    - page: design-and-build/using-the-design-system.md

    The title, description and URL are pulled from the page's own frontmatter, so you only ever write them in one place. Optionally add a tag:

    - page: getting-started/what-kind-of-service.md
      tag: { variant: new, label: New }

For an external link or a placeholder for something not yet built, use the inline shape instead of page::

- title: Assess your service's readiness
  href: "#"
  tag: { variant: soon, label: Coming soon }
  desc: A short checklist to help you understand where your service is today …

Running locally

Requires Node.js 18+.

npm install
npm start        # dev server on http://localhost:8080 with live reload
npm run build    # one-off build into _site/

Deployment

The toolkit is deployed on Netlify at https://prismatic-kleicha-bc1199.netlify.app/. Build command and publish directory are pinned in netlify.toml; Netlify picks them up on push to main.

About

A toolkit for any Barbados government ministry, department or agency who want to build digital services

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages