Cassette can be used to host a website online. In order for a traditional HTML, CSS and JavaScript site to display properly, an additional line of HTML code needs to be added to each .html
page.
The below folder should be in a Resources folder on our Cassette Wallet and available by our cstt:// domain.
The Basics
Create a new container and give it Public Read permissions. Upload your website files to the container. This can be done by adding files individually (Upload files) or by adding your directory (Upload directory). To view the website online, select the respective .html
file and click View in web browser.
HTML Tag
The HTML <base>
tag is used to specify a base URL, or target, for relative links. This URL will be the base URL for every link on the page and will be prefixed before each of them.
A sample structure might look like:
// add to <head>
<base href="/v1/get_by_attribute/YOUR_CONTAINER_ID/FilePath/">
File structures can stay as you would expect in a normal .html
page.
// add to <head>
<link rel="stylesheet" href="css/styles.css">
// or
<link rel="stylesheet" href="styles.css">
// add to the base of your .html file;
<script src="js/script.js">
// or
<script src="script.js">