Skip to content

RichardGeorgeDavis/simply-static-portable-paths-fixes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simply Static Fixes

This tool post-processes exported Simply Static folders and rewrites paths so the site works offline.

Versions

  • Fixes tool: 0.3.12
  • WordPress plugin: 0.8.4 (disabled — use the fixer instead; see header in add-this/simply-static-portable-paths.php)

Structure

simply-static-fixes/
  index.php      # Web UI
  fix.php        # Rewrite logic
  add-this/      # Plugin to install in WordPress before export
  sites/         # Put exported sites here (one folder per site)
  reports/       # Run version counter (increments on apply)

Usage

  1. Export with Simply Static.
  2. (Optional) The plugin in add-this/ is currently disabled due to buggy exports — rely on the fixer instead.
  3. Unzip the export and place it under simply-static-fixes/sites/<site-name>.
  4. Open simply-static-fixes/index.php in your local PHP server.
  5. Select the site and run a dry run first (leave “Apply changes” unchecked).
  6. If the stats look right, run again with Apply changes checked.
  7. A backup zip (e.g., sites/<site-name>.zip) is created automatically before applying changes. Use “Restore from backup” to revert.

Options

  • Rewrite .local absolute URLs: converts http(s)://*.local/... and //*.local/... to relative paths with the correct ./ or ../ prefix. External/CDN hosts are left as-is.
  • Apply changes: unchecked = dry run (no writes).

Notes

  • Root-relative paths are rewritten to the correct ./ or ../ prefix for each file depth.
  • Home pages should resolve as ./...
  • Subpages should resolve as ../... (repeated per depth)
  • Escaped slashes in JSON (\/) stay escaped.
  • Files inside wp-content/ and wp-includes/ are not path-rewritten (to avoid breaking asset-relative URLs). Only .local absolute URLs are rewritten there.

References

About

Post-export fixer for Wordpress Simply Static archives that rewrites wp-content paths for offline use, with a small web UI and WordPress plugin.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages