Examples
EN

import

Import content from other static site generators or platforms into hwaro. This is the reverse of hwaro tool export.

# Import a WordPress WXR file
hwaro tool import wordpress path/to/export.xml

# Import a Jekyll site directory
hwaro tool import jekyll path/to/jekyll-site

# Import a Hugo site
hwaro tool import hugo path/to/hugo-site

# Import a Notion export
hwaro tool import notion path/to/notion-export

# Import an Obsidian vault
hwaro tool import obsidian path/to/vault

# Specify output directory and include drafts
hwaro tool import jekyll path/to/site -o content/blog --drafts

# Verbose output
hwaro tool import hugo path/to/site --verbose

Supported Sources

Source Input Notes
wordpress WXR XML file Imports posts and pages from a WordPress export file
jekyll Site directory Reads _posts/ and (with --drafts) _drafts/
hugo Site directory Reads content/ preserving section layout
notion Export directory Recursively imports .md files from a Notion export
obsidian Vault directory Recursively imports notes (skips dot-prefixed folders)
hexo Site directory Reads source/_posts/ and source/_drafts/
astro Site directory Reads src/content/ collections
eleventy Site directory Reads Markdown files with Eleventy front matter

Options

Flag Description
-o, --output DIR Output content directory (default: content)
-d, --drafts Include draft content
--force Overwrite existing files instead of skipping
--dry-run Preview every destination without writing anything
-v, --verbose Show detailed output
-j, --json Output a per-file manifest as JSON
-h, --help Show help

--dry-run resolves every destination — collision renames and skip decisions included — and reports the counts and manifest without touching disk, so you can inspect exactly what a large import will do before running it for real.

JSON Output

{
  "success": true,
  "dry_run": false,
  "imported_count": 2,
  "skipped_count": 1,
  "error_count": 0,
  "files": [
    { "path": "content/posts/hello.md", "action": "imported" },
    { "path": "content/posts/second.md", "action": "imported" },
    { "path": "content/posts/existing.md", "action": "skipped" }
  ]
}

action is imported, skipped (destination already exists and --force was not passed), or overwritten (--force replaced an existing file). files lists every destination the run resolved — page-bundle assets included — while the counts cover content documents only; sources skipped before a destination was resolved (drafts without --drafts, unsafe slugs) appear in the counts but have no row.

Behavior

Example Output

hwaro: import jekyll
source: ./old-blog
output: content
imported: 42 files, 3 skipped

An errors count is appended only when errors occurred, and a warning reminds you about --force when files were skipped. In a color terminal the same report renders as an hwaro import heading with aligned rows and a ✦ imported outcome line.

See Also