Milly Software
InsightsKnowledge baseUpload Markdown Docs Straight Into Your Knowledge Base
Knowledge base··5 min read

Upload Markdown Docs Straight Into Your Knowledge Base

Drop markdown files into the dashboard and they become widget-searchable in minutes.

V
Viet Le
co-founder · Milly Software

Why Markdown?

Many teams already maintain documentation in markdown: internal wikis, GitHub repos, Notion exports, static site generators, engineering handbooks. When you add an AI chat widget to your store, that existing content is the fastest way to teach the AI about your products, policies, and processes.

Markdown is treated as a first-class source in Milly Chat's knowledge base, separate from PDFs and URL-synced content. The reason: markdown preserves heading hierarchy cleanly. A document with # Section and ## Subsection headers gets chunked along those boundaries, which means the AI retrieves more relevant, well-scoped snippets instead of pulling in half a PDF's worth of loosely-related text.

How to Upload

  1. Navigate to Knowledge Base → Markdown tab in the sidebar
  2. Click Upload Markdown
  3. Drag and drop your .md or .markdown files into the drop zone (or click to browse)
  4. Review the upload results: title, heading count, word count per file
  5. Files land as Draft status — review them before publishing
Markdown upload modal showing batch upload results with detected titles, heading counts, and word counts

How Titles Are Detected

The system automatically detects each file's title in this order:

  1. YAML frontmatter — if the file starts with --- and has a title: field, that's used. The frontmatter is stripped from the body.
  2. First H1 heading — the first line starting with # in the body
  3. Filename — if neither exists, the filename is used with the extension stripped and dashes/underscores replaced with spaces
---
title: Shipping & Returns Policy
---

## Domestic Shipping
We ship within 2-3 business days...

## International Shipping
...

In this example, the title would be "Shipping & Returns Policy" from the frontmatter. The body starts at "## Domestic Shipping" — the frontmatter block is removed before storing.

Draft-First Workflow

Uploaded files land as Draft status. This is intentional: you get a chance to review the extracted title and content before the AI starts using them.

From the Markdown tab, you can:

  • Click any row to edit the title or content
  • Toggle Published/Draft per entry
  • Bulk publish by selecting multiple entries and clicking "Publish Selected"
  • Bulk delete entries you don't need
Markdown tab list view with Published and Draft status badges

Limits

  • Max 4 MB per file. Most markdown files are well under this.
  • Min 5 words. Empty or near-empty files are rejected.
  • Multi-file upload. Drag as many files as you want into the drop zone.
  • .md and .markdown extensions accepted. Other file types are silently skipped.

When to Use Markdown vs. PDFs vs. URL Sync

The knowledge base supports four content sources. Each has a sweet spot:

  • Manual entries — quick one-off articles you type directly in the dashboard
  • Markdown upload — existing documentation you already maintain as .md files (internal wikis, GitHub repos, Notion exports)
  • PDF upload — product manuals, spec sheets, catalogs. Text is extracted automatically.
  • URL Sync — live web pages that should stay in sync. The system re-fetches daily and updates the entry when the page changes.

Markdown upload is the best choice when you have structured documentation with heading hierarchy that you want preserved. If your content lives on a live website that changes frequently, URL Sync is better. If your content is in a visual PDF format, use the PDF uploader.

A Real-World Example

One of our users has a team of R&D engineers who maintain dozens of internal documentation files in markdown: product specs, application guides, safety data, coating compatibility matrices. Instead of re-typing all of that into the knowledge base, they drag-and-dropped the entire folder into the Markdown tab.

The upload took seconds. Each file got its title from the frontmatter or the first heading. They reviewed the drafts, published the ones that were customer-appropriate, and their AI assistant could immediately answer technical questions from the documentation their team had already written.

No rewriting. No copy-pasting. Just drag, review, publish.

Frequently Asked Questions

What file types can I upload to a Shopify AI chat knowledge base?

Markdown upload accepts .md and .markdown files (other file types in the drop zone are silently skipped). Beyond markdown, the knowledge base also supports manual entries you type in the dashboard, PDF upload for manuals and spec sheets, and URL Sync for live web pages that should stay current.

Is there a file size limit for markdown uploads?

Yes — 4 MB per file, which most markdown files are well under. Files must contain at least 5 words; empty or near-empty files are rejected. You can drag as many files as you want into the drop zone at once.

How does Milly Chat detect the title of an uploaded markdown file?

In order: first it uses a title: field in YAML frontmatter (the frontmatter block is then stripped from the body); if there's none, it uses the first H1 heading; if neither exists, it falls back to the filename with the extension removed and dashes and underscores replaced with spaces.

Do uploaded files go live immediately?

No. Uploaded files land as Draft status so you can review the extracted title and content before the AI uses them. From the Markdown tab you can edit any entry, toggle Published/Draft per entry, and bulk-publish or bulk-delete selected entries.

Try Milly Chat

Want to see how this fits your store?
We'll set up a working session.

Get it on ShopifyTalk to sales →