What is index.html and how can I make a simple safe:// website


#1

Continuing the discussion from Made a video on Test 17 to share with everyone I know:

index.html is the default, just a convention, for a website. So when you go to any URL that doesn’t specify a particular file, the browser defaults to look for index.html at the location specified and loads that. Actually it’s the web server that does this, loads the default and returns the HTML it contains to the browser, but the effect is the same.

On the clearnet, web browsers don’t know the name of the default file being loaded by the server, and so don’t show it in the address bar. But Maidsafe have decided to make this visible because they do know it (there being no server - this work is done slightly differently).

So to learn more, read about HTML, try searching “html tutorial” or “creating a website using HTML” - there are lots of intro and tutorial websites for that and I don’t know which are the best these days.

For now, you need to create “static HTML” so ignore anything that generates HTML using server side processing, so called “dynamic HTML websites” (eg server side scripts, PHP). For dynamic websites, the Web server generates the HTML when you access the website rather than just loading it from a static file, so with no servers on SAFEnetwork, the HTML has to be stored in a file rather than created dynamically.

Most websites consist of many files, but the starting point, the home page loaded when you visit a domain that doesn’t specify a particular file, will be the default which is index.html

Here’s a really trivial example you can save to “index.html” and load in any browser, or even upload to Safenetwork and publish as a safe:// website:

<html>
<body>
<h1>A Big Heading </h1>
<p>A very short paragraph
</p>
</body>
</html>

Forum Update: 4126 members / guidelines / trust levels
How to? for making an app for the safe network
#2

Thanks, Mark. This is a start. I definitely need to track down and study the data you reference. I’m obviously missing some basics that folks who’ve dealt with this stuff think of as so obvious that everybody must know.

@frabrunelle helped me republish a website on an earlier version of test net, but details like this (and others, no doubt) have been complete barriers in later efforts on my part when trying it myself.

I’ll study it up, and then maybe we can put together a tutorial that even the simpler folk (like my current self) can use to publish stuff. That would be a boon to lay curiosity.


#3

This will be valuable and I’m happy to help you as you need it. You’re right this is straightforward once you know it and have built websites from scratch, and created an html editor to make the process easier… :blush: but I’m sure most people have not done that :wink: and will find such a tutorial very helpful. Not that I’m an expert these days, so much has been added since I was fiddling about, but I do know the basics.

I hope others will contribute their favourite workflows and tools too. Editing the html manually is really for masochists like me now (but also useful to learn the nuts and bolts), but there are many ways to generate a static html website on your PC and then upload it using the web_hosting_manager and some really helpful tools that save you having to do everything from scratch.

I haven’t used any ‘static website generators’ myself (being a masochist) but believe some of them are very good. Some have been mentioned on the forum before, and I have an idea they could help in putting together http://safepress.io or similar tools, but I’m afraid I’ve not time to do that now.

Anyway John, shout out whenever you could do with a bit of help, and I’m sure I’m not the only one who will be happy to do so.

Anybody else wanting to learn this, please ask for help. It’s a lot of fun and one of the best feelings is creating a website and sharing it with the world. And as SAFEnetwork is a while new Internet, no better place to start. :slight_smile:


#4

I too am not very familiar with all the different tools for generating websites, but I was going to suggest that even a word processor usually gives you the ability to save to html. This is a simple way to generate something useful and at least somewhat presentable.


#5

2 posts were merged into an existing topic: WebApp Databases


#6

I made my first Safe-site. It has a link and everything!
safe://nature.sascha/index.html
Wasn’t there a list of test sites somewhere?


#7

That sounds good let me know when that tutorial is
Going to happen thanks M!


#8

Update: once you have a simple website and want to test it, you can either:

  • use the MaidSafe Web Hosting Manager to upload it to SAFE Network (currently alpha 2), and view it in SAFE Browser,

  • or view your website on your own machine using the mock browser. You can download the MaidSafe build of mock browser, and then see instructions on how to display a website using SAFE Browser (mock build) without using SAFE Network (so no invite required, and no internet connection etc.)


#9

Okay so once you have an entire site made using HTML 5 lets say, how do you get that site to show in the browser? How do you us the web hosting manager? How do you upload to the SAFE network?