指南
"怎么把这个 HTML 文件放到网上?"——简短实用的答案都在这里
"怎么把这个 HTML 文件放到网上?"——简短实用的答案都在这里
你写好了一个 index.html —— 接下来呢?从最简单到最专业,把 HTML 文件发布到互联网上的每一种方法,全部用大白话讲清楚。
GitHub Pages、Netlify、Vercel、S3 还是单文件托管?免费托管 HTML 的几种方式实话实说地对比一遍,看看哪个最适合你。
把网站放到网上,其实不需要 VPS、Node.js 或 nginx。什么是静态托管、什么情况下它就够用,以及如何零基础设施部署 HTML。
AI 帮你写好了整个网页 —— 现在把它放到网上。如何在一分钟左右把 ChatGPT、Claude 或 Gemini 生成的 HTML 变成一个拥有真实网址的在线网站。
用邮件发 .html 附件,效果往往不如预期。分享 HTML 页面最可靠的方式是一个网址 —— 一分钟内就能拿到,方法在这里。
GitHub Pages 很棒 —— 直到你只想把一个页面放上网,却要面对仓库、分支和构建设置。更简单的替代方案,实话实说地对比一遍。
Netlify Drop 是拖文件夹即部署的鼻祖,至今仍是好产品。它对单个页面来说哪里别扭——账号认领、匿名站点的密码、必须是文件夹——以及可以改用什么。
Tiiny Host 让"上传文件、得到链接"变得普及。如果免费 3 MB、1 个项目的限制或 $9/月的起步价不适合你,这里有替代方案——附数字,以及 Tiiny 仍然更好的情况。
Neocities 是手工个人网站最友好的家,既是托管也是社区。如果你想要一个不出现在社区目录里的页面,或者不用账号一分钟内得到链接,这里是替代方案的比较。
Vercel 是托管 Next.js 应用的最佳去处。对一个手写的 HTML 页面来说,它的机制太多:账号、仓库或 CLI,以及排除商业用途的 Hobby 套餐。可以改用什么,以及 Vercel 仍然合适的情况。
Claude 可以发布 artifact,但那个链接是你选不了的 claude.ai 地址,Team 和 Enterprise 账号根本不能公开发布,而且取消发布是永久的。如何把同一份 HTML 放到你掌控的链接上,大约一分钟。
A static page keeps no logs you can read — so how do you know if anyone visited? Server-side counting, privacy-friendly analytics and Google Analytics, compared honestly.
Static pages can't process form submissions on their own — but you don't need a server to collect messages. Four approaches, working code, and how to stop the spam.
When you paste your URL into a chat and it shows a blank box, Open Graph tags are missing. The four tags that matter, the image rules, and how to test before sharing.
The tiny icon in the browser tab. How to make one, the three lines that cover every device, and how to add it when your host serves only a single file.
Your page looks fine on a laptop and cramped on a phone. The handful of changes that fix it — starting with one meta tag most pages forget.
You do not need a website builder or a framework to have a portfolio online. How to structure a single HTML file into a clean personal site, and put it live in minutes.
Beyond the visible content, a few tags decide how your page appears in search results and shared links. The short list worth adding, and the ones you can ignore.
You moved a page, or you want a short link pointing elsewhere. Every way to redirect — from a one-line meta tag to a proper 301 — and when each is the right choice.
What a static site is, why a single self-contained HTML file covers more than you expect, what a static host does for you, and the cases where static hosting is the wrong tool.