Processing Control and Markdown View

By default, Accent CMS runs all page content through the markdown rendering pipeline (parser, tag expansion, TOC extraction, syntax highlighting). You can disable markdown processing on a per-page basis using the process frontmatter field.

Disabling Markdown

Set process.markdown to false to pass the content body through to the template as raw HTML without any markdown parsing:

---
title: Design System
process:
  markdown: false
---
<div class="design-system">
  <h1>This HTML is rendered as-is</h1>
  <p>No markdown processing, no paragraph wrapping.</p>
</div>

When markdown processing is disabled:

  • page.content contains the raw content body (HTML or otherwise)
  • page.toc is empty (no heading extraction runs)
  • Components ({% name %}) are not expanded (tag expansion is part of the markdown pipeline)
  • The page still renders inside the theme template (navigation, footer, layout)
  • The page is still routable, indexed, and appears in collections

This is useful for pages that contain complex HTML structures (design system demos, embedded applications, landing pages with custom markup) where markdown parsing would interfere with the intended output.

On a page served by accent serve, the strict script policy blocks a <script> element or an onclick= attribute in the page’s own HTML. Put scripts in a theme template instead, where they can carry nonce="{{ nonce }}"; see the theming guide.

Combining with Iframe

For standalone HTML pages that have their own <html> and <head> elements, write an <iframe> element in the page instead of disabling markdown. The iframe provides full isolation (separate styles, scripts, DOM), while process.markdown: false is best for HTML fragments that should integrate with the theme layout. Files served through /content-media/ carry a strict Content-Security-Policy that blocks an embedded page’s own styles and scripts; see the configuration reference for the scoped override.

Markdown View

Accent CMS can expose the raw markdown source of any page to visitors. This opt-in feature is useful for documentation sites where readers want to copy the source, developer-facing sites where markdown is a natural interchange format, or LLM and automation consumers that prefer plain text over HTML.

Enabling Markdown View

Add the markdown_view section to your config.yaml:

content:
  markdown_view:
    enabled: true
    include_frontmatter: false
    default_format: html
KeyTypeDefaultDescription
enabledboolfalseMaster toggle for the feature
include_frontmatterboolfalseInclude the YAML frontmatter block in raw output
default_formatstringhtmlhtml for normal rendering with .md URL access, or markdown for full markdown-only output

Markdown View is a free feature: it works in accent build and dev serve with no license key. Production serving requires a Standard or Pro license in any case, so Markdown View is available there too.

Viewing Raw Markdown (HTML Mode)

When default_format is html (the default), your site renders HTML as normal. Visitors can view the raw markdown source of any page by appending .md to the URL:

  • /docs/guide serves the rendered HTML page
  • /docs/guide.md serves the raw markdown source with Content-Type: text/markdown

The response includes only the content body by default. Set include_frontmatter: true to include the YAML frontmatter block in the output.

Templates receive a page.markdown_url variable containing the .md URL, and a markdown_view_enabled flag for conditional rendering. The default theme includes a “View as Markdown” link in the article footer.

Markdown-Only Mode

When default_format is markdown, every page the site serves is markdown, sent as text/markdown; charset=utf-8. Page URLs return markdown instead of HTML, rendered through *.md.jinja templates that use the same template engine and variables as HTML templates.

That includes the pages Accent generates. Each renders through the .md.jinja twin of its HTML template, and without one through a built-in markdown page:

PageTemplates, in orderWithout a template
Content page<template>.md.jinja, default.md.jinjaThe page’s markdown
Listing, page 2 onwardAs its first pageThe page’s markdown
Tag indextags.md.jinjaA list of the tags with their page counts
Tag pagetag.md.jinjaA list of the tag’s pages
Taxonomy index<name>.md.jinja, tags.md.jinjaA list of the terms
Taxonomy term page<singular>.md.jinja, tag.md.jinjaA list of the term’s pages
Error pageerror/404.md.jinja, error.md.jinjaThe markdown of content/error/404.md, or the status and its message

The default theme ships tags.md.jinja, tag.md.jinja, categories.md.jinja, category.md.jinja, and error/404.md.jinja. In markdown mode no page falls back to HTML.

This mode is designed for LLM-friendly documentation, API docs consumed by developer tools, and knowledge bases indexed by RAG pipelines. See the Templating Guide for details on writing .md.jinja templates.

accent build writes each page in this mode as <url>.md, the home page as index.md, and the error page as 404.md. A page’s URL stays its clean URL, so your host must serve that URL from the file; see Markdown-only output for how.

Interaction with .md Extension Redirects

When Markdown View is disabled (the default), .md URLs redirect to their clean counterparts per the clean URL spec. That includes the index files: docs/README.md, docs/index.md, or docs/default.md redirect to /docs, and the bare docs/README form does too, so a directory’s page has one URL. When enabled in HTML mode, .md URLs serve raw markdown instead. When in markdown mode, .md URLs redirect to the clean URL since it already serves markdown.