migrate

Convert Quarto sources and settings for Octavo

octavo-migrate-quarto converts a source-root Quarto project in place. Read the migration instructions below before running it. For nbdev projects, use nbdev's migration instructions and nbdev-migrate-octavo.

Python callers use migrate_quarto with a configuration callback. quarto_project_config handles source-root projects; integrations supply their own callback and any extra accepted page keys. Octavo does not read nbdev project configuration.

Source conversion

Renaming a document also requires updating references to it. A page beside guide.qmd refers to it differently from a page in a subdirectory: guide.qmd versus ../guide.qmd. Migration calculates replacement paths from the documentation root and from each source file’s directory.

The current implementation performs text replacement rather than parsing links. Matching text outside link destinations can also change.

The Markdown copy of each page also moves. Quarto published page.html.md beside page.html; Octavo publishes page.md. Hand-written indexes such as llms.txt often link these copies, so migration rewrites .html.md targets to .md in Markdown sources and .txt files.


def repl_html_md_links(
    txt
):

Rewrite Quarto .html.md Markdown-copy targets to Octavo's .md


def repl_qmd_links(
    txt, moves, src, root
):

Rewrite relative and root-relative .qmd link targets to .md

Quarto lets authors mark a block of content for a particular output format—for example, HTML for the website or Markdown for a README. Migration replaces Quarto's .content-visible divs with mdhtml.fill mustache sections ({{#html}}, {{#md}}, {{^html}}, {{^md}}), keeping any remaining attributes as an inner div and preserving Markdown rendering inside both formats.

Migration also moves Quarto callout title="..." attributes onto a leading ## Title heading inside the callout when no heading is present.


repl_callout_titles

def repl_callout_titles(
    s
):

Move Quarto callout title="..." attributes into a leading ## Title heading inside the callout


repl_content_visible

def repl_content_visible(
    s
):

