How I built this site
Most of my professional work is under non-disclosure agreements, so this site is my portfolio. Following are details about how I built, deployed, and run it with automated pipelines and AI tools.
Site infrastructure
This site is managed with a docs-as-code methodology:
- Content stored as Markdown files (MDX) in Git
- Static-site generator builds the site
- GitHub actions run automated tests and build the site
- Netlify hosts
Static-site generator
The site is built with Docusaurus, a popular static-site generator for documentation websites used by companies like React Native, Electron, and Algolia DocSearch. Desirable Docusaurus features include:
- MDX file support: Docusaurus supports MXD files instead of just regular Markdown, which lets me embed React components like the interactive samples I share on my Portfolio pages.
- Plugin support: Docusaurus supports plugins to easily implement features like Google Analytics tracking, search functionality, a blog, documentation layouts, diagrams, and AI optimization.
- Customization: I can swizzle any theme component to customize it, which lets me customize portfolio sample pages.
- Credibility and maintenance: Meta maintains it.
See everything I look for when I evaluate static-site generators.
Source code in Git
Source code is managed in two GitHub repos:
- Site infrastructure and most content: portfolio
- REST API section: norway-data-api
AI agent optimization
Agent discoverability and consumption
This site follows the Agent-Friendly Documentation Spec, which provides tested and proven standards for serving a documentation site that agents can find and process. Examples include:
- Serving an
llms.txtfile under 50K characters, formatted according to the llmstxt.org standardization proposal - Serving
.mdURLs for each article - Pointing agents to the
llms.txtfile via the HTML DOM and served.mdfiles - Enabling
Accept: text/markdowncontent negotiation for AI agents that prefer Markdown over HTML, via a Netlify function - Served Markdown files deliver all content with one fetch
- Proper code fences and error codes
- Content matches between HTML and served Markdown files
- Many more
This site also earns an A score on the AFDocs companion test, which evaluates how well agents can consume this site.
Agent interaction
- Button that lets users copy a page as Markdown
- Button that automatically opens Claude or ChatGPT with a prompt that references a site page
Deployment pipeline
Linting
The pipeline fails if issues are detected with any of the following:
- AI agent friendliness (AFDocs CI test to verify the site aligns with the Agent-Friendly Documentation Spec)
- Style deviations (Vale)
- Broken links (lychee)
- Spelling errors (codespell)