Skip to main content

Crate petrify

Crate petrify 

Source
Expand description

Petrify — turn live websites into static offline copies.

The library powers the petrify CLI. It discovers pages on a starting host, downloads referenced assets, rewrites links to site-root paths suitable for hosting behind a web server, and optionally converts images to WebP.

§Quick example

use petrify::config::Config;
use petrify::engine::Petrifier;

let mut config = Config::new();
config.url = "https://example.com".to_string();
config.output = "./petrified_site".to_string();

let mut petrifier = Petrifier::new(config).await?;
petrifier.run().await?;

See the crate README and CHANGELOG for CLI options and release notes.

Modules§

config
engine
html_parser
paths
types