Julyfun

最小化可复现

光速搭建这样一个博客

Posted at # how-to

搭建主站

ref: https://juejin.cn/post/7134899224985993230

  • 如果没有安装 bun 你就 curl -fsSL https://bun.sh/install | bash
  • fork https://github.com/moeyua/astro-theme-typography
  • git clone your fork 并在仓库中 bun install
  • src/content/posts 中修改文章
  • 在仓库根目录 bun dev run 本地查看站点(热更新)
  • git push 到你的 fork
  • 在 vercel.com 的 dashboard 中 Import git repo,部署时注意有些选项需要修改为 bun run buildbun install
  • 修改成喜欢的域名,提供 julyfun.vercel.app 这种免费域名的

(可选)vercel.app 被墙了,可配置国内域名

托管于非中国内地服务器的网站无需进行ICP备案。ref: https://help.aliyun.com/zh/icp-filing/basic-icp-service/product-overview/icp-filing-requirements-for-a-regular-website

(可选)搭建图床

如果你不想把太多二进制文件存 git 仓库(而且用相对路径的话文章不好移植),你可用互联网活菩萨 Cloudflare 搭建免费图床:

ref: https://imesong.com/posts/%E4%BD%BF%E7%94%A8-cloudflare-%E6%90%AD%E5%BB%BA%E5%85%8D%E8%B4%B9%E5%9B%BE%E5%BA%8A%E6%95%99%E7%A8%8B/ 备份 https://juejin.cn/post/7367630980944609318

  • fork https://github.com/cf-pages/Telegraph-Image
  • 登陆到 cloudflare 平台,(2024 UI) 选择 Workers 和 Pages 功能。在右侧页面
    • 点击“创建”
    • 选中 Pages
    • 连接到 Git
    • 选择刚才 fork 到仓库
    • 开始设置
    • 保存并部署
  • 部署成功后等待 10min 左右,点进他给你的形同 https://telegraph-image-bhi.pages.dev/ 这样的链接,上传图片即可获得图片链接

how-to

  • 如果最后访问域名显示重定向次数过多,在第二个链接 🔗 里说了需配置 SSL - strict

verified on 24.7.24