Create a website
Tags: #html #css #website #page #landing #custom #snippet
Author: Jeremy Ravenel
The objective of this notebook is to create an end-to-end website in 5min.

Input

Import libraries

1
from urllib.request import urlopen
2
from IPython.display import IFrame
3
import naas
Copied!

Model

Get example

1
html = urlopen("http://www.example.com/").read().decode('utf-8')
2
print(html)
Copied!

Save file on your file system

Click right to open + edit the file downloaded
1
html_file = open("site.html","w")
2
html_file.write(html)
3
html_file.close()
Copied!

Learn about HTML with this Cheat Sheet

1
IFrame("https://web.stanford.edu/group/csp/cs21/htmlcheatsheet.pdf", width=900, height=600)
Copied!

Manually change the content of the file to make it your own.

Use Google search to go further in the customization (I recommend using https://stackoverflow.com/ + https://www.w3schools.com/html/)

Output

Use Naas asset formula to generate a shareable URL.
1
naas.asset.add("site.html",{"inline": True})
Copied!
Nb: if you want to use your own domain name, we will cover that in another version of this template. Contact us → [email protected]
Last modified 2mo ago
Copy link
Edit on GitHub