« Back to Search  |  Reader Mode  |  Switch to Full Retro Site View Links: Stay in Reader  |  Retro Mode: ON  |  Original »
nghialele.dev · Extracted in 562 ms

About this theme

Source: https://nghialele.dev/posts/about-the-theme/
Posts

About this theme

One guide to the Inkfolio theme, from the first build to posts, colours, banners and the optional MCP page.

nghialele 27 November 2026 6 min read On this page · 8
  1. Install and run
  2. Configure the site
  3. Write content
  4. Change the look
  5. The optional banner
  6. The optional MCP page
  7. Deploy
  8. Further reading

This site runs on Inkfolio, a static Astro theme. It builds to plain HTML, needs no server or database, and keeps its settings in one YAML file. This post collects the theme's setup notes into one place.

Install and run

Node.js 20 or newer is the only requirement.

bash
npm install

npm run dev      # http://localhost:4321

npm run build    # writes static HTML to dist/

The first thing to change is site.url in site.config.yaml:

yaml
site:

  url: https://nghialele.dev

That value becomes the canonical URL, the sitemap base and the RSS links. The site still builds without it, but canonical tags point at example.com.

What ships out of the box:

  • Home page with the latest posts
  • Posts index and article pages
  • About page, edited as a Markdown file
  • RSS feed, sitemap and llms.txt
  • Light and dark mode, remembered per visitor
  • Category and tag pages, plus an activity log and a tools page
  • Single-language output with a frontmatter field for future translations

Configure the site

Everything visitors see as structure comes from site.config.yaml in the project root. You do not need to open a component to rename the site or add a menu item.

The site block holds the text and links used across pages:

  • name, tagline and description drive the navigation, home headline and meta description.
  • url is the domain used for canonical links, the sitemap and RSS.
  • author, email, telegram and contactEndpoint fill the article byline and footer.
  • greeting and avatar belong to the home hero. The friends list has its own avatar.

Navigation is a plain list. Each item needs a label and an href, and nested items create a dropdown:

yaml
nav:

  - label: Posts

    href: /posts/

social and footerColumns use the same shape. Links are written as-is, so check them before publishing.

The theme block controls colour and mode:

yaml
theme:

  accent: '#0B8A60'

  accentDark: '#5EEAD4'

  defaultMode: dark

  radius: 12px

promoBanner is covered further down. seo holds the title template, default description, social image path, locale, keywords and structured data switches. covers decides where post cards appear. mcp is off until you opt in.

One rule matters more than the rest: YAML is whitespace sensitive. Indent with spaces, never tabs, and keep quotes around values that contain : or #.

Write content

Posts are Markdown files in src/content/posts/. Create my-post.md and it becomes /posts/my-post/. The filename is the URL, so pick a slug you can live with.

yaml
---

title: A post about something

description: One sentence that shows on the index and in search results.

date: 2026-11-27

tags: [notes]

categories: ['Setup']

draft: false

---
  • title and date are required. Astro checks them before anything else, even for drafts.
  • description becomes the meta description and the line under the title on list pages.
  • tags and categories feed the taxonomy pages. They are not just decoration.
  • draft: true keeps the file in the repo but out of lists, RSS, llms.txt, the sitemap and route generation. The frontmatter still needs a valid title and date.
  • updated is optional and prints a second date next to the published one.
  • cover and coverAlt override the generated card when you want a custom image. Without them the generated card is used automatically.
  • toc defaults to true. Set it to false for a short post that does not need a sticky table of contents.

The schema has a lang field, but this fork publishes English routes only. Adding a second language needs routing work, not just translated frontmatter.

Put images in public/ and reference them from the Markdown root:

markdown
![A caption](/images/photo.jpg)

The prose styles add a border and rounded corners. There is no image pipeline, so compress files before committing them. Every image in a post opens full size on click, with arrow keys to walk through the article and Escape to close.

Fenced code blocks are styled and scroll horizontally. Indented blocks are not, so use fences:

