cli tool to convert a static site to use only relative urls
Project description
all-relative
A command line tool to convert a static site to use only relative urls.
Run it from the the directory which contains your generated static site to have it convert all urls in html and css to be relative to that dir or specify it as a cli argument.
Relative urls leaves you with a portable website that doesn't care what path it is mounted at. /
, /olizilla/
/ipfs/hash/
, file://x/y/z/
, the lot, it don't care. This allows you to load the same static site via IPFS or github pages, or the localfile system, as well as from the root of your custom domain. Relative urls are wonderful.
The command will edit the files in place, so it's best to run it on generated output that you can recreate if you need to. If you can't, be sure to take a back up of your site first.
Install
Install it with
$ pip install all-relative
or run just it wihtout installing it via pipx
see here if you haven't heard about it
$ pipx all-relative
Usage
Run the command from the root directory of your static site.
$ all-relative
Inspired by all-relative
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file all-relative-0.1.8.tar.gz
.
File metadata
- Download URL: all-relative-0.1.8.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.8.6 Linux/5.4.0-1032-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90be644777f3da3d486d294b84a582a968c5be97d4cefded498e3c9b1668ae05 |
|
MD5 | 7f5151ef1c9563384a3714996438e74e |
|
BLAKE2b-256 | 89d2cf47e50068f0762792bc647dc48d56b1bb5b318f6d873537078f7fc4b2d2 |
File details
Details for the file all_relative-0.1.8-py3-none-any.whl
.
File metadata
- Download URL: all_relative-0.1.8-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.8.6 Linux/5.4.0-1032-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0a967c0464bbed0e7a5c9d07169b0c7c818dce80673da97d64d2f5dcadaf5d7 |
|
MD5 | 75917884eeefc2e5d3b6c3e4a4650b87 |
|
BLAKE2b-256 | 022d27f9062656e4561c3b789b8e3617b637cbea30db0c6ed356dd672f7a5a53 |