Crates.io | htmlprep |
lib.rs | htmlprep |
version | 0.0.5 |
source | src |
created_at | 2023-07-03 16:40:34.695446 |
updated_at | 2024-01-09 16:11:45.927191 |
description | DEPRECATED (use sarascript instead): An HTML Pre-Processor for creating static HTML files |
homepage | |
repository | |
max_upload_size | |
id | 907204 |
size | 17,160 |
Sarascript replaces htmlprep. If you plan on using htmlprep anyway (it is really just a text replacement tool), know that htmlprep does not respect html comments.
Imagine that you had a static website that had a few dozen pages of information. In order to make navigation easier, you may want to include a navbar on all of your pages. You likely would like to only have to edit the navbar in one location, and have all your webpages be updated accordingly. You have a few serious options:
This library allows you to do the first option, statically, without the reliance on PHP.
You could. PHP can generate static files. Here's a script on Stack Overflow that does exactly that. You would even get more features with PHP. But if you can't use PHP for whatever reason, want to process html server-side, and don't want to lock yourself into a JavaScript framework, then this crate checks all those boxes.