js
console.log('hello');

Shiki also understands title=, group=, showLineNumbers, highlight markers and diff markers. See the writing docs for the full syntax.

Change the look

The baseline is deliberately plain: warm paper background, near-black text, one accent colour, a system font stack and no web font requests. That is a design decision, not an unfinished part.

theme.accent feeds the CSS variables --accent and --u, which drive links, wavy underlines and the active navigation item. theme.accentDark does the same for the dark palette. Both live in site.config.yaml, so there is no CSS override to maintain.

The font stack is defined once at the top of src/styles/global.css, in --font and --mono. Two options keep the site fast:

  1. Leave the system stack. It renders instantly and looks native on every operating system.
  2. Self-host a font. Put the .woff2 files in public/fonts/, add an @font-face block and point --font at it. Do not add a Google Fonts <link>. It costs a connection on every page and sends visitor IPs to a third party.

The content column uses --max-w, 880px for the shell and 632px for running text. Both values are CSS variables in the same file. Widening them makes long posts harder to read, which is a trade-off rather than a bug.

Visitors get a theme toggle in the navigation. The choice is stored in localStorage under inkfolio-theme. With defaultMode: auto, the first visit follows the operating system. The theme is applied before the page paints, so there is no white flash.

The wavy underline on inline links is the one signature move. It stays visible at rest on purpose, because hover-only affordances disappear on touch screens.

The upstream theme ships with a small promo banner. It is a normal config value, so you can remove it or rewrite it without touching code.

To remove it:

yaml
promoBanner:

  enabled: false

The banner disappears from every page. The HTML is not rendered at all, so nothing is left hidden in the DOM.

To keep it with your own words:

yaml
promoBanner:

  enabled: true

  dismissible: true

  text: This site runs on Inkfolio

  link: https://nghialele.dev

  linkText: Read more

Point the link at a newsletter, a product or your own project. With dismissible: true, visitors get a close button. Their choice is saved in localStorage under inkfolio-promo-dismissed and the banner stays closed in that browser. Set dismissible: false when the banner should be permanent, for example a legal notice.

The banner element starts hidden and a few lines of inline JavaScript reveal it. That stops it from flashing back after a visitor closes it. With JavaScript disabled, the banner stays hidden instead of showing something nobody can dismiss.

The optional MCP page

This fork keeps the MCP page off. When mcp.enabled is false, /mcp/ renders a short "not enabled" page with noindex and the navigation entry disappears. No dead link is left behind.

Turn it on with one config block:

yaml
mcp:

  enabled: true

  endpoint: ''

  name: nghialele.dev MCP

An empty endpoint falls back to https://<site.url host>/mcp, which is https://nghialele.dev/mcp here. The page then shows the endpoint with a copy button, connection steps for common clients, your tools and your sources.

Sources and tools are plain lists in the same block:

yaml
mcp:

  sources:

    - host: nghialele.dev

      items: 42

      desc:

        en: Articles and notes

  tools:

    - name: list_sources

      args: ''

      desc:

        en: Every connected source with its item count.

items is optional. Omit it and the page prints a dash instead of a number. Counts are written by hand, so update them when you publish or drop the field.

The page does not host an MCP server. It documents one you already run, whether that is a Worker, a small service or anything else that speaks the protocol. The theme stays static and the endpoint lives elsewhere.

For a preview build with the page on, set MCP_ENABLED=true in the environment. The build treats that as mcp.enabled: true without editing the YAML.

Deploy

npm run build produces a folder of plain HTML in dist/. Any static host works:

  • Cloudflare Pages: connect the repo, build command npm run build, output directory dist.
  • Netlify: the same two values, then done.
  • Vercel: it detects Astro by itself.

There is no server, database or API key in the theme. A contact form, if you add one, is a separate service.

Further reading


Categories
Setup Writing Design Extend
Tags
#setup #deploy #configuration #banner #writing #design #mcp ← All posts