Convert Quarto ::: {.content-visible when-format=... / unless-format=...} to {{#html}} / {{#md}} / {{^html}} / {{^md}}

Octavo reads Quarto's frontmatter keys as they are, such as toc-depth, page-layout and categories, so migration leaves them alone. It changes one thing: Octavo shows a page's description under its title, where Quarto shows subtitle, so a subtitle, or a legacy summary, becomes the description. A page that already has a description keeps it, and its subtitle is reported as unsupported.


repl_frontmatter_keys

def repl_frontmatter_keys(
    s
):

Move Quarto's subtitle, or a legacy summary, to the description Octavo shows, unless the page has one


repl_disabled_python

def repl_disabled_python(
    txt, execution
):

Make disabled fences display-only using the execution map


python_execution

def python_execution(
    txt, metadata=None
):

Map original 1-based Python fence lines to whether they remain executable


python_blocks

def python_blocks(
    txt
):

Executable Python fences with source line locations; never execute them

Explicit execute.eval: false on a document, or #| eval: false on a Python block, becomes a display-only python fence. A cell's boolean eval overrides the document setting. Non-boolean cell values and execution settings inherited from other files require review. Literal fenced examples are not executable blocks.

python_execution maps each Python fence's original line number to whether it remains executable. repl_disabled_python uses that map to change disabled fences and returns the text. Migration reports the executable entries from the same map before other transformations can move lines. It does not execute code or reproduce frozen results.

disabled = r"""---
execute:
  eval: false
---

```{python}
raise RuntimeError("do not run")
```

```{python}
#| eval: true
print("review before building")
```

````markdown
```{python}
#| eval: false
```
````
"""
execution = python_execution(disabled)
test_eq(execution, {6: False, 10: True})
converted = repl_disabled_python(disabled, execution)
assert '```python\nraise RuntimeError' in converted
assert '```{python}\n#| eval: true' in converted
assert '````markdown\n```{python}' in converted
cell_disabled = '```{python}\n#| eval: false\nprint(1)\n```'
assert '```python' in repl_disabled_python(cell_disabled, python_execution(cell_disabled))
test_eq(repl_disabled_python(converted, python_execution(converted)), converted)
PrettyString(converted)
---
execute:
  eval: false
---

```python
raise RuntimeError("do not run")
```

```{python}
#| eval: true
print("review before building")
```

````markdown
```{python}
#| eval: false
```
````

report_quarto_controls

def report_quarto_controls(
    p, metadata
):

Report execution and publication decisions separately from unsupported presentation keys

Warnings about code execution and page publication include the affected file’s path. Migration preserves page draft metadata but does not set draft-mode. To use unlinked drafts, explicitly set draft-mode: unlinked in octavo.yml after agreeing on publication behavior. Directory metadata and profiles are reported as unresolved inheritance, not treated as converted settings.

test_stdout(lambda: report_quarto_controls('posts/draft.qmd', {'draft': True}),
    r'posts/draft.qmd: REVIEW publication:.*', regex=True)
test_stdout(lambda: report_quarto_controls('_quarto.yml', {'website': {'draft-mode': 'unlinked'}}),
    r'_quarto.yml: REVIEW publication:.*unlinked.*', regex=True)
test_stdout(lambda: report_quarto_controls('posts/_metadata.yml', {'freeze': True}),
    r'posts/_metadata.yml: REVIEW execution:.*', regex=True)

The configuration scan collects project profiles and ancestor directory metadata without reading page contents. It does not merge that metadata or choose a publication policy. Page execution diagnostics are produced during conversion, using the original file or Markdown-cell line numbers.


report_migration_risks

def report_migration_risks(
    root, srcs
):

Report project and ancestor configuration without reading page contents

report_page_keys reports frontmatter settings outside Octavo's PAGE_KEYS. Integrations pass extra_keys for settings they consume themselves. source_frontmatter reads the metadata from a document or notebook without executing its code. For a notebook it reads the first cell, raw or Markdown, so it also reports notebooks that migration has not yet converted.

Callers with another source format can pass parsed metadata to report_page_keys; Octavo then uses the path only to label the diagnostic.


report_page_keys

def report_page_keys(
    p, # Source path used in diagnostics
    extra_keys:tuple=(), # Metadata keys consumed by the calling integration
    metadata=None, # Parsed metadata; otherwise read from the document
):

Print frontmatter keys outside Octavo's settings and extra_keys


source_frontmatter

def source_frontmatter(
    p, source=None
):

Frontmatter of a document or notebook, optionally using its already-read source

Documentation conversion must not rewrite executable notebook code or discard saved results. migrate_nb_cells applies the text conversions only to Markdown cells. Code cells and their saved outputs are retained.

migrate_nb_cells and migrate_md_file write a file only when a conversion changes its content.


migrate_md_file

def migrate_md_file(
    path, procs
):

Apply procs to a Markdown, QMD or text file in-place


migrate_nb_cells

def migrate_nb_cells(
    path, procs
):

Apply procs to all markdown cells in a notebook in-place

Dropdown entries keep their labels and point to the rendered HTML pages.

test_eq(_nav_item(dict(text='Help', menu=[dict(text='Guide', href='guide.qmd')])),
    dict(text='Help', children=[dict(text='Guide', href='guide.html')]))

Icon names belong to the renderer. Unsupported icons are reported rather than emitted as broken tool links.

Quarto and Octavo use different settings for navigation bars. Migration converts text links and dropdowns into Octavo navigation links, and icon links into tools. Links to documentation sources are changed to HTML destinations so visitors reach rendered pages. Explicit accessibility labels are preserved. Icons not bundled with Octavo are reported and omitted for manual replacement.

quarto_sidebar converts parsed Quarto sidebar settings into sidebar-links. Pages become links and sections become groups. Entries without text take the page's title at build time. The caller chooses which configuration file supplies the sidebar and passes its path for diagnostic messages. Quarto's auto entries and glob patterns are reported and omitted.


quarto_sidebar

def quarto_sidebar(
    sb, path
):

Convert Quarto sidebar settings; use path to identify reported omissions

read_quarto_config reads a YAML mapping and rejects scalars and lists. Missing or empty files return empty settings.

quarto_config copies supported website and HTML settings into Octavo's flat configuration and converts the navbar. It accepts an optional settings overlay, such as nbdev's generated configuration. The caller handles output paths and adds any result from quarto_sidebar.

This is not a complete translation of Quarto configuration. Unsupported settings are reported for manual review. In particular, the conversion leaves themes and site CSS to the caller.


quarto_config

def quarto_config(
    qy, root, overrides=None
):

Convert parsed Quarto settings and optional overlay, reporting omissions under root


read_quarto_config

def read_quarto_config(
    path
):

Read a Quarto YAML mapping; missing or empty files give empty settings


parse_quarto_config

def parse_quarto_config(
    text:str, path:str='_quarto.yml'
):

Parse Quarto YAML text into a mapping; empty text gives empty settings

Applying the migration


migrate_quarto_source

def migrate_quarto_source(
    path, procs, extra_keys:tuple=(), dest=None
):

Convert one document or notebook and report risks using the same loaded source


convert_quarto_nb

def convert_quarto_nb(
    nb, procs, path:str='notebook.ipynb', metadata=None
):

Convert raw frontmatter and Markdown cells of nb in place, returning whether any cell changed

migrate_quarto_source reads a document or notebook once. Execution diagnostics and fence changes share the same analysis. Notebook Markdown cells use the notebook's frontmatter; code cells and saved outputs are retained. Unsupported page keys are reported from the converted metadata without rereading the file.

Migration checks rename conflicts and configuration before editing, preserves an existing octavo.yml, and retains _quarto.yml for comparison. Changes are made in place without automatic rollback. Commit or back up the project first.


migrate_quarto

def migrate_quarto(
    path, # Source directory
    config, # Callable taking the source directory and returning Octavo settings
    extra_keys:tuple=(), # Page metadata keys consumed by the calling integration
    extra_moves=None, # Additional source-to-destination Path pairs; supplied relative paths include `path`
):

Convert sources in place, create missing configuration, and return the rename mapping

The caller supplies a configuration function. It runs after rename-conflict checks and before source changes, and only when octavo.yml is absent. This example uses a source-root Quarto project. nbdev supplies its own function to combine nbdev.yml, a custom sidebar, and project-relative output paths.

extra_moves maps source Paths to destination Paths, using filesystem paths just like the returned rename map. These pairs join document renames for conflict checks, link updates, and renaming. Extra files outside the document formats are not read or converted.


quarto_project_config

def quarto_project_config(
    root
):

Convert a source-root Quarto project's settings, output directory and sidebar


quarto_project_cfg

def quarto_project_cfg(
    qy, root:str='.'
):

Convert parsed Quarto settings qy into Octavo settings, output directory and sidebar

Without an explicit Quarto output directory, migration leaves output unset. Choose a destination before building; migration does not invent one beside or beneath the sources. Without a Quarto sidebar, standalone migration disables Octavo's generated sidebar. An explicit sidebar remains enabled; sidebar: false remains disabled. nbdev supplies its own output and navigation policy.

for sidebar in (None, False, {'contents': ['guide.qmd']}):
    website = {'title': 'My Blog Title'}
    if sidebar is not None: website['sidebar'] = sidebar
    cfg = quarto_project_cfg({'project': {'type': 'website'}, 'website': website})
    assert 'output' not in cfg
    test_eq(cfg['sidebar'], isinstance(sidebar, dict))

Migration preserves an explicit Quarto output directory for review, including an incompatible nested destination such as public. A build rejects overlapping source/output directories. Choose a separate destination rather than silently relocating the published site.

test_eq(quarto_project_cfg({'project': {'output-dir': 'public'}, 'website': {'title': 'My Blog Title'}})['output'], 'public')

The notebook below contains a saved result and code that must not execute during migration.

migration_tmp = tempfile.TemporaryDirectory()
root = Path(migration_tmp.name)/'docs'
root.mkdir()
(root/'_quarto.yml').write_text('''project:
  output-dir: ../_site
website:
  title: Demo
  sidebar:
    contents:
      - guide.qmd
''')
(root/'guide.qmd').write_text(r"""---
subtitle: A guide
execute:
  eval: false
---

[Notebook](index.ipynb)

```{python}
raise RuntimeError("do not run")
```
""")
code = mk_cell('raise RuntimeError("do not run")')
code.outputs = [dict(output_type='stream', name='stdout', text='Saved result\n')]
book = new_nb([mk_cell(disabled+'\n[Guide](guide.qmd)', 'markdown'), code])
write_nb(book, root/'index.ipynb')

Migration renames the guide and moves its subtitle into the description. Execution diagnostics include the notebook's explicitly enabled block at its original line number. The converted display-only blocks are not reported as executable.

with capture_output() as migration_report: moves = migrate_quarto(root, quarto_project_config)
test_eq(moves, {root/'guide.qmd': root/'guide.md'})
test_eq(source_frontmatter(root/'guide.md')['description'], 'A guide')
guide = (root/'guide.md').read_text()
assert '```python\nraise RuntimeError("do not run")' in guide
test_eq(python_blocks(guide), [])
assert f'{root/"index.ipynb"}:10 (Markdown cell 1)' in migration_report.stdout
assert f'{root/"index.ipynb"}:6 (Markdown cell 1)' not in migration_report.stdout
assert f'{root/"guide.qmd"}:9:' not in migration_report.stdout
PrettyString(migration_report.stdout)
/var/folders/0h/5ktbjhg17ns6j8zgdsgvzvy80000gn/T/tmpcayj3e6o/docs/guide.qmd: REVIEW execution: check inherited settings, cell overrides and frozen results before building.
/var/folders/0h/5ktbjhg17ns6j8zgdsgvzvy80000gn/T/tmpcayj3e6o/docs/guide.md: Octavo ignores execute
/var/folders/0h/5ktbjhg17ns6j8zgdsgvzvy80000gn/T/tmpcayj3e6o/docs/index.ipynb: REVIEW execution: check inherited settings, cell overrides and frozen results before building.
/var/folders/0h/5ktbjhg17ns6j8zgdsgvzvy80000gn/T/tmpcayj3e6o/docs/index.ipynb:10 (Markdown cell 1): REVIEW execution: Python block remains executable; approve before building.
/var/folders/0h/5ktbjhg17ns6j8zgdsgvzvy80000gn/T/tmpcayj3e6o/docs/index.ipynb: Octavo ignores execute

Notebook Markdown links change, while executable code and saved outputs remain intact.

migrated = read_nb(root/'index.ipynb')
test_eq(migrated.cells[0].source, converted+'\n[Guide](guide.md)')
test_eq(migrated.cells[1].source, code.source)
test_eq(migrated.cells[1].outputs, code.outputs)

Quarto notebooks usually keep frontmatter in a raw first cell. Migration converts it to Markdown, the only form Octavo reads, and converts its keys like any other frontmatter.

post = new_nb([mk_cell('---\ntitle: Post\n---', 'raw'), mk_cell('Text.', 'markdown')])
with capture_output() as fm_report: assert convert_quarto_nb(post, [repl_frontmatter_keys], 'post.ipynb')
test_eq(post.cells[0].cell_type, 'markdown')
test_eq(frontmatter(post.cells[0].source)[0]['title'], 'Post')
assert 'converted raw frontmatter cell' in fm_report.stdout

A second migration has no files to rename and preserves the existing Octavo configuration.

before = (root/'octavo.yml').read_text()
test_eq(migrate_quarto(root, quarto_project_config), {})
test_eq((root/'octavo.yml').read_text(), before)
test_eq(yaml.safe_load(before)['title'], 'Demo')
/var/folders/0h/5ktbjhg17ns6j8zgdsgvzvy80000gn/T/tmpcayj3e6o/docs/guide.md: REVIEW execution: check inherited settings, cell overrides and frozen results before building.
/var/folders/0h/5ktbjhg17ns6j8zgdsgvzvy80000gn/T/tmpcayj3e6o/docs/guide.md: Octavo ignores execute
/var/folders/0h/5ktbjhg17ns6j8zgdsgvzvy80000gn/T/tmpcayj3e6o/docs/index.ipynb: REVIEW execution: check inherited settings, cell overrides and frozen results before building.
/var/folders/0h/5ktbjhg17ns6j8zgdsgvzvy80000gn/T/tmpcayj3e6o/docs/index.ipynb:10 (Markdown cell 1): REVIEW execution: Python block remains executable; approve before building.
/var/folders/0h/5ktbjhg17ns6j8zgdsgvzvy80000gn/T/tmpcayj3e6o/docs/index.ipynb: Octavo ignores execute

The source-root configuration keeps the output directory relative to the project and converts explicit sidebar entries to HTML links.

cfg = yaml.safe_load(before)
test_eq(cfg['output'], '../_site')
test_eq(cfg['sidebar-links'], [{'href': 'guide.html'}])
migration_tmp.cleanup()

Callers can supply additional renames. Their contents are not converted, but document links follow the new filenames. Existing destinations are rejected before source changes.

with tempfile.TemporaryDirectory() as d:
    root = Path(d)
    (root/'octavo.yml').write_text('{}')
    old,new = root/'old.bin',root/'new.bin'
    old.write_bytes(b'opaque payload')
    new.touch()
    (root/'guide.qmd').write_text('[Asset](old.bin)')
    with expect_fail(FileExistsError): migrate_quarto(root, quarto_project_config, extra_moves={old:new})
    test_eq((root/'guide.qmd').read_text(), '[Asset](old.bin)')
    new.unlink()
    moves = migrate_quarto(root, quarto_project_config, extra_moves={old:new})
    test_eq(moves[old], new)
    test_eq(new.read_bytes(), b'opaque payload')
    test_eq((root/'guide.md').read_text(), '[Asset](new.bin)')

A destination collision must stop migration before an existing file can be overwritten.

with tempfile.TemporaryDirectory() as d:
    p = Path(d)
    (p/'page.qmd').touch()
    (p/'page.md').touch()
    with expect_fail(FileExistsError, contains='page.md'): migrate_quarto(p, quarto_project_config)

Malformed YAML must fail before any source rename. This differs from a valid YAML value of the wrong type.

with tempfile.TemporaryDirectory() as d:
    p = Path(d)
    (p/'guide.qmd').write_text('# Guide')
    (p/'_quarto.yml').write_text('website: [invalid')
    with expect_fail(yaml.YAMLError): migrate_quarto(p, quarto_project_config)
    assert (p/'guide.qmd').exists() and not (p/'guide.md').exists()

Valid YAML is not always valid configuration. Lists, booleans, and numbers must fail before source changes, whether they came from Quarto or an existing Octavo configuration.

for invalid in ('[]', 'false', '0'):
    with expect_fail(ValueError, contains='mapping'): parse_cfg(invalid)
    with expect_fail(ValueError, contains='mapping'): parse_quarto_config(invalid)
with tempfile.TemporaryDirectory() as d:
    nbs = Path(d)
    (nbs/'guide.qmd').write_text('# Guide')
    (nbs/'_quarto.yml').write_text('website:\n  title: Demo\n')
    (nbs/'octavo.yml').write_text('[]')
    with expect_fail(ValueError, contains='mapping'): migrate_quarto(nbs, quarto_project_config)
    assert (nbs/'guide.qmd').exists() and (nbs/'_quarto.yml').exists()
    (nbs/'octavo.yml').unlink()
    (nbs/'_quarto.yml').write_text('[]')
    with expect_fail(ValueError, contains='mapping'): migrate_quarto(nbs, quarto_project_config)
    assert (nbs/'guide.qmd').exists() and not (nbs/'guide.md').exists()

Command line


octavo_migrate_quarto

def octavo_migrate_quarto(
    path:str='.', # Source directory containing `_quarto.yml` or `octavo.yml`
):

Convert a Quarto project to Octavo in place; commit or back up first

octavo-migrate-quarto [path] calls octavo_migrate_quarto; the source path defaults to the current directory. See octavo-migrate-quarto --help for usage and the instructions below for the migration workflow.

The command does not merge Quarto profiles or metadata-files, interpret project.render, migrate render scripts, or update deployment workflows.

Migration instructions (share this with your AI)

Help me migrate this Quarto site to Octavo. Investigate technical questions yourself. Ask me before changing source files, running project code, removing existing behavior, or publishing. If you discover work outside the agreed plan, explain it and ask for permission before proceeding.

For an nbdev project, follow nbdev’s migration instructions and use nbdev-migrate-octavo instead of the standalone command below.

1. Inspect the project without changing files

Find the source root: the directory containing _quarto.yml.

Read the files that contribute settings:

Read build scripts and deployment workflows. Identify the current output directory, public URL, and any deployment subpath, such as /blog/.

Use the checks in steps 4 and 6 to identify which parts of the site need attention.

2. Agree on the changes and save the original site

Before changing files, explain the proposed migration and ask for approval. Identify:

Commit or back up all inputs, including needed untracked files. Migration edits sources in place and has no automatic rollback. Keeping _quarto.yml does not make the converted sources usable by Quarto.

Save a complete copy of the Quarto-rendered site for comparison, including assets, search files, and feeds. Keep this copy outside both the source directory and the proposed output directory.

If the Quarto site needs rebuilding, inspect its execution settings and obtain approval before running project code. Record any existing build failures.

3. Convert the sources and review the changes

Run:

octavo-migrate-quarto /path/to/site

You can omit the path when running from the source root.

The command:

It does not merge profiles or included configuration files, port render scripts, or update deployment workflows.

Save the migration command’s output and review the changed files. Filename replacements also affect examples and prose, not just links. Check that those edits still make sense.

Callout titles. The migrator moves title="..." attributes on callouts into a leading ## Title heading inside the callout when no heading is present.

Figure numbers. Octavo numbers every captioned figure. Remove numbers typed into captions, such as Fig 1.

4. Resolve execution, publication, and configuration before building

Investigate each REVIEW message from the migration command.

Decide which code may run

Inspect Python fences, notebooks, and the execute, eval, freeze, and cache settings that apply to them. Include settings inherited from project profiles, included files, and directory metadata.

Octavo executes {python} blocks only in .qmd files (via execnb.minipy), honoring #| echo, #| eval, #| output, #| hide, and execute: frontmatter. Plain .md files never execute {python} at build time.

The migrator changes Python fences with an explicit document or cell eval: false into display-only python fences. It does not resolve inherited settings or reproduce frozen results.

For a converted display-only python fence that had #| lines, remove the #| lines; for a folded block, wrap the fence in ::: {.details .code-fold} (add open="" for show) with a ## Show the code heading. After building, search the rendered pages for #|.

Octavo does not support Quarto’s freeze setting. For pages using freeze, identify which published results would need to be preserved and propose how to retain them. Review each REVIEW execution message. Before building, identify which Python blocks Octavo will run and ask me to approve running them.

Decide which files may be published

Check for draft, website.drafts, and website.draft-mode, including settings inherited from directory metadata and profiles. Report the affected pages and their Quarto behavior. Ask how to proceed before building; do not silently publish drafts or replace their settings with exclusions.

Octavo supports page-local draft: true with draft-mode: unlinked in octavo.yml. These pages remain public through their HTML, Markdown, and alias URLs but are omitted from generated navigation, listings, feeds, sitemap, and site search. Authored content links remain unchanged. Draft status does not disable code execution.

Migration preserves page draft metadata but does not copy website.draft-mode or resolve website.drafts, profiles, or inherited draft metadata. With approval, set unlinked mode explicitly and put draft: true on each affected page. Without that mode, drafts remain discoverable. Draft status does not inherit from directory indexes. The gone and visible modes, Draft banner, and preview-visible override are not supported.

Octavo publishes visible files beneath the source root. It omits paths with any component beginning with . or _. If we agree to exclude particular files, use source-relative exclude globs. Check drafts, private notes, generators, and other files that must not be published. Excluding a directory excludes its contents.

Removing a page from navigation does not make it private. Do not assume Quarto’s project.render selection carries over.

Check the converted settings

Compare octavo.yml with the original configuration, including profiles, metadata-files, and directory _metadata.yml files.

Check author names and URLs, dates, categories, title banners, descriptions, social cards, and preview images. Preserve structured metadata such as author dictionaries. Do not flatten it merely to make a build succeed.

Report unsupported values as well as unknown keys. For each setting that needs manual conversion, explain the replacement or the behavior that will be lost.

Confirm the output directory

Octavo builds replace the output directory. That directory must not contain the sources or sit inside them, even under a hidden directory.

If output is missing or overlaps the sources, ask me to approve a separate destination. Do not silently relocate the site.

For sources in docs/, this YAML setting writes to a sibling directory:

output: ../_site

YAML output paths are relative to octavo.yml. Explicit Python output paths and CLI --output paths are relative to the working directory.

Update build and deployment commands

Review pre-build and post-build hooks, render scripts, and generated assets. The standalone migrator does not port them.

Update CI commands, hosting previews, and publish directories within the agreed scope. Inspect HTML includes and external scripts before adapting them. Octavo’s js setting loads scripts as modules; check whether existing scripts depend on non-module behavior.

5. Build and run project checks

After execution is approved and the checks above are resolved, run:

octavo-build /path/to/site

Search for remaining .qmd references in generators, tests, workflows, documentation, and saved outputs. Update references that should point to converted files. Run the project’s existing tests.

6. Compare the built site with the Quarto copy

Compare the generated HTML, Markdown, assets, file lists, and feeds. Record whether each difference is an existing problem, an agreed change, or a regression.

Markdown copies keep the meaning of the source but not its exact spelling: expect escaped punctuation, changed blank lines, and maths written as $\displaystyle …$.

Serve the saved Quarto site separately from:

octavo-preview /path/to/site

Confirm which directory each server serves. Test the deployment subpath, not only /. For a site published at username.github.io/repositoryname, test under /repositoryname/. Check the site at desktop and phone widths.

Use the following checks for features present on this site.

Navigation and links

Compare both sides of the navbar, dropdowns, icons, footer, favicon, sidebar order, and anchors. Test images and search from both the homepage and a nested article.

Replace dropped automatic or glob-based sidebar entries with explicit links.

Where the Quarto site has no sidebar, use sidebar: false site-wide for a blog or on the blog directory index within a documentation site. Check which descendant pages inherit the setting.

Test historical aliases at the actual host, including extensionless URLs. For the folder form Quarto used (x/index.html), write an extensionless alias with a trailing slash, such as /x/. Markdown-copy URLs change from .html.md to .md; the migration does not create redirects. List changed URLs and agree on any redirects.

Fonts, colors, and page layout

First compare font families and sizes, header backgrounds, text colors, and link colors. Keep these adjustments separate from changes to columns or grids. Ask before redesigning the layout.

Prefer a small stylesheet using Octavo’s header and prose variables. Inspect the rendered HTML before adapting selectors. Quarto’s site-level CSS is not carried over automatically; page css still applies. CSS paths are source-root-relative without a leading /. Check stylesheet references on both the homepage and a nested article.

Octavo has no Bootstrap or Quarto compatibility layer. Replace markup that depends on them with site-specific classes and CSS rather than loading the old stylesheet wholesale.

Quarto’s article and full layouts, .column-page, and .column-screen-inset-right need manual replacements. Use page-layout: custom for hand-built pages where appropriate.

Octavo keeps Quarto’s fig-align on the image without applying it. Centre those images with img[fig-align="center"] { display: block; margin-inline: auto; }.

Compare wide content, columns, tables, callouts, collapsible blocks, title areas, light and dark themes, and mobile layouts. Check table-of-contents depth on ordinary and custom pages.

Conditional content and embedded features

Inspect converted {{#html}} / {{#md}} / {{^html}} / {{^md}} sections in both HTML and Markdown output. Both branches render Markdown normally.

Search for {{< and replace unsupported shortcodes such as {{< include >}} ({{< doc >}} and {{< video >}} are supported natively). Check embedded media, bibliography files, citations, footnotes, and cross-references on representative pages.

Citations. Octavo does not read the bibliography frontmatter key. For each page that sets it, remove the key and add the works the page cites as a bibliography at the end of the page, keeping their citation keys. Follow mdhtml's documentation on citations and bibliographies. Rewrite any Quarto citations that mdhtml's syntax does not support. Warn me about changed pages so I can manually review.

Listings, drafts, and feeds

Check listing order, author display, dates, images, and category filtering.

Listing pages show category filters in place of a table of contents and ignore toc. Do not add toc: false to a listing index for this reason: descendants inherit it and lose their tables of contents.

Verify that output files contain only pages approved for publication. Unlinked drafts must remain accessible through their HTML, Markdown, and alias URLs but absent from generated navigation, listings, category counts, sitemap, site search, and feeds. Check authored links separately: Octavo leaves links to drafts in page content unchanged. Verify that excluded files are absent.

Compare RSS entries and whether they contain full or partial articles. Test social previews using the public site-url. Listing thumbnails use each page's image, falling back to its first non-embedded body image. Social previews use the same fallback when no page or site preview image is configured. Set a page's image explicitly when its thumbnail and preview should use a different image. For a listing page without its own image, Quarto uses the first card thumbnail whose filename contains preview, feature, cover or thumbnail as the preview image. Octavo never takes previews from card thumbnails. Compare the migrated homepage's og:image with the live site's. To keep the live site's image, set image in octavo.yml to its path from the source root, such as image: posts/flying-thumbnail.png.

Scripts and maths

Test adapted HTML includes and external scripts in the browser.

Migration sets math: dollars. Check rendered maths and escape literal dollar signs near maths as \$.

7. Report the result before publishing

Fix differences within the agreed scope, rebuild, and repeat the affected checks. Ask before accepting a loss of behavior or extending the work.

Report:

Keep the saved Quarto site and original configuration until I review the migration. Before proposing removal of unused Quarto files, check that no workflow still uses them. Obtain approval before publishing.