GeoHazardWatch

Page Actions


Import Pages

The Import Pages feature (/admin/import) allows administrators to import content from external sources into the platform. It supports zip archives of existing pages, individual files, and multiple source formats.

Supported Formats

FormatExtensionsNotes
JSPWiki.txtConverts JSPWiki syntax to Markdown
HTML.html, .htmExtracts article content, converts to Markdown
Markdown.md, .markdownPass-through; existing frontmatter is preserved as metadata — see jwilleke/ngdpbase#467 *(pending)*

The format dropdown in the UI includes all registered converters. Select Auto-detect to let the system choose based on file extension and content.

When to Import

  • Restoring pages after data loss
  • Migrating content from another GeoHazardWatch instance
  • Bulk-loading pages created outside the application
  • Merging content from a backup archive

How to Import

  1. Go to Admin → Import Pages
  2. Click Choose File and select a .zip archive
  3. Review the import options:
    • Overwrite existing pages — if a page with the same slug already exists, replace it with the imported version
    • Skip existing pages — leave existing pages unchanged and only add new ones
  4. Click Import to start the import
  5. The page shows a summary of pages added, updated, and skipped when complete

What Happens During Import

The import process:

  1. Extracts the archive to a temporary directory
  2. Reads each Markdown file and its frontmatter
  3. Writes the page to the data directory
  4. Rebuilds the page index to reflect the new content

Attachments included in the archive are also imported if present.

Caveats

  • Very large archives (thousands of pages) may take several minutes to process
  • UUIDs in the imported files are preserved — duplicate UUIDs will overwrite existing pages when the overwrite option is selected
  • User accounts referenced as page authors are not created automatically

See also Export Data to create an archive suitable for importing.

No footnotes on this page.

No comments yet.