Web3: getting started
When building a Web3 site using decentralized platforms like IPFS (InterPlanetary File System) or Unstoppable Domains, you often need to convert HTML into static pages. Here’s what that means and how it works:
What Does “Converted to Static Pages” Mean?
In traditional web hosting, a website might use dynamic content—where pages are generated on-the-fly by a server (e.g., a WordPress blog or an e-commerce site). This dynamic content involves databases, server-side processing, and often live interaction with the user.
In contrast, static websites are made up of pre-generated files (HTML, CSS, JavaScript) that do not change unless you update them manually. These files are ready to be served as-is, without the need for a backend server to process requests.
When you deploy a website to a decentralized network like IPFS, it needs to be a static website because:
- IPFS and similar platforms are designed for content storage and distribution, not dynamic server-side processing.
- Web3 platforms focus on decentralized storage and censorship-resistant access, and static sites are easier to distribute in that way.
Can There Still Be Links on a Static Page?
Absolutely! Static pages can include links, just like any regular website. Static means the content doesn’t change dynamically, but the links can still lead anywhere, including to:
- Other static pages on your website.
- External websites (e.g., links to your social media, other Web3 platforms, or even traditional web pages).
- External decentralized apps (dApps) or services.
How to Set It Up for Web3
- Create Your HTML Content:
Create your site using standard HTML, CSS, and JavaScript. Make sure it’s designed to be static (no server-side scripting, like PHP or databases). - Deploy to IPFS or Fleek:
- You can upload your static files to IPFS. Once uploaded, you’ll get a content identifier (CID) that can be used to access your site.
- Fleek is another option that simplifies the process of deploying static sites to IPFS.
- Linking from the Site:
Add links to your static HTML pages or to external Web3 resources, like your Monero wallet address or even other decentralized projects. - Use DNS for Access:
After uploading your site to IPFS, you can connect it to your .xmr domain, such as flmarkets.xmr, so people can access it via the domain.
Example:
- You could have a page like
index.html
(your homepage) with links to other pages likeabout.html
,marketplace.html
, or external resources liketwitter.com/flmarkets
. - Even though the content is static, the links will still work, and users can navigate between different pages.
Why Use Static Pages in Web3?
- Decentralization: Static pages are easier to distribute across decentralized networks like IPFS, making them more censorship-resistant.
- Security and Reliability: There’s no backend server to hack or go down, making the site less vulnerable to attacks or outages.
- Faster Loading: Static files are pre-generated and served directly, often resulting in faster load times, especially in decentralized networks.
In short, static pages don’t affect the ability to have links, but they do require that your website content is served as fixed files. You can still link to anything, whether it’s other pages, external resources, or Web3 apps